/* ============================================================
   Juan Carlos Giménez — Sistema de Nutrición de Alto Rendimiento
   Design System | v2.0 — Rebuild completo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700;900&family=Lora:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ── TYPOGRAPHY VARIANTS (comentario de referencia) ──────────
   1.  Inter / Playfair Display
   2.  Outfit / Lora  ← ACTIVA
   3.  Montserrat / Merriweather
   4.  Roboto Condensed / Crimson Pro
   5.  Syncopate / EB Garamond
   6.  Bebas Neue / Source Serif Pro
   7.  Syne / Fraunces
   8.  Space Grotesk / Spectral
   9.  Lexend / Libre Baskerville
   10. Archivo Black / Cormorant Garamond
   ─────────────────────────────────────────────────────────── */

/* ── CSS VARIABLES — DARK MODE (default) ─────────────────── */
:root {
  --bg:            #0f0b1a;
  --bg-secondary:  #140e22;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --bg-nav:        rgba(15,11,26,0.88);
  --bg-input:      #111118;
  --text:          #f5f5f7;
  --text-muted:    #a1a1a6;
  --text-subtle:   #55556a;
  --primary:       #5d2e8e;
  --primary-light: #7b4eb2;
  --primary-dark:  #3a1c5d;
  --accent:        #d4af37;
  --accent-light:  #f1d57d;
  --accent-dark:   #aa8c2c;
  --border:        rgba(212,175,55,0.15);
  --border-card:   rgba(255,255,255,0.07);
  --border-input:  #2a2a3a;
  --shadow-gold:   0 0 40px rgba(212,175,55,0.25);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.3);
  --overlay:       rgba(15,11,26,0.88);
  --overlay-light: rgba(15,11,26,0.55);
  --font-heading:  'Outfit', sans-serif;
  --font-body:     'Lora', serif;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --transition:    0.65s var(--ease);
  --fast:          0.3s ease;
  --container:     1200px;
  --section-pad:   110px 5%;
}

/* ── CSS VARIABLES — LIGHT MODE override ─────────────────── */
[data-theme="light"] {
  --bg:            #faf8ff;
  --bg-secondary:  #f0eafa;
  --bg-card:       #ffffff;
  --bg-card-hover: #f5f0ff;
  --bg-nav:        rgba(250,248,255,0.93);
  --bg-input:      #f5f0ff;
  --text:          #1a0d2e;
  --text-muted:    #6b6b8a;
  --text-subtle:   #9b8abf;
  --accent:        #8b6914;
  --accent-light:  #b8942e;
  --accent-dark:   #5e4509;
  --border:        rgba(93,46,142,0.15);
  --border-card:   rgba(93,46,142,0.10);
  --border-input:  rgba(93,46,142,0.2);
  --shadow-gold:   0 0 40px rgba(139,105,20,0.18);
  --shadow-card:   0 4px 20px rgba(93,46,142,0.08);
  --overlay:       rgba(250,248,255,0.82);
  --overlay-light: rgba(250,248,255,0.5);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-heading); border: none; }

/* ── NAVIGATION ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1010;
  padding: 16px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

nav.scrolled {
  padding: 12px 5%;
  box-shadow: 0 4px 30px rgba(0,0,0,0.25);
}

.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 2px;
  color: var(--text);
  transition: color var(--fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--fast);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

/* Mobile hamburger */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  padding: 4px;
  z-index: 1001;
}

/* Nav controls (lang + theme) */
.nav-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.lang-btn {
  background: var(--primary);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  transition: var(--fast);
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--accent);
  color: var(--primary-dark);
}

/* Theme toggle switch */
.theme-toggle {
  width: 50px;
  height: 28px;
  border-radius: 14px;
  background: var(--primary);
  border: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  padding: 3px;
  transition: background var(--fast), border-color var(--fast), box-shadow var(--fast);
  position: relative;
  box-shadow: 0 0 0 0 rgba(93,46,142,0);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(93,46,142,0.4);
}

.toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

[data-theme="light"] .theme-toggle {
  background: #5d2e8e;
  border-color: #7b4eb2;
  box-shadow: 0 2px 8px rgba(93,46,142,0.35);
}
[data-theme="light"] .toggle-thumb {
  transform: translateX(22px);
  background: #f1d57d;
}

/* Lang buttons — light mode: texto blanco para máximo contraste */
[data-theme="light"] .lang-btn {
  color: #ffffff;
  border: 2px solid #7b4eb2;
  box-shadow: 0 2px 10px rgba(93,46,142,0.28);
}
[data-theme="light"] .lang-btn:hover,
[data-theme="light"] .lang-btn.active {
  background: #3a1c5d;
  color: #f1d57d;
  border-color: #3a1c5d;
  box-shadow: 0 4px 14px rgba(58,28,93,0.35);
}

