/* ═══════════════════════════════════════════════════════════
   Synapsur — main.css
   Tema "neuro" claro: fondo limpio, acentos azul/índigo/teal
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #f7f9fc;
  --bg-2: #eef2f8;
  --bg-3: #e7edf6;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #e3e9f2;
  --border-strong: #cdd7e6;

  --cyan: #14b8a6;
  --cyan-soft: #0d9488;
  --blue: #06b6d4;
  --violet: #0d9488;
  --violet-deep: #0f766e;
  --teal: #14b8a6;
  --pink: #2dd4bf;
  --accent-light: #5eead4;

  --accent-rgb: 20, 184, 166;
  --accent-2-rgb: 6, 182, 212;
  --accent-deep-rgb: 13, 148, 136;

  --text: #0f172a;
  --muted: #516072;
  --muted-2: #8490a8;

  --grad: linear-gradient(120deg, #0d9488 0%, #0891b2 100%);
  --grad-soft: linear-gradient(120deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-2-rgb), 0.08));

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.18);
  --shadow-sm: 0 6px 20px -8px rgba(15, 23, 42, 0.12);
  --container: 1180px;
}

/* ─── Paleta 2: Azul ─── */
[data-theme="blue"] {
  --cyan: #3b82f6;
  --cyan-soft: #2563eb;
  --blue: #0ea5e9;
  --violet: #2563eb;
  --violet-deep: #1d4ed8;
  --teal: #3b82f6;
  --pink: #60a5fa;
  --accent-light: #93c5fd;
  --accent-rgb: 59, 130, 246;
  --accent-2-rgb: 14, 165, 233;
  --accent-deep-rgb: 37, 99, 235;
  --grad: linear-gradient(120deg, #2563eb 0%, #0284c7 100%);
  --grad-soft: linear-gradient(120deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.08));
}

