/* ============================================
   Los Repertoristas — Responsive
   Mobile-first breakpoints con estilos
   granulares para cada sección
   ============================================ */

/* ──────────────────────────────────────────
   SMALL MOBILE  (≤ 400px)
   ────────────────────────────────────────── */
@media (max-width: 400px) {
  :root {
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  body {
    font-size: 15px;
  }

  .hero__content {
    padding: var(--space-xl) var(--space-sm);
  }

  .hero__title {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero__subtitle {
    font-size: 0.9375rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    padding: var(--space-md) var(--space-sm);
  }

  .card__icon {
    width: 44px;
    height: 44px;
  }

  .servicio-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
  }

  .servicio-item::before {
    font-size: 1.5rem;
    min-width: auto;
  }

  .iberoamerica__highlight {
    padding: var(--space-sm) var(--space-md);
  }

  .eyebrow {
    font-size: 0.6875rem;
  }
}

/* ──────────────────────────────────────────
   MOBILE  (≤ 767px)
   ────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Nav — menú lateral */
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--lr-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--nav-height) + var(--space-md)) var(--space-md) var(--space-md);
    gap: 0;
    box-shadow: var(--shadow-elevated);
    transition: right var(--duration-normal) var(--ease-out);
    overflow-y: auto;
  }

  .nav__links.open {
    right: 0;
  }

  .nav__links a {
    color: var(--lr-ink) !important;
    font-size: 1.1rem;
    width: 100%;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--lr-ink-08);
  }

  .nav__links a::after {
    display: none;
  }

  .nav__links .btn {
    margin-top: var(--space-sm);
    text-align: center;
    justify-content: center;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__hamburger.active span {
    background-color: var(--lr-ink) !important;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  .hero__subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  /* Para quién */
  .para-quien__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  /* Servicios */
  .servicios__list {
    grid-template-columns: 1fr;
  }

  /* Trabajos */
  .trabajos__slide {
    flex: 0 0 260px;
    height: 340px;
  }

  /* Dividers */
  .divider-img {
    height: 180px;
    background-attachment: scroll;
  }

  /* Secciones — padding reducido */
  .nosotros,
  .para-quien,
  .servicios,
  .trabajos,
  .quienes,
  .iberoamerica,
  .faq {
    padding-block: var(--space-lg);
  }

  /* Quiénes somos */
  .quienes__bio,
  .quienes__credits {
    text-align: left;
  }

  /* Iberoamérica */
  .iberoamerica__content {
    text-align: left;
  }

  .iberoamerica__content h2 {
    text-align: center;
  }
}

/* ──────────────────────────────────────────
   TABLET  (768px – 1023px)
   ────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Para quién */
  .para-quien__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tercera card a ancho completo centrada */
  .para-quien__grid .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
  }

  /* Servicios — 2 columnas */
  .servicios__list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Dividers */
  .divider-img {
    height: 280px;
    background-attachment: scroll;
  }

  /* Hero */
  .hero__content {
    max-width: 650px;
  }

  /* Trabajos — slides algo más pequeños */
  .trabajos__slide {
    flex: 0 0 280px;
    height: 380px;
  }
}

/* ──────────────────────────────────────────
   DESKTOP  (≥ 1024px)
   ────────────────────────────────────────── */
@media (min-width: 1024px) {
  .section,
  .nosotros,
  .para-quien,
  .servicios,
  .trabajos,
  .quienes,
  .iberoamerica,
  .faq {
    padding-block: var(--space-2xl);
  }

  .hero {
    min-height: 100vh;
  }

  /* 3 columnas en cards */
  .para-quien__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .servicios__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ──────────────────────────────────────────
   LARGE DESKTOP  (≥ 1440px)
   ────────────────────────────────────────── */
@media (min-width: 1440px) {
  :root {
    --max-width: 1320px;
  }

  body {
    font-size: 18px;
  }

  .hero__content {
    max-width: 900px;
  }

  .hero__title {
    font-size: 4.5rem;
  }

  .trabajos__slide {
    flex: 0 0 380px;
    height: 480px;
  }
}

/* ──────────────────────────────────────────
   ACCESIBILIDAD — Movimiento reducido
   ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ──────────────────────────────────────────
   TOUCH — Quitar hovers en dispositivos táctiles
   ────────────────────────────────────────── */
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .btn--primary:hover {
    transform: none;
    box-shadow: none;
  }

  .btn--white:hover {
    transform: none;
    box-shadow: none;
  }

  .servicio-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* ──────────────────────────────────────────
   LANDSCAPE MOBILE — Ajustes para móvil apaisado
   ────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: var(--space-lg);
  }

  .hero__content {
    padding: var(--space-md);
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    margin-bottom: var(--space-sm);
  }

  .divider-img {
    height: 150px;
  }
}