/* ── Overlay oscuro detrás del menú móvil ───────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1009;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Mobile nav open state */
@media (max-width: 768px) {
  .nav-overlay { display: block; }

  .nav-mobile-toggle {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1011;
  }

  .nav-links {
    display: flex;
    position: fixed;
    /* Recuadro flotante debajo de la barra de nav */
    top: 72px;
    left: 16px;
    right: 16px;
    bottom: auto;           /* NO ocupa toda la pantalla */
    /* Fondo sólido, sin transparencia */
    background: #0f0b1a;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 12px 0;
    z-index: 1010;
    /* Estado cerrado */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s 0.28s;
  }

  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s 0s;
  }

  .nav-links > li {
    width: 100%;
    text-align: center;
  }

  .nav-links > li > a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #f5f5f7;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links > li:last-child > a,
  .nav-links > li:last-of-type > a { border-bottom: none; }

  .nav-links > li > a:hover {
    color: #d4af37;
    background: rgba(212,175,55,0.07);
  }

  /* Extras: idioma al fondo de la card */
  .nav-mobile-extras {
    width: 100%;
    text-align: center;
    padding: 14px 24px 6px;
    border-top: 1px solid rgba(212,175,55,0.2);
    margin-top: 4px;
  }

  .nav-mobile-langs {
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  .nav-mobile-extras {
    display: list-item;
  }
}

/* Modo claro: recuadro blanco solo cuando el menú móvil está abierto */
[data-theme="light"] .nav-links.open {
  background: #ffffff;
  border-color: rgba(93, 46, 142, 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}
[data-theme="light"] .nav-links > li > a {
  color: #1a0d2e;
  border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-links > li > a:hover {
  color: #5d2e8e;
  background: rgba(93,46,142,0.06);
}

/* Ocultar extras del menú en escritorio */
.nav-mobile-extras { display: none; list-style: none; }

/* JotForm: fondo mientras carga para evitar hueco negro */
.jotform-wrap {
  background: var(--bg-card);
  border-radius: 16px;
  min-height: 200px;
}

/* ── SHARED: SECTION TITLE ────────────────────────────────── */
.section-title {
  text-align: center;
  margin-bottom: 64px;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title p {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
  display: block;
}

/* ── SHARED: BUTTONS ──────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 14px 36px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  border: none;
  transition: var(--fast);
  box-shadow: 0 8px 28px rgba(212,175,55,0.3);
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(212,175,55,0.5);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 8px 28px rgba(139,105,20,0.25);
}

.btn-outline-variant {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.btn-outline-variant:hover {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: 0 10px 28px rgba(212,175,55,0.3);
}

/* ── SCROLL REVEAL ────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
[data-reveal="bottom"] { transform: translateY(50px); }
[data-reveal="top"]    { transform: translateY(-50px); }
[data-reveal="left"]   { transform: translateX(-50px); }
[data-reveal="right"]  { transform: translateX(50px); }
[data-reveal].revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 110px 5% 70px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15,11,26,0.88) 0%, rgba(20,14,34,0.78) 100%),
    url('gourmet_healthy_food_1_1775665324675.png') center / cover no-repeat;
  /* Fijar colores de texto siempre claros, independiente del tema */
  --text:       #f5f5f7;
  --text-muted: #a1a1a6;
  --accent:     #d4af37;
  --accent-light: #f1d57d;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(93,46,142,0.1) 100%);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
  pointer-events: none;
}

/* Decorative radial glow */
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(93,46,142,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 2;
  padding-right: 40px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(0.82rem, 1.5vw, 1.05rem);
  letter-spacing: 6px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 900;
  margin-bottom: 22px;
  text-shadow: 0 0 18px rgba(212,175,55,0.45);
  position: relative;
  padding-bottom: 10px;
}
.hero-eyebrow::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
}

.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 24px;
  color: var(--text);
  animation: heroBreathe 5s ease-in-out infinite;
}

@keyframes heroBreathe {
  0%, 100% { transform: scale(1);     text-shadow: none; }
  50%       { transform: scale(1.014); text-shadow: 0 2px 60px rgba(212,175,55,0.22); }
}

.hero h1 .accent {
  display: block;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-light) 40%,
    #fffdf0 50%,
    var(--accent-light) 60%,
    var(--accent) 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: accentShimmer 4s ease-in-out infinite;
}

@keyframes accentShimmer {
  0%   { background-position: 100% center; }
  50%  { background-position: 0%   center; }
  100% { background-position: 100% center; }
}

.hero-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Hero image side */
.hero-image-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-image-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.hero-image-inner img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 40px rgba(212,175,55,0.35)) drop-shadow(0 0 80px rgba(93,46,142,0.25));
}

.hero-image-badge {
  position: absolute;
  top: 24px;
  right: -12px;
  background: var(--accent);
  color: var(--primary-dark);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(212,175,55,0.4);
}

/* ── ABOUT ────────────────────────────────────────────────── */
.about-section {
  padding: var(--section-pad);
  background: var(--bg-secondary);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image-wrap img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  /* drop-shadow sigue el contorno del PNG transparente */
  filter:
    drop-shadow(0 0 28px rgba(212,175,55,0.2))
    drop-shadow(0 20px 44px rgba(0,0,0,0.5))
    drop-shadow(3px 6px 14px rgba(0,0,0,0.35));
}

.about-image-wrap::before { display: none; }

.about-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--text);
  margin-bottom: 20px;
}

.about-bio {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ── Bio expandible ──────────────────────────────────────── */
.about-bio-wrap {
  position: relative;
  margin-bottom: 6px;
}

.about-bio-text {
  max-height: 175px;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-bio-text.expanded {
  max-height: 1400px;
}

.about-bio-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-secondary));
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.about-bio-fade.hidden {
  opacity: 0;
}

.about-bio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  margin-bottom: 28px;
  transition: background 0.22s, color 0.22s;
}

.about-bio-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.about-bio-btn i {
  transition: transform 0.38s ease;
}

.about-bio-btn.open i {
  transform: rotate(180deg);
}