/* ─── Paleta 3: Dorado ─── */
[data-theme="gold"] {
  --cyan: #d4a017;
  --cyan-soft: #a16207;
  --blue: #eab308;
  --violet: #a16207;
  --violet-deep: #8a5a05;
  --teal: #d4a017;
  --pink: #f5c518;
  --accent-light: #fde68a;
  --accent-rgb: 212, 160, 23;
  --accent-2-rgb: 245, 158, 11;
  --accent-deep-rgb: 161, 98, 7;
  --grad: linear-gradient(120deg, #b8860b 0%, #8a5a05 100%);
  --grad-soft: linear-gradient(120deg, rgba(212, 160, 23, 0.1), rgba(161, 98, 7, 0.08));
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: rgba(var(--accent-rgb), 0.25); color: #0f172a; }

:focus-visible { outline: 3px solid rgba(var(--accent-rgb), 0.5); outline-offset: 2px; border-radius: 6px; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }

/* ─── Tipografía ─── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; color: var(--text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--cyan-soft);
  box-shadow: var(--shadow-sm);
}
.eyebrow--dark {
  color: var(--cyan-soft);
  background: rgba(var(--accent-rgb), 0.07);
  border-color: rgba(var(--accent-rgb), 0.25);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.eyebrow--dark::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad); flex: none;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

/* ─── Header ─── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--border);
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.25);
}

/* Header oscuro — solo en la home (hero con video de cerebro) */
.header--dark {
  background: rgba(11, 16, 32, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
}
.header--dark.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 108px; gap: 24px; }

.brand { display: flex; align-items: center; }
.brand-logo { height: 80px; width: auto; transition: opacity 0.3s ease; }
.brand-logo--white { display: none; }
/* Home al cargar (sobre el video): logo blanco real; al hacer scroll, logo a color */
.header--dark:not(.is-scrolled) .brand-logo--white { display: block; }
.header--dark:not(.is-scrolled) .brand-logo--color { display: none; }

.main-nav { display: flex; align-items: center; gap: 6px; }

.nav-link {
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-link--cta {
  margin-left: 10px;
  color: #fff;
  background: var(--grad);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(var(--accent-deep-rgb), 0.5);
}
.nav-link--cta:hover { color: #fff; filter: brightness(1.05); }

/* Header oscuro (home): enlaces claros + subrayado del activo, solo desktop */
@media (min-width: 769px) {
  .header-inner { position: relative; }
  .main-nav {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
  }
  .nav-link { position: relative; }
  .header--dark:not(.is-scrolled) .nav-link { color: rgba(235, 239, 250, 0.88); }
  .header--dark:not(.is-scrolled) .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
  .nav-link:not(.nav-link--cta).is-active::after {
    content: '';
    position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; border-radius: 2px;
    background: var(--cyan);
  }
  .header--dark:not(.is-scrolled) .nav-link:not(.nav-link--cta).is-active::after { background: var(--accent-light); }
}
.header--dark .nav-link--cta,
.header--dark:not(.is-scrolled) .nav-link--cta { color: #fff; }

/* ─── Dropdown "Terapias" ─── */
.nav-item--dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer;
  font-family: inherit; display: inline-flex; align-items: center; gap: 4px;
}
.nav-chevron { transition: transform 0.2s ease; }
.nav-item--dropdown.is-open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 330px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.35);
  padding: 8px; z-index: 200;
}
.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown,
.nav-item--dropdown.is-open .nav-dropdown { display: block; }
.nav-link--sub {
  display: block; padding: 12px 16px; border-radius: 10px;
  font-size: 0.92rem; color: var(--muted); line-height: 1.3;
}
.nav-link--sub:hover { background: var(--surface-2); color: var(--text); }
.nav-link--sub.is-active { color: var(--cyan-soft); font-weight: 600; }
/* Header oscuro (no scrolleado): las subopciones del dropdown van oscuras sobre fondo blanco */
.header--dark:not(.is-scrolled) .nav-dropdown .nav-link--sub { color: var(--muted); }
.header--dark:not(.is-scrolled) .nav-dropdown .nav-link--sub:hover { color: var(--text); background: var(--surface-2); }
.header--dark:not(.is-scrolled) .nav-dropdown .nav-link--sub.is-active { color: var(--cyan-soft); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 52px; height: 52px; padding: 0;
  border: none; background: transparent; color: #fff;
}
.nav-toggle .icon { width: 32px; height: 32px; }
.site-header.is-scrolled .nav-toggle { color: var(--text); }

.nav-drawer-head { display: none; }
.nav-close { display: none; }
.nav-overlay { display: none; }
body.nav-locked { overflow: hidden; }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 120px;
  overflow: hidden;
  background: #0b1020;
}

.hero-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(11, 16, 32, 0.42) 0%,
    rgba(11, 16, 32, 0.20) 50%,
    rgba(11, 16, 32, 0.14) 88%,
    #f7f9fc 100%);
}

.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

.hero-glow {
  position: absolute; border-radius: 50%; z-index: 1;
  filter: blur(90px); opacity: 0.18; pointer-events: none;
}
.hero-glow--a { width: 520px; height: 520px; background: radial-gradient(circle, rgba(var(--accent-rgb),0.45), transparent 70%); top: -120px; left: -120px; }
.hero-glow--b { width: 560px; height: 560px; background: radial-gradient(circle, rgba(var(--accent-2-rgb),0.45), transparent 70%); bottom: -160px; right: -120px; }

.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }

