/* ============================================================
   pAIn RELIEF — Estilos
   ============================================================ */

/* ------------------ FUENTES DEL DISEÑO ------------------ */
@font-face {
  font-family: "Gotham";
  src: url("fonts/Gotham-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("fonts/Gotham-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham Rounded";
  src: url("fonts/GothamRnd-Book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham Rounded";
  src: url("fonts/GothamRnd-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bitcheese";
  src: url("fonts/Bitcheese.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Minion Pro";
  src: url("fonts/MinionPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy:        #1b2f8a;   /* azul oscuro títulos / nav */
  --navy-deep:   #16226b;
  --blue:        #2a7de1;
  --cyan:        #17b6d8;
  --magenta:     #e6187e;
  --pink:        #ff3d8b;
  --purple:      #7b2ea6;
  --teal:        #3aa9b5;
  --text:        #33415c;
  --muted:       #5b6b86;
  --white:       #ffffff;

  --grad-cta:    linear-gradient(90deg, #2a7de1 0%, #7b2ea6 50%, #e6187e 100%);
  --grad-title:  linear-gradient(90deg, #1b3aa0 0%, #7b2ea6 55%, #e6187e 100%);

  --shadow-card: 0 18px 40px rgba(27, 47, 138, 0.10);
  --shadow-soft: 0 8px 24px rgba(27, 47, 138, 0.08);
  --radius:      22px;
  --max:         1240px;

  --font-body:   "Gotham", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head:   "Gotham Rounded", "Gotham", system-ui, sans-serif;
  --font-script: "Bitcheese", "Segoe Script", cursive;
  --font-serif:  "Minion Pro", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #ffffff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.hero-actions .btn { flex-shrink: 0; }

.btn-gradient {
  background: var(--grad-cta);
  color: #fff;
  padding: 13px 26px;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(123, 46, 166, 0.28);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(123, 46, 166, 0.38);
  filter: brightness(1.05);
}

.btn-lg { padding: 11px 32px; font-size: 1.1rem; }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  padding-bottom: 1px;
  text-indent: 1px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(27, 47, 138, 0.06);
}

/* El header ocupa todo el ancho: logo a la izquierda, nav y botón a la derecha */
.site-header .container {
  max-width: none;
  padding: 0 48px;
}

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

.brand-logo { height: 42px; width: auto; }

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

.main-nav > a:not(.nav-cta) {
  position: relative;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  transition: color .15s ease;
}

.main-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.main-nav > a:not(.nav-cta):hover::after,
.main-nav > a.is-active:not(.nav-cta)::after { transform: scaleX(1); }

.main-nav > a:not(.nav-cta):hover { color: var(--purple); }
.main-nav > a[href="mito.html"]:not(.nav-cta):hover { color: var(--blue); }
.main-nav > a[href="diferentes-formas.html"]:not(.nav-cta):hover { color: var(--teal); }

.nav-cta { font-size: 0.94rem; padding: 11px 22px; }

/* Toggle móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--navy);
  border-radius: 3px;
  transition: .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 40px 0 20px;
  min-height: 620px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-content {
  width: 56%;
  max-width: 720px;
  padding-top: 12px;
}

.hero-brand {
  margin-bottom: 4px;
  margin-top: -28px;
  padding-left: 120px;
}

.hero-brand-img {
  width: auto;
  height: 200px;
  max-width: 100%;
}

.hero-title {
  font-family: var(--font-body);   /* Gotham (no redondeada), como el diseño */
  font-weight: 700;
  margin: 14px 0 18px;
  line-height: 1.05;
}

.hero-title .line-navy {
  display: block;
  white-space: nowrap;
  color: var(--navy);
  font-size: 2.4rem;
  font-weight: 700;
}

.hero-title .line-gradient {
  display: block;
  white-space: nowrap;
  font-size: 2.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--navy);
  font-weight: 500;
  font-size: 1.12rem;
  margin: 0 0 16px;
}

.hero-text {
  color: var(--text);
  font-size: 1rem;
  margin: 0 0 26px;
  max-width: 540px;
}

.hero-text sup { color: var(--magenta); font-weight: 700; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}


.hero-script {
  font-family: var(--font-script);
  white-space: nowrap;
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(90deg, #2a4bd1, #7b2ea6, #e6187e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   CARDS
   ============================================================ */
.cards-section { padding: 30px 0 10px; }

.cards-section .container {
  max-width: none;
  padding: 0 48px;
}

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

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  min-height: 210px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(27, 47, 138, 0.16);
}

/* Textura decorativa anclada al fondo de la tarjeta (ancho completo). El centro
   blanco de la tarjeta crece con el texto, así la textura queda siempre pegada
   abajo y el icono siempre arriba, sin importar el alto de la tarjeta. */
.card-tex {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 0;
}

/* Icono superior izquierdo, tamaño fijo (no depende del alto de la tarjeta) */
.card-icon {
  position: absolute;
  top: 20px;
  left: 22px;
  width: 76px;
  height: auto;
  z-index: 1;
}

.card-body {
  position: relative;
  z-index: 2;
  padding: 22px 24px 20px 116px;  /* deja libre el icono superior izquierdo */
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: inherit;
}

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.08;
  margin: 0 0 8px;
}

.card-text {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 auto;
}

.card-link {
  align-self: flex-end;   /* botón EXPLORAR a la derecha */
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease;
}
.card-link:hover { transform: translateX(4px); }

.card-link .btn-arrow {
  width: 20px; height: 20px;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  padding-bottom: 1px;
  text-indent: 1px;
}

/* Colores por tarjeta */
.card--dolor  .card-title { color: var(--purple); }
.card--mito   .card-title { color: var(--blue); }
.card--alivio .card-title { color: var(--magenta); }
.card--juegos .card-title { color: var(--teal); }

.card-link--dolor  { color: var(--purple); }
.card-link--mito   { color: var(--blue); }
.card-link--alivio { color: var(--magenta); }
.card-link--juegos { color: var(--teal); }

.card-link--dolor  .btn-arrow { background: var(--purple); }
.card-link--mito   .btn-arrow { background: var(--blue); }
.card-link--alivio .btn-arrow { background: var(--magenta); }
.card-link--juegos .btn-arrow { background: var(--teal); }

/* ============================================================
   PÁGINA DOLOR — hero + pestañas + paneles + carrusel
   ============================================================ */
.dolor-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
}

.dolor-hero-bg {
  position: absolute;
  top: 0; right: 0; left: 0;
  z-index: 0;
  pointer-events: none;
}
.dolor-hero-bg img { width: 100%; height: auto; display: block; }

.dolor-wrap {
  position: relative;
  z-index: 1;
  /* Ancho completo con sangría izquierda (~7%, a la mitad del logo).
     Los bloques internos limitan su ancho; el carrusel usa todo el ancho
     para que el texto script pueda ir hasta la derecha, como en el diseño */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-top: 44px;
  padding-left: clamp(48px, 7vw, 130px);
  padding-right: clamp(24px, 4vw, 90px);
}

/* Intro */
.dolor-intro { max-width: 620px; }

.dolor-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--purple);
  margin: 0 0 12px;
}

.dolor-title {
  font-family: var(--font-body);   /* Gotham bold, como el diseño */
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2.9rem;
  line-height: 1.02;
  margin: 0 0 22px;
  background: linear-gradient(90deg, #6a2cae 0%, #9b2eaa 55%, #b52e8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dolor-lead {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 560px;
  margin: 0;
}
.dolor-lead strong { color: var(--navy); font-weight: 700; }
.dolor-lead sup { color: var(--magenta); font-weight: 700; }

/* Pestañas */
.dolor-tabs {
  display: flex;
  gap: 16px;
  margin: 40px 0 34px;
  max-width: 700px;
  flex-wrap: wrap;
}

.dtab {
  position: relative;
  flex: 1 1 0;
  min-width: 128px;
  max-width: 162px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dtab img { width: 100%; height: auto; display: block; }

.dtab-label {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  padding: 0 10px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.1;
}

.dtab:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.dtab.is-active { transform: translateY(-3px); }
.dtab.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 3px currentColor inset;
}

.dtab--migrana { color: var(--purple); }
.dtab--neuro   { color: var(--teal); }
.dtab--musculo { color: var(--blue); }
.dtab--hemo    { color: var(--magenta); }

.dtab--migrana .dtab-label { color: #fff; }
.dtab--neuro   .dtab-label { color: var(--teal); }
.dtab--musculo .dtab-label { color: var(--blue); }
.dtab--hemo    .dtab-label { color: var(--magenta); }

/* Paneles de detalle */
.dolor-panels { max-width: 1000px; }

.dpanel-title {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.75rem;
  margin: 0 0 18px;
}
.dpanel-title--migrana { color: var(--purple); }
.dpanel-title--neuro   { color: var(--teal); }
.dpanel-title--musculo { color: var(--blue); }
.dpanel-title--hemo    { color: var(--magenta); }

.dpanel-cols {
  display: grid;
  /* La 1ª columna abarca las cards 1-3; el divisor cae en el borde
     izquierdo de la card "Dolor hemorroidal" (534px), como en el diseño */
  grid-template-columns: 534px 1fr;
  gap: 0;
  align-items: start;
}
.dpanel-col:nth-child(1) {
  padding-right: 44px;
}
.dpanel-col:nth-child(2) {
  border-left: 2px solid rgba(123, 46, 166, 0.25);
  padding-left: 44px;
}
.dpanel-col h3 {
  font-family: var(--font-body);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.dpanel-col p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}
.dpanel-col sup { color: var(--magenta); font-weight: 700; }

/* Carrusel */
.dolor-carousel {
  display: grid;
  /* col1 = flecha (0-534) · col2 = dots bajo el divisor · col3 = texto a la derecha */
  grid-template-columns: 534px auto 1fr;
  align-items: center;
  column-gap: 16px;
  margin-top: 40px;
}

/* Grupo de flechas (atrás / siguiente) en la 1ª columna */
.carousel-arrows {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 14px;
}

.carousel-next,
.carousel-prev {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 50%;
  /* Borde con degradado (azul -> morado -> magenta), como en el diseño */
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #2a4bd1, #7b2ea6, #e6187e) border-box;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.carousel-next:hover,
.carousel-prev:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* El atributo hidden debe ganar al display:inline-flex de arriba
   (se usa para ocultar "atrás" en la 1ª y "siguiente" en la última) */
.carousel-next[hidden],
.carousel-prev[hidden] { display: none; }

.carousel-arrow {
  width: 30px; height: 30px;
  display: block;
}

.carousel-dots {
  display: flex;
  gap: 12px;
  justify-self: start;   /* dots alineados bajo la línea vertical del panel */
}
.dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: none;
  background: #d6d0e2;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, transform .2s ease;
}
.dot.is-active { background: var(--purple); transform: scale(1.15); }

.dolor-script {
  justify-self: end;      /* texto anclado a la derecha */
  font-size: 2.1rem;
  line-height: 1.12;
  /* Aire arriba/abajo para que las astas de la fuente brush no se recorten */
  padding: .14em .12em .06em;
  white-space: normal;
  text-align: center;
  max-width: 300px;
  transform: rotate(-4deg);
  transform-origin: right center;
  /* Degradado morado -> magenta, como en el diseño */
  background: linear-gradient(100deg, #6a2b9d 0%, #a3269b 45%, #d81f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Enlace de navegación activo — color según la sección */
.main-nav > a.is-active:not(.nav-cta) { color: var(--purple); }
.main-nav > a.is-active[href="mito.html"]:not(.nav-cta) { color: var(--blue); }
.main-nav > a.is-active[href="diferentes-formas.html"]:not(.nav-cta) { color: var(--teal); }

/* ============================================================
   TEMA DOLOR NEUROPÁTICO (teal)
   ============================================================ */
.theme-neuro .dolor-eyebrow { color: var(--teal); }

.theme-neuro .dolor-title {
  background: linear-gradient(90deg, #1c8ea3 0%, #2ba7b8 50%, #46c4d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Intro con color más oscuro (azul), como en el diseño */
.theme-neuro .dolor-lead { color: var(--navy); }

/* Línea divisoria del panel en teal */
.theme-neuro .dpanel-col:nth-child(2) {
  border-left-color: rgba(58, 169, 181, 0.45);
}

/* Punto activo del carrusel en teal */
.theme-neuro .dot.is-active { background: var(--teal); }

/* Etiquetas de las cards: migraña (inactiva) en morado, neuro (activa) en blanco */
.theme-neuro .dtab--migrana .dtab-label { color: var(--purple); }
.theme-neuro .dtab--neuro .dtab-label { color: #fff; }

/* La imagen de fondo se ancla arriba a la derecha con un ancho contenido:
   deja limpio (blanco) el ~50% izquierdo para el texto y evita que las
   neuronas/ondas invadan el título, como en el diseño */
.theme-neuro .dolor-hero-bg {
  left: auto;
  right: 0;
  width: 76%;
  max-width: 1150px;
}

/* ============================================================
   TEMA DOLOR MUSCULOESQUELÉTICO (azul)
   ============================================================ */
.theme-musculo .dolor-eyebrow { color: var(--blue); }

.theme-musculo .dolor-title {
  background: linear-gradient(90deg, #1858c9 0%, #2a7de1 50%, #4a9bf0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Intro con color más oscuro (azul), como en el diseño */
.theme-musculo .dolor-lead { color: var(--navy); }

/* Línea divisoria del panel en azul */
.theme-musculo .dpanel-col:nth-child(2) {
  border-left-color: rgba(42, 125, 225, 0.45);
}

/* Punto activo del carrusel en azul */
.theme-musculo .dot.is-active { background: var(--blue); }

/* Etiquetas de las cards: migraña (inactiva) en morado,
   musculoesquelético (activa) en blanco */
.theme-musculo .dtab--migrana .dtab-label { color: var(--purple); }
.theme-musculo .dtab--musculo .dtab-label { color: #fff; }

/* La imagen de fondo (más cuadrada que la de neuropático) se ancla arriba
   a la derecha con un ancho contenido: deja espacio blanco a la izquierda
   para el texto y evita que la figura invada las pestañas, como en el diseño */
.theme-musculo .dolor-hero-bg {
  left: auto;
  right: 0;
  width: 58%;
  max-width: 1000px;
}

/* ============================================================
   TEMA DOLOR HEMORROIDAL (magenta)
   ============================================================ */
.theme-hemo .dolor-eyebrow { color: var(--magenta); }

.theme-hemo .dolor-title {
  background: linear-gradient(90deg, #d8156f 0%, #e6187e 45%, #ff4d93 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Intro con color más oscuro (azul), como en el diseño */
.theme-hemo .dolor-lead { color: var(--navy); }

/* Línea divisoria del panel en magenta */
.theme-hemo .dpanel-col:nth-child(2) {
  border-left-color: rgba(230, 24, 126, 0.45);
}

/* Punto activo del carrusel en magenta */
.theme-hemo .dot.is-active { background: var(--magenta); }

/* Etiquetas de las cards: migraña (inactiva) en morado,
   hemorroidal (activa) en blanco */
.theme-hemo .dtab--migrana .dtab-label { color: var(--purple); }
.theme-hemo .dtab--hemo .dtab-label { color: #fff; }

/* La imagen de fondo se ancla arriba a la derecha con un ancho contenido:
   la figura queda a la derecha (~73%) y el ~50% izquierdo limpio para el
   texto, como en el diseño */
.theme-hemo .dolor-hero-bg {
  left: auto;
  right: 0;
  width: 54%;
  max-width: 950px;
}

/* ============================================================
   PÁGINA ¿MITO O REALIDAD?
   ============================================================ */
.mito-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 22px;
  min-height: 620px;
}

/* Imágenes laterales ancladas a las esquinas superiores; el sujeto queda en
   la banda exterior y el difuminado (transparente) llega hacia el centro.
   Se muestran completas (sin recorte) y escalan por ancho: en portátiles
   se encogen de forma proporcional en lugar de cortar al sujeto. */
.mito-bg {
  position: absolute;
  top: 0;
  z-index: 0;
  pointer-events: none;
}
.mito-bg--left  { left: 0; }
.mito-bg--right { right: 0; }
.mito-bg img {
  width: clamp(300px, 40vw, 640px);
  height: auto;          /* mantiene la proporción: nunca recorta al sujeto */
  object-fit: contain;
}

/* Contenido a todo el ancho (con sangría lateral igual que la página de dolor).
   El texto del encabezado y las tarjetas se centran; los controles del
   carrusel usan todo el ancho para que las flechas queden a la izquierda y
   el texto script a la derecha, como en las demás páginas. */
.mito-inner {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: -20px 0 0 0;
  padding: 0 clamp(40px, 6vw, 120px);
  text-align: center;
}

/* Bloque de encabezado centrado */
.mito-head { max-width: 640px; margin: 0 auto; }

/* Encabezado */
.mito-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--blue);
  margin: 0 0 16px;
}

.mito-title {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--blue);
  font-size: 2.7rem;
  line-height: 1.05;
  margin: 0;
}

.mito-script-title {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 4.8rem;
  line-height: 1.25;
  margin: 8px 0 26px;
  padding: .18em .12em .16em;
  background: linear-gradient(95deg, #5a2ea6 0%, #9b2bb0 50%, #e6187e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mito-lead {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* Carrusel de afirmaciones (texto centrado) */
.mito-carousel {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  /* Ajustado a la diapositiva más alta (~233px) para evitar espacio muerto
     bajo la respuesta y que los controles no queden empujados hacia abajo */
  min-height: 200px;
}

.mito-slide { animation: mitoFade .4s ease; }
.mito-slide[hidden] { display: none; }

@keyframes mitoFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mito-q {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.80rem;
  line-height: 1.12;
  margin: 0 auto;
  max-width: 640px;
}

.mito-rule {
  display: block;
  width: 410px;
  max-width: 80%;
  height: 3px;
  margin: 16px auto 24px;
  border-radius: 3px;
  background: var(--blue);   /* azul sólido, como el diseño */
}

.mito-answer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  max-width: 750px;
  margin: 0 auto;
  text-align: left;
}

.mito-verdict {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 3.7rem;
  line-height: 1;
  letter-spacing: 1px;
}
.mito-verdict--mito     { color: var(--blue); }
.mito-verdict--realidad {
  font-size: 2.9rem;
  color: var(--blue);
}

.mito-atext {
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  margin: 0;
}
.mito-atext sup { color: var(--magenta); font-weight: 700; }

/* Controles a todo el ancho: flechas a la izquierda · dots al centro ·
   texto script a la derecha (igual que el carrusel de la página de dolor) */
.mito-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}
.mito-arrows { justify-self: start; }
.mito-dots   { justify-self: center; }
.mito-dots .dot.is-active { background: var(--blue); }

.mito-script {
  justify-self: end;
  font-size: 2rem;
  line-height: 1.12;
  padding: .14em .12em .06em;
  white-space: normal;
  text-align: center;
  max-width: 300px;
  transform: rotate(-4deg);
  transform-origin: right center;
  background: linear-gradient(100deg, #6a2b9d 0%, #a3269b 45%, #d81f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Responsive MITO */
@media (max-width: 900px) {
  .mito-hero { min-height: 0; padding: 36px 0 20px; }
  .mito-bg { position: relative; top: auto; bottom: auto; height: 220px; }
  .mito-bg--left, .mito-bg--right { display: none; }
  .mito-inner { max-width: none; padding-top: 24px; }
  .mito-script-title { font-size: 3rem; }
  .mito-title { font-size: 2rem; }
  .mito-lead { margin-bottom: 54px; }
  .mito-q { font-size: 1.6rem; }
  .mito-answer { grid-template-columns: 1fr; gap: 10px; text-align: center; }
  .mito-verdict { text-align: center; }
  .mito-atext { text-align: center; }
  .mito-controls { grid-template-columns: 1fr; row-gap: 20px; justify-items: center; margin-top: 28px; }
  .mito-arrows, .mito-dots, .mito-script { justify-self: center; }
  .mito-script { transform: none; text-align: center; max-width: none; }
}

@media (max-width: 560px) {
  .mito-script-title { font-size: 2.3rem; }
  .mito-title { font-size: 1.6rem; }
  .mito-q { font-size: 1.3rem; }
  .mito-verdict { font-size: 2.6rem; }
  .mito-verdict--realidad { font-size: 2rem; }
}

/* ============================================================
   PÁGINA DIFERENTES FORMAS DE SENTIR ALIVIO
   Reutiliza la estructura de la página de dolor (hero, tabs y
   carrusel); solo cambia el panel inferior. El color de acento
   (--accent) cambia según la pestaña activa mediante las clases
   theme-* que aplica el JS.
   ============================================================ */
.alivio-hero { --accent: var(--teal); }
.alivio-hero.theme-neuro    { --accent: var(--teal); }
.alivio-hero.theme-musculo  { --accent: var(--blue); }
.alivio-hero.theme-migrana  { --accent: var(--purple); }
.alivio-hero.theme-hemo     { --accent: var(--magenta); }

/* Eyebrow y título grande en el color de acento */
.alivio-hero .dolor-eyebrow { color: var(--accent); }
.alivio-hero .dolor-title {
  background: none;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  text-transform: none;   /* el título va en formato normal, no en mayúsculas */
  font-size: 2.6rem;
}
.alivio-hero .dolor-lead { color: var(--text); }

/* La imagen de fondo se ancla arriba a la derecha. Su contenido (la
   persona) está en el ~65% derecho del archivo, con el resto difuminado
   a blanco; por eso se muestra grande para que la figura tenga el tamaño
   y la altura del diseño. El lado izquierdo difuminado queda detrás del
   texto (el contenido va con z-index superior). */
.alivio-hero .dolor-hero-bg {
  left: auto;
  right: 0;
  width: 100%;
  max-width: 1550px;
}

/* Panel inferior: a la izquierda el título del tipo + subtítulo,
   a la derecha los hábitos de bienestar, separados por una línea */
.alivio-panels { max-width: 1150px; margin-top: 6px; }
.apanel[hidden] { display: none; }

.apanel-cols {
  display: grid;
  grid-template-columns: 500px 1fr;
  gap: 0;
  align-items: start;
}
.apanel-head { padding-right: 40px; min-width: 0; }
.apanel-habits {
  border-left: 2px solid var(--accent);
  padding-left: 44px;
}

.apanel-title {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2.15rem;
  line-height: 1.02;
  margin: 0 0 16px;
  color: var(--accent);
  /* Red de seguridad: si la columna se estrecha, la palabra larga
     (MUSCULOESQUELÉTICO) parte con guion en vez de invadir la derecha */
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.apanel-sub {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}
.apanel-sub sup { color: var(--magenta); font-weight: 700; }

.apanel-habits-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 18px;
  color: var(--accent);
}

.apanel-habits ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.apanel-habits li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}
.apanel-habits li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.apanel-habits li strong { color: var(--accent); font-weight: 700; }
.apanel-habits sup { color: var(--magenta); font-weight: 700; }

/* El estado activo se muestra con la card oscura (rellena), no con anillo */
.alivio-hero .dtab.is-active::after { display: none; }

/* Punto activo del carrusel en el color de acento */
.alivio-hero .dot.is-active { background: var(--accent); }

/* Responsive: apila el panel en una sola columna */
@media (max-width: 900px) {
  .alivio-hero .dolor-hero-bg { width: 100%; max-width: none; }
  .apanel-cols { grid-template-columns: 1fr; gap: 22px; }
  .apanel-head { padding-right: 0; }
  .apanel-habits { border-left: none; padding-left: 0; }
  .alivio-hero .dolor-title { font-size: 2.1rem; }
  .apanel-title { font-size: 2.1rem; }
}

@media (max-width: 560px) {
  .alivio-hero .dolor-title { font-size: 1.8rem; }
  .apanel-title { font-size: 1.8rem; }
}

/* ============================================================
   WAVE DIVIDER
   ============================================================ */
.wave-divider {
  margin: 20px 0 0;
  line-height: 0;
}
.wave-divider img { width: 100%; height: auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 20px 0 46px;
  background: #fff;
}

.site-footer .container {
  max-width: none;
  padding: 0 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 40px;
  align-items: center;
}

.footer-logo { width: 130px; height: auto; }

.footer-legal p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.48rem;
  color: var(--muted);
  line-height: 1.5;
}
.footer-reg { margin-top: 10px !important; }

.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}
.footer-links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--magenta); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero-brand-img { height: 118px; }
  .hero-title .line-navy { font-size: 2.1rem; }
  .hero-title .line-gradient { font-size: 2.6rem; }
  .dolor-title { font-size: 2.4rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* En pantallas donde el hero se apila, permitir que el título envuelva */
@media (max-width: 900px) {
  .hero-title .line-navy,
  .hero-title .line-gradient { white-space: normal; }
  .hero-actions { flex-wrap: wrap; }
  .hero-script { white-space: normal; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 78px;
    right: 0;
    width: min(320px, 84vw);
    height: calc(100vh - 78px);
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    background: #fff;
    padding: 32px 28px;
    box-shadow: -8px 0 30px rgba(27, 47, 138, 0.12);
    transform: translateX(105%);
    transition: transform .3s ease;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-cta { align-self: stretch; justify-content: center; }

  .hero { min-height: auto; }
  .hero-media { position: relative; height: auto; }
  .hero-img { position: relative; width: 100%; }
  .hero-inner { justify-content: center; margin-top: 8px; }
  .hero-content { width: 100%; max-width: 640px; text-align: left; }

  /* Página dolor: la imagen pasa a ser un bloque arriba */
  .dolor-hero-bg { position: relative; }
  /* En móvil la imagen vuelve a ocupar todo el ancho como bloque superior */
  .theme-neuro .dolor-hero-bg,
  .theme-musculo .dolor-hero-bg,
  .theme-hemo .dolor-hero-bg { width: 100%; max-width: none; }
  .dolor-wrap { padding-top: 28px; }
  .dolor-intro { max-width: none; }
  .dolor-tabs { max-width: none; }
  .dpanel-cols { grid-template-columns: 1fr; gap: 24px; }
  .dpanel-col:nth-child(1) { padding-right: 0; }
  .dpanel-col:nth-child(2) { border-left: none; padding-left: 0; margin-left: 0; }
  .dolor-carousel { grid-template-columns: 1fr; row-gap: 20px; justify-items: start; }
  .carousel-dots { justify-self: start; }
  .dolor-script { justify-self: start; text-align: left; max-width: none; transform: none; font-size: 1.8rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 18px; text-align: left; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .site-header .container { padding: 0 18px; }
  .cards-section .container { padding: 0 18px; }
  .site-footer .container { padding: 0 18px; }
  .cards-grid { grid-template-columns: 1fr; }
  .dolor-title { font-size: 2rem; }
  .hero-brand-img { height: 92px; }
  .hero-title .line-navy { font-size: 1.7rem; }
  .hero-title .line-gradient { font-size: 2.1rem; }
  .hero-script { font-size: 1.4rem; }

  /* ---- Páginas dolor / diferentes-formas: contenido centrado en móvil ---- */
  .dolor-wrap { padding-left: 20px; padding-right: 20px; text-align: center; }
  .dolor-intro { max-width: none; margin-left: auto; margin-right: auto; }
  .dolor-lead { max-width: none; margin-left: auto; margin-right: auto; }
  .dolor-tabs { justify-content: center; max-width: none; }
  .dpanel-title { text-align: center; }
  .dpanel-col { text-align: center; }
  .dolor-carousel { justify-items: center; }
  .carousel-arrows { justify-self: center; }
  .carousel-dots { justify-self: center; }
  .dolor-script { justify-self: center; text-align: center; }

  /* Panel de hábitos (diferentes-formas) centrado */
  .apanel-head { padding-right: 0; text-align: center; }
  .apanel-habits { text-align: center; }
  .apanel-habits ul { align-items: center; }
  .apanel-habits li { padding-left: 0; }
  .apanel-habits li::before { display: none; }

  /* Contenido del hero centrado en móvil */
  .hero-content { text-align: center; }
  .hero-brand { padding-left: 0; text-align: center; }
  .hero-brand-img { margin-left: auto; margin-right: auto; }
  .hero-lead,
  .hero-text { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  /* Footer centrado igual que el logo de Aspen */
  .footer-inner { justify-items: center; text-align: center; }
  .footer-brand { display: flex; justify-content: center; }
  .footer-legal p { text-align: center; }
  .footer-links { justify-content: center; }
}

/* ============================================================
   POPUP DE REFERENCIAS
   ============================================================ */
.refs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  /* Color de acento por página (sombra, títulos y botón cerrar) */
  --refs-accent: #7b2ea6;
  --refs-shadow: rgba(123, 46, 166, 0.5);
}
.refs-modal--mito   { --refs-accent: #2a7de1; --refs-shadow: rgba(42, 125, 225, 0.5); }
.refs-modal--alivio { --refs-accent: #e6187e; --refs-shadow: rgba(230, 24, 126, 0.5); }
.refs-modal[hidden] { display: none; }

.refs-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 60, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.refs-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1000px, 100%);
  max-height: 86vh;
  background: #fff;
  border-radius: 26px;
  padding: 34px 42px 34px;
  /* Sombra de color suave (según la página) + sombra ambiente */
  box-shadow:
    0 26px 60px -6px var(--refs-shadow),
    0 10px 26px rgba(20, 22, 60, 0.18);
  animation: refsIn .25s ease;
}
@keyframes refsIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.refs-eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--refs-accent);
  font-size: 1rem;
  margin: 0 0 2px;
}
.refs-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--refs-accent);
}
.refs-body {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.6;
  overflow-y: auto;
  padding-right: 6px;
}
.refs-body p { margin: 0; }
.refs-body b { color: var(--refs-accent); font-weight: 700; }
.refs-body a { color: var(--blue); word-break: break-word; }

.refs-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--refs-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(20, 22, 60, 0.3);
  z-index: 2;
  transition: transform .15s ease;
}
.refs-close:hover { transform: scale(1.08); }
.refs-close svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
}

body.refs-open { overflow: hidden; }

@media (max-width: 720px) {
  .refs-dialog { padding: 30px 22px 26px; border-radius: 22px; }
  .refs-dialog::before { left: -8px; top: -8px; right: 6px; bottom: 6px; }
  .refs-title { font-size: 1.6rem; }
  .refs-close { top: 14px; right: 14px; width: 40px; height: 40px; }
  .refs-body { font-size: 0.9rem; }
}