.credentials {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.credentials li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.credentials li i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Credencial destacada — Entrenador experto */
.credentials li.cred-highlight {
  background: linear-gradient(135deg, rgba(212,175,55,0.12) 0%, rgba(93,46,142,0.10) 100%);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 12px;
  padding: 10px 16px;
  margin: 0 -4px;
  color: var(--text);
}
.credentials li.cred-highlight i {
  color: var(--accent);
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.6));
}
.credentials li.cred-highlight span {
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  font-size: 0.95rem;
}
[data-theme="light"] .credentials li.cred-highlight {
  background: linear-gradient(135deg, rgba(139,105,20,0.08) 0%, rgba(93,46,142,0.06) 100%);
  border-color: rgba(139,105,20,0.3);
}

/* ── LEVELS SECTION ───────────────────────────────────────── */
.levels-section {
  padding: var(--section-pad);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.levels-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('Material/dieta1.jpg') center/cover no-repeat;
  opacity: 0.03;
  pointer-events: none;
}

/* ── Tagline animada ─────────────────────────────────────── */
.levels-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted);
  display: inline-block;
  position: relative;
  margin-bottom: 32px;
}

.levels-tagline::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%; transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.levels-tagline.underlined::after { width: 100%; }

/* ── Step track ──────────────────────────────────────────── */
.level-step-track {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 56px;
}

.lst-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--border-card);
  border: 2px solid var(--border-card);
  position: relative; z-index: 1;
  transition: background 0.35s, border-color 0.35s, transform 0.35s, box-shadow 0.35s;
}

.lst-dot.lit {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.45);
  box-shadow: 0 0 12px rgba(212,175,55,0.6);
}

.lst-line {
  width: 56px; height: 2px;
  background: var(--border-card);
  position: relative; overflow: hidden;
}

.lst-line::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}

.lst-line.lit::after { transform: scaleX(1); }

/* ── Grid 3 arriba + 2 abajo ─────────────────────────────── */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
}

.levels-grid .level-card:nth-child(1),
.levels-grid .level-card:nth-child(2),
.levels-grid .level-card:nth-child(3) { grid-column: span 2; }

.levels-grid .level-card:nth-child(4),
.levels-grid .level-card:nth-child(5) { grid-column: span 3; }

/* Stagger de entrada */
.levels-grid .level-card:nth-child(1) { transition-delay: 0ms; }
.levels-grid .level-card:nth-child(2) { transition-delay: 110ms; }
.levels-grid .level-card:nth-child(3) { transition-delay: 220ms; }
.levels-grid .level-card:nth-child(4) { transition-delay: 330ms; }
.levels-grid .level-card:nth-child(5) { transition-delay: 440ms; }

/* ── Card base ───────────────────────────────────────────── */
.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 24px 22px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--fast), background var(--fast),
              transform 0.15s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.level-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 48px rgba(212,175,55,0.13);
}

/* Badge NIVEL X — arriba derecha */
.level-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(212,175,55,0.11);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 2.5px;
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid rgba(212,175,55,0.28);
}

[data-theme="light"] .level-badge {
  background: rgba(139,105,20,0.09);
  border-color: rgba(139,105,20,0.24);
  color: #8b6914;
}

/* Número grande — oculto */
.level-number { display: none; }

/* Fila icono + títulos */
.level-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

/* Círculo dorado con icono */
.level-icon-circle {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(212,175,55,0.12);
  border: 2px solid rgba(212,175,55,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  transition: background 0.28s, transform 0.28s;
}

.level-card:hover .level-icon-circle {
  background: rgba(212,175,55,0.22);
  transform: scale(1.1) rotate(-5deg);
}

[data-theme="light"] .level-icon-circle {
  background: rgba(139,105,20,0.1);
  border-color: rgba(139,105,20,0.26);
  color: #8b6914;
}

.level-titles { min-width: 0; }

.level-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.2;
}

.level-objective {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
}

[data-theme="light"] .level-objective { color: #8b6914; }

.level-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-subtle);
  line-height: 1.65;
  margin-bottom: 18px;
  flex: 1;
}

/* Barra de adherencia */
.adherence-bar-wrap {
  background: var(--border-card);
  border-radius: 20px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  margin-top: auto;
}

.adherence-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  width: 0;
  transition: width 1.4s var(--ease);
}