.hero .eyebrow {
  color: #eafffb;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.32), rgba(var(--accent-2-rgb), 0.2));
  border: 1px solid rgba(var(--accent-2-rgb), 0.55);
  box-shadow:
    0 12px 34px -16px rgba(var(--accent-rgb), 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  letter-spacing: 0.16em;
}
.hero .eyebrow .icon { color: var(--accent-light); }

.hero .hero-title { color: #ffffff; }
.hero .grad {
  color: #ffffff;
  font-weight: 800;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  filter: none;
  animation: none;
}

.hero-sub { max-width: 640px; color: var(--muted); font-size: 1.15rem; }
.hero .hero-sub { color: rgba(235, 239, 250, 0.9); }
.hero .hero-title,
.hero .hero-sub,
.hero .eyebrow,
.hero-stats strong,
.hero-stats span { text-shadow: 0 2px 24px rgba(11, 16, 32, 0.55); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero .btn--ghost { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.hero-stats {
  display: flex; gap: 40px; flex-wrap: wrap; justify-content: center;
  margin-top: 24px; padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.05rem; color: #fff; text-shadow: 0 2px 14px rgba(11, 16, 32, 0.7); }
.hero-stats span { font-size: 0.82rem; color: rgba(240, 246, 255, 0.92); text-shadow: 0 2px 14px rgba(11, 16, 32, 0.7); }

/* ─── Botones ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 100px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 28px -10px rgba(var(--accent-deep-rgb), 0.55); position: relative; overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn--primary:hover::after { left: 100%; }
.btn--primary:hover { box-shadow: 0 16px 36px -10px rgba(var(--accent-deep-rgb), 0.65); }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--lg { padding: 17px 34px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn--primary, .nav-link--cta { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--cyan-soft); font-weight: 600; font-size: 0.95rem;
  margin-top: 20px; transition: gap 0.2s;
}
.text-link:hover { gap: 12px; }

/* ─── Secciones ─── */
.section { padding: 96px 0; position: relative; }
.section--tint { background: linear-gradient(180deg, #ffffff, var(--bg-2) 100%); }

.section-head { max-width: 640px; margin-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.section-head .eyebrow { align-self: flex-start; }
.section-head--center { max-width: none; text-align: center; align-items: center; }
.section-head--center .eyebrow { align-self: center; }

/* ─── Condiciones (sin cajas, solo iconografía + texto) ─── */
.conditions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.condition { display: flex; flex-direction: column; }
.condition-icon { width: 30px; height: 30px; color: var(--cyan); margin-bottom: 16px; }
.condition h3 { font-size: 1.25rem; margin-bottom: 10px; }
.condition p { color: var(--muted); font-size: 0.95rem; text-align: justify; }

/* ─── Intro ─── */
.intro-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.intro-text { display: flex; flex-direction: column; gap: 20px; }
.intro-text .section-title { margin-bottom: 4px; }

.intro-visual { display: flex; justify-content: center; }

.brain-orb { position: relative; width: 320px; height: 320px; display: flex; align-items: center; justify-content: center; }
.brain-img { width: 220px; height: 220px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 12px 30px rgba(var(--accent-rgb), 0.18)); }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(var(--accent-rgb), 0.22); animation: pulse-ring 8s ease-out infinite; }
.orb-ring--2 { animation-delay: 4s; border-color: rgba(var(--accent-2-rgb), 0.22); }

@keyframes pulse-ring {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.16); opacity: 0; }
}

/* ─── Cards ─── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-grid--wide { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-soft); opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(var(--accent-rgb), 0.35); box-shadow: 0 24px 50px -22px rgba(var(--accent-deep-rgb), 0.35); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 10px 22px -10px rgba(var(--accent-deep-rgb), 0.5);
}
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ─── Pasos ─── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.step {
  position: relative;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.step-num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 14px; line-height: 1;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ─── Beneficios ─── */
.benefits-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.benefit {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, transform 0.3s;
}
.benefit:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.benefit-icon { color: var(--cyan); }
.benefit h3 { font-size: 1.05rem; margin-bottom: 6px; }
.benefit p { color: var(--muted); font-size: 0.9rem; }

/* ─── Tech split ─── */
.tech-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.tech-text { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

.tech-visual { display: flex; justify-content: center; }
.tech-card {
  text-align: center; padding: 48px 40px;
  background: linear-gradient(160deg, #ffffff, var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow); width: 100%; max-width: 380px;
}
.tech-bolt { color: var(--blue); margin: 0 auto 20px; filter: drop-shadow(0 6px 14px rgba(var(--accent-rgb), 0.4)); }
.tech-card h3 { font-size: 1.6rem; margin-bottom: 12px; }
.tech-card p { color: var(--muted); margin-bottom: 22px; }
.tech-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600;
  padding: 7px 14px; border-radius: 100px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--cyan-soft);
}

/* ─── Atención ambulatoria (cards) ─── */
.amb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.amb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.amb-card:hover { transform: translateY(-6px); border-color: rgba(var(--accent-rgb), 0.35); box-shadow: 0 24px 50px -22px rgba(var(--accent-deep-rgb), 0.35); }
.amb-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.amb-card-top .card-icon { margin-bottom: 0; flex: none; }
.amb-card-top h3 { font-size: 1.3rem; }
.amb-soon { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan-soft); }
.amb-card > p { color: var(--muted); font-size: 0.95rem; text-align: justify; }
.amb-doctors { display: flex; flex-direction: column; gap: 14px; margin: 22px 0 26px; }
.amb-doctor {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.amb-doctor img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.amb-doctor strong { display: block; font-family: var(--font-display); font-size: 0.98rem; color: var(--text); }
.amb-doctor span { font-size: 0.82rem; color: var(--muted); }
.amb-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.amb-chips .chip { background: var(--surface-2); }
.amb-card .btn--block { margin-top: auto; }

/* ─── CTA band ─── */
.cta-band { padding: 100px 0; }
.cta-inner {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 70px 40px; border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-2-rgb), 0.12), rgba(45, 212, 191, 0.08));
  border: 1px solid var(--border-strong);
  position: relative; overflow: hidden;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-inner p { color: var(--muted); max-width: 520px; }

/* ─── Page hero (banner con video) ─── */
.page-hero {
  position: relative; padding: 170px 0 90px; overflow: hidden;
  background: #0b1020;
}
.page-hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 24px; max-width: 780px; }
.page-hero .hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; }
.page-hero .hero-sub { max-width: 620px; color: rgba(235, 239, 250, 0.82); }
.page-hero .eyebrow {
  color: #eafffb;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.32), rgba(var(--accent-2-rgb), 0.2));
  border: 1px solid rgba(var(--accent-2-rgb), 0.55);
  box-shadow:
    0 12px 34px -16px rgba(var(--accent-rgb), 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  letter-spacing: 0.16em;
}
.page-hero .eyebrow .icon { color: var(--accent-light); }
.page-hero .hero-title,
.page-hero .hero-sub { text-shadow: 0 2px 24px rgba(11, 16, 32, 0.55); }

/* ─── Two col / prose ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.prose { font-size: 1rem; }
.prose p { color: var(--muted); margin-bottom: 1.2em; line-height: 1.8; }
.prose h2 {
  margin: 2.2em 0 0.85em;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.3em; margin: 0 0 1.4em; color: var(--muted); }
.prose ul li { margin-bottom: 0.5em; line-height: 1.7; }
.prose a:not(.btn) { color: var(--cyan-soft); text-decoration: underline; }

/* ─── Texto justificado en secciones de contenido ─── */
.prose p,
.prose ul li,
.card p,
.benefit p,
.step p,
.cert-card p,
.resource-card p,
.intro-text p,
.tech-text p,
.two-col p {
  text-align: justify;
  text-justify: inter-word;
}

.prose-narrow { max-width: 960px; margin: 0 auto; }
.prose-narrow .prose h2 {
  padding-top: 1.1em;
  border-top: 1px solid var(--border);
}
.prose-narrow .prose h2:first-child { border-top: none; padding-top: 0; }

ul.check-list { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; list-style: none; padding-left: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.check-list .icon { color: var(--teal); margin-top: 3px; }

ul.plain-list { display: flex; flex-direction: column; gap: 8px; list-style: none; padding-left: 0; }
.plain-list li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.94rem; }
.plain-list li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

/* ─── FAQ ─── */
.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: 20px 24px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--blue); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 22px; color: var(--muted); }

