/* ============================================
   MAKA DEFENSA - Responsive Breakpoints
   ============================================ */

/* --- Tablet (1024px and below) --- */
@media (max-width: 1024px) {
  :root {
    --container-padding: 2rem;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .stat-item:nth-child(3)::after,
  .stat-item:nth-child(4)::after {
    display: none;
  }

  /* Why Maka */
  .why-maka {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .why-maka__image img {
    height: 400px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  /* Service detail */
  .service-detail__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .service-detail:nth-child(even) .service-detail__grid {
    direction: ltr;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Cobertura */
  .cobertura-grid {
    grid-template-columns: 1fr;
  }

  /* Mission/Vision */
  .mission-vision {
    grid-template-columns: 1fr;
  }

  /* Values */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Small Laptops / Tablet Landscape (900px and below) --- */
@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .why-maka__image img {
    height: 350px;
  }

  .service-detail__grid {
    gap: var(--space-8);
  }

  .cobertura-grid {
    gap: var(--space-8);
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* --- Mobile Large (768px and below) --- */
@media (max-width: 768px) {
  :root {
    --container-padding: 1.25rem;
    --header-height: 70px;
  }

  /* Section spacing */
  .section {
    padding: var(--space-14) 0;
  }

  .section--sm {
    padding: var(--space-10) 0;
  }

  /* Header / Nav */
  .nav__list {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav .btn {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
    margin-right: var(--space-2);
  }

  .lang-switcher {
    margin-left: 0;
    margin-right: var(--space-1);
  }

  /* Hero */
  .hero {
    min-height: 450px;
  }

  .hero__corners {
    inset: 20px;
  }

  .hero__corner {
    width: 20px;
    height: 20px;
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Service card padding */
  .service-card {
    padding: var(--space-6);
  }

  /* Mobile panel overflow */
  .nav__mobile-panel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Services grid: 2 columnas en tablet vertical */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat-item {
    padding: var(--space-4);
  }

  .stat-item::after {
    display: none !important;
  }

  /* Clients */
  .clients__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer__badges {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* CTA section */
  .cta-section__actions {
    flex-direction: column;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .gallery-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
  }

  /* Lightbox */
  .lightbox__nav {
    display: none;
  }

  /* Page hero */
  .page-hero {
    height: 35vh;
    min-height: 280px;
  }

  /* Vacantes */
  .vacantes-grid {
    grid-template-columns: 1fr;
  }

  /* Cotizador */
  .cotizador-form {
    padding: var(--space-6);
  }

  .progress-bar__label {
    display: none;
  }

  /* Values */
  .values-grid {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Locations */
  .locations-grid {
    grid-template-columns: 1fr;
  }

  /* Trust bar */
  .trust-bar__inner {
    gap: var(--space-6);
  }

  /* WhatsApp float */
  .whatsapp-float {
    bottom: var(--space-5);
    right: var(--space-5);
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}

/* --- Mobile Small (480px and below) --- */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  /* Hero compact */
  .hero {
    min-height: 400px;
  }

  .hero__corners {
    inset: 12px;
  }

  .hero__corner {
    width: 16px;
    height: 16px;
  }

  /* Page hero compact */
  .page-hero {
    min-height: 220px;
  }

  /* Section spacing compact */
  .section {
    padding: var(--space-12) 0;
  }

  .section--sm {
    padding: var(--space-8) 0;
  }

  /* Stats */
  .stats__grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-item__number {
    font-size: var(--text-3xl);
  }

  .stat-item__label {
    font-size: var(--text-xs);
  }

  /* Clients */
  .clients__grid {
    grid-template-columns: 1fr;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card, .service-card {
    padding: var(--space-6);
  }

  /* Progress bar circles */
  .progress-bar__circle {
    width: 32px;
    height: 32px;
    font-size: var(--text-xs);
  }

  /* WhatsApp float smaller */
  .whatsapp-float {
    width: 46px;
    height: 46px;
  }

  .whatsapp-float svg {
    width: 22px;
    height: 22px;
  }

  /* Footer spacing */
  .footer__grid {
    gap: var(--space-6);
  }

  /* Trust bar items */
  .trust-bar__inner {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* --- Extra Small (360px and below) --- */
@media (max-width: 360px) {
  :root {
    --container-padding: 0.75rem;
  }

  .hero__badge {
    font-size: 0.65rem;
    padding: var(--space-1) var(--space-3);
    gap: var(--space-2);
  }

  .hero__ctas {
    max-width: 100%;
  }

  .btn--lg {
    padding: var(--space-3) var(--space-5);
  }

  .gallery-grid {
    gap: var(--space-2);
  }

  .vacancy-card {
    padding: var(--space-4);
  }

  .cotizador-form {
    padding: var(--space-4);
  }

  .contact-form-card {
    padding: var(--space-4);
  }
}

/* --- Desktop Large (1280px and above) --- */
@media (min-width: 1280px) {
  .hero__content {
    max-width: 1000px;
  }

  .services-grid {
    gap: var(--space-8);
  }
}

/* --- Account Sidebar Responsive --- */
@media (max-width: 768px) {
  .sidebar-trigger {
    width: 40px;
    height: 40px;
  }
  .sidebar-trigger svg {
    width: 18px;
    height: 18px;
  }
}

/* === Auditoría móvil: áreas táctiles ≥44px y legibilidad === */
@media (max-width: 768px) {
  /* Menú móvil: enlaces cómodos de tocar */
  .nav__mobile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: var(--space-2) var(--space-6);
  }
  /* Redes del footer */
  .footer__social-link {
    width: 44px;
    height: 44px;
  }
  /* Selector de idioma: área táctil mayor (las banderas siguen igual) */
  .lang-switcher__link {
    padding: 6px;
  }
}

@media (max-width: 639px) {
  .account-sidebar__drawer {
    width: 100%;
  }
}

/* Servicios: 1 columna solo en teléfonos */
@media (max-width: 540px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}