/* Footer adherencia */
.adherence-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.adh-text {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.adh-pct {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ── QUOTE DIVIDER ────────────────────────────────────────── */
.quote-divider {
  min-height: 400px;
  background:
    linear-gradient(rgba(15,11,26,0.65), rgba(93,46,142,0.38), rgba(15,11,26,0.88)),
    url('fitness_athlete_female_1775665298393.png') center/cover fixed no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 10%;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.quote-wrap {
  max-width: 820px;
  margin: 0;
  padding: 0;
  border: none;
}

.quote-body { margin: 0; padding: 0; border: none; }

/* Línea 1 — las palabras se revelan una a una */
.q-line1 {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  color: #ffffff;
  line-height: 1.75;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 32px rgba(0,0,0,0.95);
}

/* Cada palabra de la línea 1 */
.q-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.q-word.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Línea 2 — aparece de golpe, gold vivo, grande */
.q-line2 {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f0c040;
  text-shadow: 0 2px 28px rgba(0,0,0,0.9);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease, transform 0.75s ease;
  position: relative;
  padding-bottom: 14px;
}

.q-line2.visible {
  opacity: 1;
  transform: translateY(0);
  animation: quote-breathe 7s ease-in-out 0.5s infinite alternate;
}

/* Línea dorada debajo del lema */
.q-line2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #f0c040, transparent);
  transition: width 1s ease 0.4s;
}

.q-line2.visible::after { width: 70%; }

@keyframes quote-breathe {
  0%   { text-shadow: 0 2px 28px rgba(0,0,0,0.9), 0 0 12px rgba(240,192,64,0.15); }
  100% { text-shadow: 0 2px 28px rgba(0,0,0,0.9), 0 0 50px rgba(240,192,64,0.50), 0 0 100px rgba(240,192,64,0.12); }
}

/* ── PRICING SECTION ──────────────────────────────────────── */
.pricing-section {
  padding: var(--section-pad);
  background:
    linear-gradient(var(--overlay), var(--overlay)),
    url('gourmet_healthy_food_1_1775665324675.png') center/cover fixed no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Pricing mode toggle ─────────────────────────────────── */
.pricing-toggle {
  position: relative;
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 50px;
  padding: 5px;
  margin: 0 auto 48px;
}

.ptoggle-btn {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 30px;
  border-radius: 50px;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.ptoggle-btn.active { color: var(--primary-dark); }

.ptoggle-slider {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  background: var(--accent);
  border-radius: 50px;
  transition: transform 0.38s cubic-bezier(0.22,1,0.36,1), width 0.38s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
}

/* Grid wrapper show/hide */
.pricing-grid-wrap {
  width: 100%;
  transition: opacity 0.35s ease;
}
.pricing-grid-wrap.grid-hidden { display: none; }

/* Plan tagline */
.plan-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: -8px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 36px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--fast), box-shadow var(--fast);
  position: relative;
}

.pricing-card:hover { transform: translateY(-10px); }

.pricing-card h3 {
  font-size: 1.1rem;
  color: var(--text);
}

.price-tag {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.price-period {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: -10px;
}

.pricing-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-card ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pricing-card ul li i {
  color: var(--accent);
  font-size: 0.7rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ── Línea destacada "Incluye Plan Premium completo" ─────── */
.pricing-card li.li-highlight {
  background: linear-gradient(90deg, rgba(212,175,55,0.12), rgba(212,175,55,0.04));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  color: var(--accent) !important;
}
.pricing-card li.li-highlight i {
  color: var(--accent) !important;
  font-size: 0.8rem;
}

/* ── Offer card — Valoración Inicial ────────────────────── */
.offer-card {
  border-color: rgba(212,175,55,0.3);
}

.offer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  padding: 5px 11px;
  border-radius: 50px;
  align-self: flex-start;
  text-transform: uppercase;
}

.price-offer-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

/* Precio antiguo con tachado animado */
.price-old-wrap {
  position: relative;
  display: inline-block;
}

.price-old-num {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.price-slash {
  position: absolute;
  top: 50%;
  left: -3px; right: -3px;
  height: 2px;
  background: #dc2626;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
}

/* Se activa cuando scroll reveal añade .visible al card */
.offer-card[data-reveal].revealed .price-slash {
  animation: draw-slash 0.5s ease 0.5s forwards;
}

@keyframes draw-slash {
  to { transform: scaleX(1); }
}

/* Precio nuevo — brilla como oferta */
.price-hot {
  position: relative;
}

.offer-card[data-reveal].revealed .price-hot {
  animation: price-pulse 2.8s ease-in-out 1.1s infinite alternate;
}

@keyframes price-pulse {
  0%   { text-shadow: 0 0 6px rgba(212,175,55,0.2); }
  100% { text-shadow: 0 0 22px rgba(212,175,55,0.75), 0 0 40px rgba(212,175,55,0.25); }
}

/* Premium card */
.pricing-card.premium {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-gold);
  animation: pulse-glow 3.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 25px rgba(212,175,55,0.18); }
  50%       { box-shadow: 0 0 55px rgba(212,175,55,0.42); }
}

[data-theme="light"] .pricing-card.premium {
  animation: pulse-glow-light 3.5s ease-in-out infinite;
}

@keyframes pulse-glow-light {
  0%, 100% { box-shadow: 0 0 20px rgba(139,105,20,0.15); }
  50%       { box-shadow: 0 0 45px rgba(139,105,20,0.35); }
}

.premium-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary-dark);
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── COURSE SECTION ───────────────────────────────────────── */
.course-section {
  padding: var(--section-pad);
  background: var(--bg-secondary);
}

.course-objective {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: -30px auto 60px;
  text-align: center;
  line-height: 1.7;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--fast), transform var(--fast), background var(--fast);
}

.module-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-5px);
}

.module-num {
  position: absolute;
  top: 12px; right: 16px;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(212,175,55,0.07);
  line-height: 1;
  user-select: none;
}

[data-theme="light"] .module-num {
  color: rgba(93,46,142,0.07);
}

.module-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 12px;
  padding-right: 36px;
}

.module-card p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── FOOTER & CONTACT ─────────────────────────────────────── */
footer {
  padding: 80px 5% 40px;
  background: #000;
  border-top: 2px solid var(--primary);
}

[data-theme="light"] footer {
  background: var(--bg-secondary);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 56px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.footer-info h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: 16px;
}

.footer-info p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-logo {
  height: 46px;
  width: auto;
  margin-bottom: 28px;
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 18px;
  margin-top: 30px;
}

