/* MOBILE OPTIMIZATION — Tu Camino del Artista (2026-06-24)
 * Fixes:
 * 1. Header compacto en móvil <640px
 * 2. Sticky CTA bar abajo con "Quiero inscribirme"
 * 3. Hero más compacto
 */

/* === HEADER MÓVIL <640px === */
@media (max-width: 640px) {
  /* Logo: solo dots, sin texto */
  .site-header .header-logo {
    font-size: 0 !important;           /* oculta el texto */
    gap: 0 !important;
    flex-shrink: 0;
  }
  .site-header .header-logo .logo-dots {
    gap: 3px !important;
  }
  .site-header .header-logo .logo-dots span {
    width: 7px !important;
    height: 7px !important;
  }

  /* Ocultar links secundarios en header — los movemos al sticky bar */
  .site-header .header-right > a[href="#descargar-pdf"],
  .site-header .header-right > a[href*="generador-cita"],
  .site-header .header-right > a[href="/blog/"],
  .site-header .header-right > a.blog-link {
    display: none !important;
  }

  /* Inscribirme: más pequeño pero VISIBLE entero */
  .site-header .header-right > a#registerBtn {
    font-size: .68rem !important;
    padding: 7px 12px !important;
    margin-right: 6px !important;
    letter-spacing: .04em !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Lang switcher: compacto sin nombre */
  .site-header .tca-lang-btn {
    padding: 5px 8px !important;
    font-size: 0 !important;           /* oculta "Español" */
    gap: 2px !important;
  }
  .site-header .tca-lang-btn .tca-flag {
    font-size: 1.1rem !important;       /* mantiene la bandera grande */
  }
  .site-header .tca-lang-btn .tca-caret {
    font-size: .55rem !important;
  }

  /* Header right gap más pequeño */
  .site-header .header-right {
    gap: 6px !important;
  }

  /* Login button: solo icono */
  .site-header .login-btn {
    padding: 6px 10px !important;
    font-size: 0 !important;
  }
  .site-header .login-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* User pill compacto cuando logueado */
  .site-header .user-pill {
    gap: 6px !important;
    font-size: 0 !important;
  }
  .site-header .user-name,
  .site-header .user-pill .logout-link {
    display: none !important;
  }
  .site-header .user-avatar {
    width: 28px !important;
    height: 28px !important;
  }
}

/* === HERO MÁS COMPACTO EN MÓVIL === */
@media (max-width: 640px) {
  .hero {
    min-height: 75vh !important;       /* en vez de 100vh */
    padding: 80px 20px 40px !important;
  }
  .hero-label {
    font-size: .58rem !important;
    margin-bottom: 22px !important;
    letter-spacing: .22em !important;
  }
  .word-row {
    font-size: clamp(2.6rem, 14vw, 4.2rem) !important;
    line-height: 1.0 !important;
  }
  .hero-subtitle {
    font-size: .9rem !important;
    margin-top: 22px !important;
    margin-bottom: 10px !important;
  }
  .hero-author {
    font-size: .58rem !important;
  }
  .hero-cta {
    margin-top: 28px !important;
  }
  .scroll-hint {
    margin-top: 28px !important;
  }
}

/* === STICKY MOBILE CTA BAR === */
.tca-sticky-cta {
  display: none;
}
@media (max-width: 768px) {
  .tca-sticky-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(0);
    transition: transform .3s ease, opacity .3s ease;
    opacity: 1;
    align-items: center;
    gap: 10px;
  }
  .tca-sticky-cta.hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
  }
  .tca-sticky-cta-btn {
    flex: 1;
    font-family: 'Anton', sans-serif;
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: #111;
    padding: 14px 18px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform .15s ease;
  }
  .tca-sticky-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #5bb85a, #3a7fc1, #7b4fa6, #d94040, #e8832a, #f0c030);
    transform: translateX(-100%);
    transition: transform .4s ease;
    z-index: 0;
  }
  .tca-sticky-cta-btn:active::before {
    transform: translateX(0);
  }
  .tca-sticky-cta-btn:active {
    transform: scale(.97);
  }
  .tca-sticky-cta-btn span {
    position: relative;
    z-index: 1;
  }
  /* Padding al final del body para que el sticky no tape contenido */
  body {
    padding-bottom: 76px;
  }
  body.tca-cta-hidden {
    padding-bottom: 0;
  }
}

/* === GENERAL MOBILE TWEAKS === */
@media (max-width: 640px) {
  /* Botones principales más grandes y tap-friendly */
  .btn {
    padding: 14px 32px !important;
    font-size: .88rem !important;
  }
  /* Reducir padding lateral excesivo en secciones */
  .intro {
    padding: 70px 24px !important;
  }
  .weeks-section {
    padding: 70px 20px !important;
  }
  .practices {
    padding: 0 20px 70px !important;
  }
  .inscripcion-section {
    padding: 80px 24px !important;
  }
  /* Modal forms más cómodos en móvil */
  .modal-header {
    padding: 30px 24px 24px !important;
  }
  .modal-body {
    padding: 26px 24px 30px !important;
  }
  .field input,
  .field textarea,
  .field select {
    font-size: 16px !important;  /* prevent iOS zoom-in */
    padding: 12px 14px !important;
  }
}