/* ─── Staff ─── */
.staff-list { display: flex; flex-direction: column; gap: 64px; }

.staff-card {
  display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start;
  padding: 40px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 120px;
}
.staff-photo img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.staff-info h2 { font-size: 1.7rem; margin-bottom: 4px; }
.staff-role { color: var(--cyan-soft); font-weight: 500; margin-bottom: 26px; }
.staff-block { margin-bottom: 22px; }
.staff-block h3 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-2); margin-bottom: 12px;
}

/* ─── Certificaciones ─── */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cert-card { padding: 32px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.cert-icon { color: var(--cyan); margin-bottom: 18px; }
.cert-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.cert-card p { color: var(--muted); font-size: 0.92rem; }
.cert-card .text-link { margin-top: 14px; }

/* ─── Equipo (foto completa + info al lado) ─── */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.team-card {
  display: flex; align-items: center; gap: 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.team-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), 0.35); box-shadow: 0 20px 44px -22px rgba(var(--accent-deep-rgb), 0.35); }
.team-photo {
  width: 132px; aspect-ratio: 4/5; flex: none;
  border-radius: 14px; object-fit: cover;
}
.team-info { display: flex; flex-direction: column; }
.team-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.team-info .role { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.team-info .text-link { margin-top: 10px; }

/* ─── Imagen de equipo (MagPro R30) ─── */
.equipo-img {
  margin-top: 24px; width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ─── Galería ─── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius); transition: transform 0.3s; box-shadow: var(--shadow-sm); }