.social-links a {
  font-size: 1.5rem;
  color: var(--accent);
  transition: var(--fast);
  display: inline-flex;
  align-items: center;
}

.social-links a:hover {
  color: var(--accent-light);
  transform: translateY(-4px);
}

/* Contact form — floating labels */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 22px 18px 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--fast), box-shadow var(--fast);
  outline: none;
  -webkit-appearance: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group label {
  position: absolute;
  top: 15px; left: 19px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: 6px;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.form-status {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: #25d366;
  letter-spacing: 1px;
  min-height: 20px;
}

/* JotForm embed */
.jotform-wrap {
  width: 100%;
  position: relative; /* necesario para el cover absoluto */
}

.jotform-wrap iframe {
  width: 100%;
  height: 620px;
  border: none;
  border-radius: 16px;
  background: transparent;
  display: block;
}

/* Tapa la barra de branding de JotForm */
.jotform-cover {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 58px;
  z-index: 2;
  pointer-events: none;
  border-radius: 0 0 16px 16px;
  background: #000; /* mismo que footer dark */
}
[data-theme="light"] .jotform-cover {
  background: var(--bg-secondary); /* mismo que footer light */
}

/* Footer bottom — redes + copyright */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

[data-theme="light"] .footer-bottom {
  border-top-color: var(--border);
}

.footer-bottom .social-links {
  margin-top: 0;
}

.footer-bottom p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-subtle);
  text-align: center;
}

/* ── FLOATING ACTIONS ─────────────────────────────────────── */
.floating-actions {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 900;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 6px 22px rgba(0,0,0,0.3);
  transition: transform var(--fast), box-shadow var(--fast);
  border: none;
}

.float-btn:hover { transform: scale(1.12); }

.whatsapp-btn {
  background: #25d366;
  color: #fff;
}

.back-to-top {
  background: var(--accent);
  color: var(--primary-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fast), transform var(--fast);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── RESPONSIVE — TABLET ≤1024px ──────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad: 80px 5%; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 130px 5% 70px;
  }
  .hero::before, .hero::after { display: none; }
  .hero-text { padding-right: 0; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-stats { justify-content: center; }
  .hero-image-wrap { display: none; }

  .about-section {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .about-image-wrap { max-width: 380px; margin: 0 auto; }
  .about-image-wrap::before { display: none; }
  .credentials { align-items: flex-start; text-align: left; }

  /* Tablet: 2 columnas iguales */
  .levels-grid { grid-template-columns: 1fr 1fr; }
  .levels-grid .level-card:nth-child(n) { grid-column: span 1; }
  .levels-grid .level-card:nth-child(5) { grid-column: span 2; }

  .bento-grid { grid-template-columns: 1fr 1fr; }
  .pricing-toggle { width: 100%; max-width: 320px; }
  .ptoggle-btn {
    flex: 1;
    justify-content: center;
    padding: 9px 14px;
    font-size: 0.68rem;
    letter-spacing: 0.8px;
    gap: 5px;
  }
  .ptoggle-btn i { font-size: 0.75rem; }

  .how-grid { grid-template-columns: 1fr; }

  .footer-grid { gap: 32px; }
  .footer-info p { max-width: 100%; }
}

/* ── RESPONSIVE — MOBILE ≤768px ───────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad: 64px 5%; }

  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 1.8rem; }

  /* Móvil: 1 columna */
  .levels-grid { grid-template-columns: 1fr; }
  .levels-grid .level-card:nth-child(n) { grid-column: span 1; }
  .lst-line { width: 36px; }

  .bento-grid { grid-template-columns: 1fr; }

  .modules-grid { grid-template-columns: 1fr 1fr; }

  .quote-divider { background-attachment: scroll; }
  .pricing-section { background-attachment: scroll; }

  .pricing-toggle { width: 100%; max-width: 280px; }
  .ptoggle-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    gap: 4px;
  }
  .ptoggle-btn i { display: none; }  /* quita icono en móvil pequeño */

  /* ¿Cómo funciona? — móvil */
  .how-grid {
    grid-template-columns: 1fr;  /* step 01 ocupa todo el ancho */
    gap: 20px;
  }
  .how-card-main {
    padding: 28px 22px;          /* espacio generoso para el formulario */
  }
  .how-steps-rest {
    flex-direction: row;         /* pasos 02-04 en fila horizontal */
    gap: 12px;
  }
  .how-steps-rest .how-card {
    flex: 1;
    min-width: 0;
    padding: 20px 14px;
  }
  .how-steps-rest .how-step-header { gap: 8px; margin-bottom: 8px; }
  .how-steps-rest .how-num { font-size: 2rem; }
  .how-steps-rest .how-title { font-size: 0.85rem; letter-spacing: 0.5px; }
  .how-steps-rest .how-desc { font-size: 0.8rem; line-height: 1.5; }
  .how-steps-rest .how-icon-circle { width: 34px; height: 34px; font-size: 0.8rem; }

  /* Inputs más cómodos en móvil */
  .how-input { padding: 15px 16px; font-size: 0.92rem; min-height: 50px; }
  .how-form { gap: 14px; }

  .floating-actions { bottom: 18px; right: 18px; }
  .float-btn { width: 50px; height: 50px; font-size: 1.2rem; }
}

