/* ============================================================
   we are yoga — capa MÓVIL (compartida por ES + EN)
   Se enlaza desde index.html e index-en.html DESPUÉS de styles.css.
   Todo lo específico de móvil vive aquí para que ambas versiones
   (español e inglés) se actualicen a la vez.
   Breakpoint principal: <= 760px
   ============================================================ */

/* ---------- Botón hamburguesa + menú (inyectados por mobile-nav.js) ---------- */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
}
.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--ink);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .2s;
}
body.menu-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
body.menu-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--bg-2);
  padding: 96px clamp(24px, 8vw, 48px) 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.7,.2,1);
  overflow-y: auto;
}
body.menu-open .mobile-menu { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a.m-link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 8vw, 40px);
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.m-link:last-of-type { border-bottom: none; }
.mobile-menu .m-foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mobile-menu .m-lang { display: inline-flex; gap: 8px; }
.mobile-menu .m-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  text-transform: lowercase;
}
.mobile-menu .m-lang a.active { background: var(--rebel); color: var(--ink); border-color: var(--rebel); }
.mobile-menu .cta-pill { font-size: 15px; padding: 13px 22px; }

/* ============================================================
   <= 760px  ·  layout de teléfono
   ============================================================ */
@media (max-width: 760px) {

  /* Ritmo general más compacto */
  html { scrollbar-gutter: stable; }
  body { --gutter: 20px; --section: 60px; }

  /* Aumentar padding en títulos y contenido de texto */
  section h1, section h2, section h3, section h4, section h5, section h6 { padding-left: 16px; padding-right: 16px; }
  section p, section li { padding-left: 16px; padding-right: 16px; }
  .hero-title { padding-left: 16px; padding-right: 16px; }
  .display { padding-left: 16px; padding-right: 16px; }
  .lede { padding-left: 16px; padding-right: 16px; }

  /* ---------- Cabecera ---------- */
  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: none;
    column-gap: 10px !important;
    gap: 10px !important;
    padding: 14px 18px 16px !important;
    width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
    background: var(--bg);
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
  }
  .topbar > * { pointer-events: auto; }
  .brand-mark {
    width: 54px;
    height: 54px;
    font-size: 9.5px;
    line-height: 1.02;
    flex-shrink: 0;
  }
  .brand-mark span { position: relative; }
  .brand-mark .dot { position: absolute; left: 100%; bottom: 2px; width: 2px; height: 2px; background: var(--rebel); margin-left: 1px; }
  .nav { display: none; }
  .topbar-right { margin-right: 0 !important; gap: 10px; flex-shrink: 0; display: flex; align-items: center; }
  .topbar-right .cta-pill { padding: 9px 15px; font-size: 12px; flex-shrink: 0; }
  .mobile-nav-toggle { display: inline-flex; flex-shrink: 0; }

  /* ---------- Promo banner ---------- */
  .promo-banner { margin-top: 92px; padding-inline: 16px; }
  .promo-banner--highlight { margin-top: 96px; }
  .promo-banner--highlight .container { max-width: 100%; overflow: hidden; }
  .promo-banner h2 { font-size: clamp(22px, 7vw, 30px); white-space: normal; word-break: break-word; line-height: 1.2; }
  .promo-banner h2 .price-unit { display: inline-block; font-size: 0.42em; margin-left: 4px; }

  /* ---------- Hero ---------- */
  .hero { min-height: auto; padding-bottom: 24px; }
  .hero-title-row { grid-template-columns: 1fr; margin-bottom: 28px; padding-top: 4px; }
  .hero-title { font-size: clamp(40px, 13vw, 60px); }
  .hero-stage { min-height: 380px; }
  .hero-figure-wrap { width: min(74vw, 320px); }
  .hero-meta { grid-template-columns: 1fr; gap: 20px; text-align: left; }
  .hero-meta .right,
  .hero-meta .right p { text-align: left; margin-left: 0; }
  .hero-meta p { max-width: none; white-space: normal !important; }

  /* ---------- Próxima clase ---------- */
  #proxima-clase .container > div,
  [data-screen-label="proxima-clase"] .container > div { gap: 16px !important; }

  /* ---------- Section heads ---------- */
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .section-head .lede { margin-top: 8px !important; }

  /* ---------- Horario semanal: scroll horizontal ---------- */
  .week-grid {
    grid-template-columns: 46px repeat(7, 78px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .week-grid > div { min-height: 54px; }

  /* ---------- Profesores ---------- */
  .teachers { grid-template-columns: 1fr 1fr; gap: 18px; }

  /* ---------- Galería ---------- */
  .gallery.bento, .gallery.uniform, .gallery.masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 42vw;
  }

  /* ---------- Precios: aplanar cualquier grid en línea ---------- */
  #precios .pricing,
  #precios .pricing-sub { grid-template-columns: 1fr !important; }
  #precios [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #precios [style*="flex-direction: row"],
  #precios .price-card[style*="row"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  #precios [style*="border-left"] {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 4px;
  }
  #precios .price-card .cta-pill { width: 100%; justify-content: center; margin-top: 18px; }

  /* ---------- Aplanar grids en línea del resto de secciones ---------- */
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Mapa / contacto en reservar */
  #reservar [style*="aspect-ratio"] { aspect-ratio: 4/3; }

  /* ---------- Footer ---------- */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-newsletter { grid-column: 1 / -1; }
  .footer-mega { font-size: clamp(88px, 30vw, 150px) !important; }
  .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
    text-align: left !important;
  }
  .footer-bottom .left,
  .footer-bottom .center,
  .footer-bottom .right { text-align: left !important; }

  /* Marquee: optimizar para móvil */
  .marquee { width: 100%; overflow: hidden; }
  .marquee-track { flex-shrink: 0; width: auto; max-width: 100%; }
  .marquee span { font-size: clamp(20px, 6vw, 28px); }
}

/* ---------- Teléfonos estrechos ---------- */
@media (max-width: 460px) {
  .teachers { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-right .cta-pill span,
  .topbar-right .cta-pill { font-size: 12px; }
}