.gallery img:hover { transform: scale(1.03); }

/* ─── Contacto ─── */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }

.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
}
.contact-item h3 { font-size: 1rem; margin-bottom: 3px; }
.contact-item p { color: var(--muted); font-size: 0.9rem; }
.contact-item a { color: var(--cyan-soft); }

.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-sm); }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 500; }
.input {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); background: #fff; }
.input::placeholder { color: var(--muted-2); }
.input--area { resize: vertical; min-height: 130px; }
.field-error { color: #dc2626; font-size: 0.8rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border-radius: var(--radius); margin-bottom: 24px;
}
.form-notice--ok { background: rgba(var(--accent-deep-rgb), 0.08); border: 1px solid rgba(var(--accent-deep-rgb), 0.25); }
.form-notice--ok .icon { color: var(--teal); }
.form-notice--error { background: rgba(220, 38, 38, 0.07); border: 1px solid rgba(220, 38, 38, 0.25); }
.form-notice--error .icon { color: #dc2626; }
.form-notice h3 { font-size: 1rem; margin-bottom: 2px; }
.form-notice p { font-size: 0.88rem; color: var(--muted); }

.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ─── Recursos ─── */
.resource-list { display: flex; flex-direction: column; gap: 16px; }
.resource-card {
  display: flex; gap: 20px; align-items: center;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}
.resource-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.resource-icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
}
.resource-body { flex: 1; }
.resource-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.resource-body p { color: var(--muted); font-size: 0.92rem; }
.resource-arrow { color: var(--cyan-soft); }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; background: #eef2f8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { height: 36px; width: auto; margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 360px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--muted); border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-social-link:hover { color: #fff; background: var(--grad); border-color: transparent; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 6px; }
.footer-col a, .footer-link { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover, .footer-link:hover { color: var(--cyan-soft); }
.footer-link { display: inline-flex; align-items: center; gap: 8px; }
.footer-link--plain { color: var(--muted); cursor: default; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--muted-2);
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: var(--muted-2); transition: color 0.2s; }
.footer-legal a:hover { color: var(--cyan-soft); }