/* ── MOBILE SMALL ≤480px ──────────────────────────────────── */
@media (max-width: 480px) {
  nav { padding: 14px 4%; }
  .nav-logo img { height: 36px; }
  .lang-btn { padding: 3px 7px; font-size: 0.65rem; }
  .theme-toggle { width: 38px; height: 22px; }
  .toggle-thumb { width: 14px; height: 14px; }
  [data-theme="light"] .toggle-thumb { transform: translateX(16px); }

  /* En pantallas muy pequeñas, los pasos 02-04 vuelven a columna */
  .how-steps-rest { flex-direction: column; }
  .how-steps-rest .how-card { padding: 18px 16px; }
}

/* ══════════════════════════════════════════════════════════
   MICRO-INTERACCIONES — los elementos reaccionan al hover
══════════════════════════════════════════════════════════ */

/* ── Shimmer en botones primarios ─────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.28) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 0s;
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 135%;
  transition: left 0.55s ease;
}

/* ── Nav links: flota + estira letra-spacing ──────────────── */
.nav-links a {
  transition: color var(--fast), letter-spacing var(--fast), transform var(--fast);
}
.nav-links a:hover {
  transform: translateY(-2px);
  letter-spacing: 2.5px;
}

/* ── Logo: suave escala al hover ──────────────────────────── */
.nav-logo a {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}
.nav-logo a:hover {
  transform: scale(1.06);
}

/* ── Lang buttons: pop (encoge → crece) ──────────────────── */
.lang-btn {
  transition: background var(--fast), color var(--fast), transform 0.18s var(--ease);
}
.lang-btn:hover {
  transform: scale(1.12);
}
.lang-btn:active {
  transform: scale(0.92);
}

/* ── Theme toggle: rebota al hacer clic ───────────────────── */
.theme-toggle {
  transition: background var(--fast), transform 0.2s var(--ease);
}
.theme-toggle:hover {
  transform: scale(1.1);
}
.theme-toggle:active {
  transform: scale(0.9);
}

/* ── Level cards: flotan suavemente al hover ──────────────── */
@keyframes float-card {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  50%       { box-shadow: 0 18px 36px rgba(212,175,55,0.18); }
}
.level-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  animation: float-card 1.8s ease-in-out infinite;
}

/* ── Module cards: crecen con sombra dorada ───────────────── */
.module-card {
  transition: border-color var(--fast), transform var(--fast),
              background var(--fast), box-shadow var(--fast);
}
.module-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 12px 32px rgba(212,175,55,0.12);
}

/* ── Pricing cards: lift + sombra profunda ────────────────── */
.pricing-card {
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}
.pricing-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.25);
}
.pricing-card.premium:hover {
  transform: translateY(-12px) scale(1.02);
}

/* ── Social icons: bailan (wiggle) al hover ───────────────── */
@keyframes wiggle {
  0%   { transform: rotate(0deg) translateY(0); }
  15%  { transform: rotate(-14deg) translateY(-4px); }
  30%  { transform: rotate(12deg)  translateY(-7px); }
  45%  { transform: rotate(-9deg)  translateY(-4px); }
  60%  { transform: rotate(6deg)   translateY(-2px); }
  75%  { transform: rotate(-3deg)  translateY(-1px); }
  100% { transform: rotate(0deg) translateY(0); }
}
.social-links a {
  transition: color var(--fast);
}
.social-links a:hover i {
  display: inline-block;
  animation: wiggle 0.55s ease forwards;
}

/* ── WhatsApp: ping continuo ──────────────────────────────── */
@keyframes whatsapp-ping {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5), 0 6px 22px rgba(0,0,0,0.3); }
  70%  { box-shadow: 0 0 0 12px rgba(37,211,102,0), 0 6px 22px rgba(0,0,0,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0),   0 6px 22px rgba(0,0,0,0.3); }
}
.whatsapp-btn {
  animation: whatsapp-ping 2.2s ease-out infinite;
}
.whatsapp-btn:hover {
  animation: none;
  transform: scale(1.15) rotate(-8deg);
  box-shadow: 0 10px 30px rgba(37,211,102,0.5);
}

/* ── Back-to-top: flecha salta al hover ───────────────────── */
@keyframes arrow-jump {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-6px); }
  70%       { transform: translateY(-2px); }
}
.back-to-top:hover i {
  display: inline-block;
  animation: arrow-jump 0.45s ease forwards;
}

/* ── Credentials list items: desliza al hover ─────────────── */
.credentials li {
  transition: transform var(--fast), color var(--fast);
}
.credentials li:hover {
  transform: translateX(6px);
  color: var(--text);
}
.credentials li:hover i {
  transform: scale(1.2);
  transition: transform var(--fast);
}

/* ── WHATSAPP CTAs ───────────────────────────────────────── */

/* Botón inline en el hero */
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-wa-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 50px;
  background: #25d366;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}

.btn-wa-inline:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
}

.btn-wa-inline i { font-size: 1.1rem; }

/* ════════════════════════════════════════════════════════════
   ¿CÓMO FUNCIONA?
════════════════════════════════════════════════════════════ */
.how-section {
  padding: var(--section-pad);
  background: linear-gradient(150deg, #1a0833 0%, var(--bg) 40%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Destellos decorativos */
.how-section::before {
  content: '';
  position: absolute;
  top: -120px; left: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(93,46,142,0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.how-section::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.how-section .section-title { width: 100%; }

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  width: 100%;
  align-items: start;
}

/* Cards */
.how-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--fast);
}
.how-card:hover { border-color: rgba(212,175,55,0.3); }

.how-card-main { border-color: rgba(93,46,142,0.35); }

.how-steps-rest {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Número + icono */
.how-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.how-num {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -1px;
}

.how-icon-circle {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(93,46,142,0.25);
  border: 1px solid rgba(93,46,142,0.5);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.how-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.how-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.how-steps-rest .how-desc { margin-bottom: 0; }

/* Form atrezzo */
.how-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.how-input {
  width: 100%;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--fast);
  appearance: none;
  -webkit-appearance: none;
}
.how-input::placeholder { color: var(--text-subtle); }
.how-input:focus { border-color: var(--accent); outline: none; }

[data-theme="light"] .how-input {
  background: rgba(93,46,142,0.06);
  border-color: rgba(93,46,142,0.2);
}

.how-select-wrap {
  position: relative;
}
.how-select-icon {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.75rem;
  pointer-events: none;
}

.how-input option {
  background: #1a0d2e;
  color: var(--text);
}

.how-form-status {
  font-size: 0.82rem;
  min-height: 1em;
  margin: 0;
}

.how-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

/* Tira intermedia */
.wa-cta-strip {
  background: linear-gradient(90deg, #1a0d2e 0%, #2d1457 50%, #1a0d2e 100%);
  border-top: 1px solid rgba(212,175,55,0.2);
  border-bottom: 1px solid rgba(212,175,55,0.2);
  padding: 36px 5%;
}

[data-theme="light"] .wa-cta-strip {
  background: linear-gradient(90deg, #f0eafa 0%, #e4d5f7 50%, #f0eafa 100%);
}

.wa-cta-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.wa-cta-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-cta-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

.wa-cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 900;
  color: #f5f5f7;
  letter-spacing: 1px;
}

[data-theme="light"] .wa-cta-title { color: #1a0d2e; }

.btn-wa-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 50px;
  background: #25d366;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
  box-shadow: 0 4px 24px rgba(37,211,102,0.35);
}

.btn-wa-strip:hover {
  background: #1ebe5d;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37,211,102,0.5);
}

.btn-wa-strip i { font-size: 1.2rem; }

/* CTA final */
.wa-cta-final {
  padding: 90px 5%;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 2px solid var(--primary);
}

.wa-cta-final-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.wa-cta-logo {
  height: 64px;
  width: auto;
  opacity: 0.85;
}

.wa-cta-final-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.wa-cta-final-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
}

.btn-wa-final {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  border-radius: 50px;
  background: #25d366;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 8px;
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
  box-shadow: 0 6px 30px rgba(37,211,102,0.4);
}

.btn-wa-final:hover {
  background: #1ebe5d;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(37,211,102,0.55);
}

.btn-wa-final i { font-size: 1.4rem; }

/* ── LOADER ─────────────────────────────────────────────── */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease;
}

#site-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loader-logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#loader-logo-wrap.hidden {
  opacity: 0;
  pointer-events: none;
}

#loader-logo {
  width: min(300px, 70vw);
  animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(0.978);
  }
  50% {
    opacity: 1;
    transform: scale(1.022);
  }
}

#loader-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#loader-video.active {
  opacity: 1;
}


/* ════════════════════════════════════════════════════════════
   BLOG — Página índice y artículos
════════════════════════════════════════════════════════════ */

/* ── Blog Hero ───────────────────────────────────────────── */
.blog-hero {
  min-height: 38vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 5% 70px;
  position: relative;
  overflow: hidden;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--accent);
  margin-bottom: 14px;
}
.blog-hero p {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
}

/* ── Blog Grid ───────────────────────────────────────────── */
.blog-index {
  padding: var(--section-pad);
  background: var(--bg);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212,175,55,0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.blog-card-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.blog-card-body {
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(93,46,142,0.3);
  color: var(--accent);
  border: 1px solid rgba(93,46,142,0.4);
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}
.blog-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 14px;
}
.blog-card-meta {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-family: var(--font-heading);
}
.blog-read-more {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--fast), color var(--fast);
}
.blog-card:hover .blog-read-more { gap: 10px; }

/* ── Article page ────────────────────────────────────────── */
.art-hero {
  padding: 140px 5% 60px;
  background: linear-gradient(150deg, #1a0833 0%, var(--bg) 55%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.art-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.art-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(93,46,142,0.35);
  color: var(--accent);
  border: 1px solid rgba(93,46,142,0.5);
  margin-bottom: 20px;
}
.art-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text);
  max-width: 820px;
  margin: 0 auto 20px;
  line-height: 1.2;
}
.art-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--text-subtle);
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.art-meta span { display: flex; align-items: center; gap: 6px; }
.art-meta i { color: var(--accent); }

/* Article body */
.art-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 70px 5% 80px;
}
.art-body h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  margin: 48px 0 16px;
  letter-spacing: 1.5px;
}
.art-body p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 20px;
}
.art-body ul {
  margin: 0 0 24px 0;
  padding: 0;
  list-style: none;
}
.art-body ul li {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 6px 0 6px 28px;
  position: relative;
}
.art-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.art-body strong { color: var(--text); font-weight: 700; }