.footer-credit {
  text-align: center; padding-top: 14px;
  font-size: 0.78rem; color: var(--muted-2);
  display: flex; justify-content: center; align-items: center; gap: 6px;
}
.footer-credit .heart {
  width: 13px; height: 13px; fill: #fb7185;
  display: inline-block; vertical-align: -1px;
}
.footer-credit-link {
  color: var(--cyan-soft); font-weight: 600;
  transition: color 0.2s, opacity 0.2s;
}
.footer-credit-link:hover { color: var(--cyan); text-decoration: underline; }

/* ─── Legal (consentimiento, tablas, cookies) ─── */
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.9rem; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); }
.legal-table th { background: var(--surface-2); color: var(--text); }
.legal-table td { color: var(--muted); }

.field--consent { flex-direction: row; align-items: flex-start; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.checkbox input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--cyan); cursor: pointer; }
.checkbox a { color: var(--cyan-soft); text-decoration: underline; }

/* ─── Banner de cookies ─── */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.35);
  padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  z-index: 9997; font-size: 0.85rem; color: var(--muted);
}
.cookie-banner[hidden] { display: none; }
.cookie-text { flex: 1; min-width: 240px; }
.cookie-text a { color: var(--cyan-soft); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-actions .btn { padding: 10px 18px; font-size: 0.85rem; }

/* ─── Selector de paleta de colores ─── */
.theme-switcher {
  position: fixed; bottom: 24px; left: 24px; z-index: 9997;
  display: flex; flex-direction: column; gap: 10px;
}
.theme-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-dot:hover { transform: scale(1.18); }
.theme-dot--teal { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.theme-dot--blue { background: linear-gradient(135deg, #3b82f6, #0ea5e9); }
.theme-dot--gold { background: linear-gradient(135deg, #d4a017, #a16207); }
.theme-dot.is-active { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--cyan-soft), 0 2px 8px rgba(15, 23, 42, 0.28); }

/* ─── Animaciones reveal ─── */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .cards-grid--wide { grid-template-columns: repeat(2, 1fr); }
  .staff-card { grid-template-columns: 1fr; gap: 32px; }
  .staff-photo img { max-width: 320px; }
  .two-col, .tech-split, .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 24px 22px 32px;
    transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 60px -30px rgba(15, 23, 42, 0.4);
    z-index: 100;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-link { padding: 14px 12px; font-size: 1.02rem; }
  .nav-link--cta { margin-left: 0; margin-top: 16px; text-align: center; }

  .nav-item--dropdown { position: static; }
  .nav-dropdown {
    display: none;
    position: static; transform: none; min-width: 0;
    box-shadow: none; border: none; background: transparent;
    border-radius: 0; padding: 0 0 0 16px; margin: 2px 0 4px;
    border-left: 2px solid var(--border);
  }
  .nav-item--dropdown.is-open .nav-dropdown { display: block; }
  .nav-item--dropdown:hover .nav-dropdown,
  .nav-item--dropdown:focus-within .nav-dropdown { display: none; }
  .nav-link--sub { padding: 12px 14px; font-size: 0.96rem; }

  .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 20px; margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .nav-drawer-logo { height: 34px; width: auto; }
  .nav-close {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); color: var(--text); background: var(--surface-2);
  }
  .nav-overlay {
    display: block;
    position: fixed; inset: 0; z-index: 99;
    background: rgba(11, 16, 32, 0.5);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }

  .nav-toggle { display: flex; }
  .nav-toggle.is-open { display: none; }

  .benefits-grid { grid-template-columns: 1fr; }
  .cards-grid, .cards-grid--wide { grid-template-columns: 1fr; }
  .amb-grid { grid-template-columns: 1fr; }
  .conditions-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { gap: 24px; }
  .brain-orb { width: 260px; height: 260px; }
  .brain-img { width: 180px; height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