/* CTA block inside article */
.art-cta-block {
  background: linear-gradient(135deg, rgba(93,46,142,0.2), rgba(212,175,55,0.08));
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  margin: 48px 0 0;
}
.art-cta-block h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 10px;
}
.art-cta-block p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* Related articles */
.art-related {
  background: var(--bg-secondary);
  padding: 60px 5%;
  border-top: 1px solid var(--border-card);
}
.art-related h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
  text-align: center;
}
.art-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.art-related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 20px;
  transition: border-color var(--fast), transform var(--fast);
}
.art-related-card:hover {
  border-color: rgba(212,175,55,0.3);
  transform: translateY(-4px);
}
.art-related-card .blog-tag { font-size: 0.58rem; }
.art-related-card p {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  margin-top: 8px;
}

/* Blog footer (simplified) */
.blog-footer {
  background: #000;
  border-top: 2px solid var(--primary);
  padding: 48px 5% 28px;
  text-align: center;
}
.blog-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.blog-footer img { height: 44px; opacity: 0.85; }
.blog-footer .social-links { justify-content: center; }
.blog-footer .copyright {
  border-top: 1px solid #1a1a1a;
  padding-top: 20px;
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* Responsive blog */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .art-related-grid { grid-template-columns: 1fr 1fr; }
  .art-related-grid .art-related-card:last-child { display: none; }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .art-related-grid { grid-template-columns: 1fr 1fr; }
  .art-hero h1 { font-size: clamp(1.5rem, 7vw, 2.2rem); }
}


/* ════════════════════════════════════════════════════════════
   MODAL — Formulario de inicio
════════════════════════════════════════════════════════════ */
.form-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.form-modal.active { display: flex; }
.form-modal.opening { opacity: 1; }

.form-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.form-modal.opening .form-modal-card { transform: translateY(0); }

.form-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-card);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--fast), color var(--fast);
}
.form-modal-close:hover { background: var(--primary); color: #fff; }

.form-modal-header {
  padding: 28px 32px 16px;
  border-bottom: 1px solid var(--border-card);
  flex-shrink: 0;
}
.form-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.form-modal-header p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Wrapper que recorta el banner de JotForm */
.form-iframe-wrap {
  flex: 1;
  overflow: hidden;         /* clipa lo que sobresalga */
  position: relative;
  /* El banner mide ~64px; el iframe crece ese extra hacia abajo y queda oculto */
}

.form-modal-card iframe {
  width: 100%;
  height: calc(100% + 68px);   /* 68px extra para tapar el banner */
  min-height: calc(520px + 68px);
  border: none;
  display: block;
  /* Desplaza el banner fuera del área visible del wrapper */
  margin-bottom: -68px;
}

@media (max-width: 768px) {
  .form-modal { align-items: flex-end; padding: 0; }
  .form-modal-card {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }
}

/* ══════════════════════════════════════════════════════════
   MODAL CONTACTO RÁPIDO (.cmodal)
══════════════════════════════════════════════════════════ */
.cmodal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cmodal.active  { display: flex; }
.cmodal.opening { opacity: 1; }

.cmodal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  padding: 44px 36px 36px;
  transform: translateY(24px);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.cmodal.opening .cmodal-card { transform: translateY(0); }

.cmodal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-card);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--fast);
}
.cmodal-close:hover { background: var(--primary); color: #fff; }

/* Cabecera */
.cmodal-header {
  text-align: center;
  margin-bottom: 28px;
}
.cmodal-icon {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(93,46,142,0.4);
}
.cmodal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.cmodal-header p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* Formulario */
.cmodal-form   { display: flex; flex-direction: column; gap: 18px; }
.cmodal-field  { display: flex; flex-direction: column; gap: 6px; }
.cmodal-label  {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Textarea */
.cmodal-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color var(--fast);
}
.cmodal-textarea::placeholder { color: var(--text-subtle); }
.cmodal-textarea:focus         { border-color: var(--accent); outline: none; }
.cmodal-textarea.invalid       { border-color: #e74c3c; }

/* Campos de contacto */
.cmodal-contact-fields { display: flex; flex-direction: column; gap: 10px; }

.cmodal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cmodal-input-wrap > i {
  position: absolute;
  left: 14px;
  color: var(--accent);
  font-size: 0.82rem;
  pointer-events: none;
}
.cmodal-icon-wa {
  color: #25d366 !important;   /* verde WhatsApp */
  font-size: 1.05rem !important;
}
.cmodal-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 10px;
  padding: 13px 16px 13px 40px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color var(--fast);
}
.cmodal-input::placeholder { color: var(--text-subtle); }
.cmodal-input:focus         { border-color: var(--accent); outline: none; }

/* Error messages */
.cmodal-error {
  display: none;
  font-size: 0.76rem;
  color: #e74c3c;
}
.cmodal-error.show { display: block; }

/* Botón de envío */
.btn-escribenos {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cmodal-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Mensaje de estado */
.cmodal-status {
  text-align: center;
  font-size: 0.86rem;
  color: var(--accent);
  min-height: 1.2em;
}

/* Light mode */
[data-theme="light"] .cmodal-textarea,
[data-theme="light"] .cmodal-input {
  background: #f5f0ff;
  border-color: rgba(93,46,142,0.2);
  color: var(--text);
}
[data-theme="light"] .cmodal-textarea::placeholder,
[data-theme="light"] .cmodal-input::placeholder { color: rgba(93,46,142,0.35); }

/* Mobile — sheet desde abajo */
@media (max-width: 768px) {
  .cmodal { align-items: flex-end; padding: 0; }
  .cmodal-card {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 36px 22px 28px;
  }
}
