/* =====================================================================
   Orthokine España — Rediseño
   Estética basada en orthokine.pl
   Paleta: rojo (#d0043c) · blanco · grises  ·  Fuente: Open Sans
   Barra de navegación superior horizontal
   ===================================================================== */

/* Fuente auto-alojada (RGPD + rendimiento): Open Sans variable, subconjunto latino */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/open-sans-latin.woff2') format('woff2');
}

/* ---------- Tokens de diseño ---------- */
:root {
  /* Paleta de marca (orthokine.pl) */
  --red: #d0043c;
  --red-dark: #a80230;
  --red-soft: #fdeaf0;

  --white: #ffffff;
  --black: #0a0a0a;

  --gray-900: #222222;
  --gray-700: #333333;
  --gray-500: #666666;
  --gray-300: #d0d0d0;
  --gray-200: #e1e1e1;
  --gray-100: #f8f8f8;

  --text: #333333;
  --muted: #666666;
  --heading: #222222;
  --border: #e1e1e1;

  --bg: #ffffff;
  --bg-soft: #f8f8f8;
  --bg-deep: #222222;

  /* Tipografía — la misma de orthokine.pl */
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font-body);

  /* Espaciado generoso */
  --space-section: clamp(4rem, 9vw, 8rem);
  --container: 1200px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 30px -18px rgba(0, 0, 0, 0.2);

  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }

/* ---------- Accesibilidad ---------- */
/* Enlace "saltar al contenido" (visible solo al enfocar con teclado) */
.skip-link {
  position: absolute; left: 0.75rem; top: -100px; z-index: 2000;
  background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700;
  padding: 0.7rem 1.1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: #fff; outline: 3px solid #fff; outline-offset: -6px; }
/* Foco visible para navegación por teclado */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 3px; }
[id="contenido"] { scroll-margin-top: 100px; }

/* ---------- Respeto a "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

/* Justificado con guionado automático (evita "ríos" de espacios). Requiere lang="es". */
p { margin: 0 0 1.2rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.faq-a-inner li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 2.5rem);
}

.section { padding-block: var(--space-section); }
.section--soft { background: var(--bg-soft); }
.section--deep { background: var(--bg-deep); color: #d8d8d8; }
.section--deep h2, .section--deep h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
/* Mantener centrados los textos de contextos centrados (no justificar) */
.section-head.center p,
.cta-band p,
.gate-box p,
.pro-banner { text-align: center; }
/* Si la cabecera es lo único de la sección, quitamos el margen sobrante
   para que no sobre tanto hueco vacío debajo (conserva el padding de la sección). */
.section-head:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}

.lead { font-size: 1.15rem; color: var(--muted); }

/* Línea decorativa bajo títulos (estilo .pl) */
.section-head h2::after,
.hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--red);
  margin-top: 1.1rem;
  border-radius: 2px;
}
.section-head.center h2::after { margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-primary,
.btn-accent { background: var(--red); color: #fff; }
.btn-primary:hover,
.btn-accent:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--gray-100); }

/* ===================================================================
   Cabecera / Barra de navegación superior
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 92px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 52px; width: auto; }

/* Texto de respaldo del logo */
.brand-mark {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--gray-700);
}
.brand-mark span { color: var(--red); }

/* Navegación horizontal */
.main-nav { margin-left: auto; }
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--gray-700);
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  position: relative;
}
.main-nav > ul > li > a::before {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: 0.35rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.main-nav > ul > li > a:hover { color: var(--red); }
.main-nav > ul > li > a:hover::before { transform: scaleX(1); }
/* Sección activa: marcada en rojo con el subrayado, para saber dónde estás */
.main-nav > ul > li:not(:last-child) > a.active { color: var(--red); }
.main-nav > ul > li:not(:last-child) > a.active::before { transform: scaleX(1); }

/* Botón "Contacto" destacado en la barra de navegación */
.main-nav > ul > li:last-child > a {
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 0.58rem 1.35rem;
  margin-left: 0.6rem;
}
.main-nav > ul > li:last-child > a:hover { background: var(--red-dark); color: #fff; }
.main-nav > ul > li:last-child > a::before { display: none; }

/* Dropdowns (submenús) */
.has-dropdown { position: relative; }
.has-dropdown > a::after {
  content: "";
  display: inline-block;
  margin-left: 0.45rem;
  vertical-align: middle;
  width: 0.4rem; height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  opacity: 0.5;
  transition: transform var(--transition), opacity var(--transition);
}
.has-dropdown > a:hover::after { opacity: 0.9; }
.dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a { font-weight: 600; padding: 0.6rem 0.9rem; font-size: 0.85rem; }
.dropdown a:hover { background: var(--red-soft); color: var(--red); }

.nav-cta { flex-shrink: 0; }

/* Botón hamburguesa (solo en pantallas pequeñas) */
.nav-toggle {
  display: none;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: var(--transition); }

/* ===================================================================
   Hero
   =================================================================== */
.hero {
  position: relative;
  background: var(--gray-100);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
/* Cabeceras de solo texto (Avances médicos, páginas de artículo):
   mismo padding vertical que las cabeceras con .hero-inner. */
.hero > .container:not(.hero-inner) { padding-block: clamp(3.5rem, 7vw, 6rem); }
.hero h1 { margin-bottom: 1.2rem; }
.hero .lead { margin-bottom: 2rem; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-note { margin-top: 2rem; font-size: 0.88rem; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }

/* ===================================================================
   Placeholders de imagen
   =================================================================== */
.placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0 14px, rgba(0,0,0,0.04) 14px 28px),
    var(--gray-200);
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-align: center;
  min-height: 220px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.placeholder::before {
  content: "";
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(208,4,60,0.25);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 60% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.placeholder--ratio { aspect-ratio: 4 / 3; min-height: 0; }
.placeholder--wide { aspect-ratio: 16 / 7; min-height: 0; }
.placeholder--square { aspect-ratio: 1 / 1; min-height: 0; }
.placeholder--hero { aspect-ratio: 3 / 2; min-height: 0; box-shadow: var(--shadow-soft); }
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  min-height: 0;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
/* Inicio: la imagen del hero iguala la altura del bloque de texto en vez de mantener su propio ratio */
.hero-inner--home { align-items: stretch; }
.hero-inner--home .hero-img { width: 100%; height: 100%; aspect-ratio: auto; }
.placeholder--avatar { aspect-ratio: 1/1; border-radius: 50%; min-height: 0; }
/* Mapa: altura fija y ancho 100%, sin aspect-ratio (evita desbordes en grids) */
.placeholder--map { aspect-ratio: auto; width: 100%; height: 100%; min-height: 360px; }

/* Mapa de ubicación embebido (Google Maps) */
.map-frame {
  width: 100%;
  min-height: 360px;
  height: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ===================================================================
   Tarjetas / Grids
   =================================================================== */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.5vw, 2.2rem);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--gray-300); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted); margin-bottom: 0; }

.card-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 50%;
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
}
/* Enlace "Leer más" dentro de una tarjeta-enlace */
a.card { display: flex; flex-direction: column; color: inherit; }
.card-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 1.2rem;
  color: var(--red);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
a.card:hover .card-more { color: var(--red-dark); }

/* ---- Artículo / paper ---- */
.article { max-width: 840px; margin-inline: auto; }
.article p { margin-bottom: 1.4rem; text-align: justify; }
.article h3 { margin-top: 2.4rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }
.article-subtitle {
  font-family: var(--font-head); font-weight: 700; color: var(--heading);
  font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.35;
  margin-top: 1.9rem; margin-bottom: 0;
}
.article-figure { margin: 2.5rem 0; }
.article-figure figcaption { margin-top: 0.8rem; font-size: 0.9rem; color: var(--muted); text-align: center; font-style: italic; }

/* ---- Noticia / artículo de prensa ---- */
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; font-size: 0.85rem; color: var(--muted); }
.article-cat { background: var(--red); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; padding: 0.32rem 0.75rem; border-radius: 999px; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gray-300); }
.article-lead { font-size: 1.15rem; color: var(--gray-700); line-height: 1.65; }

.toc {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; margin: 2.5rem 0;
}
.toc > summary {
  cursor: pointer; font-family: var(--font-head); font-weight: 700; color: var(--heading);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after {
  content: "Ocultar"; color: var(--red); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.toc:not([open]) > summary::after { content: "Mostrar"; }
.toc ol { margin: 1rem 0 0; padding-left: 1.5rem; }
.toc ol ol { margin: 0.35rem 0 0.35rem; }
.toc li { margin-bottom: 0.45rem; text-align: left; }
.toc a { color: var(--text); font-size: 0.95rem; }
.toc a:hover { color: var(--red); }
.article h2 { margin-top: 2.6rem; scroll-margin-top: 110px; }
.article h3 { scroll-margin-top: 110px; }

/* Tarjeta de estudio */
.study-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
  transition: box-shadow var(--transition);
}
.study-card:hover { box-shadow: var(--shadow-soft); }
.study-card .study-meta {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  font-weight: 700;
}
.study-card h4 { margin: 0; font-size: 1.02rem; color: var(--heading); }
.study-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
/* Tarjeta de estudio clicable (abre el PDF) */
a.study-card { color: inherit; text-decoration: none; }
a.study-card:hover { border-color: var(--red); transform: translateY(-2px); }
.study-card .study-pdf { margin-top: 0.5rem; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); }

/* Listado de estudios en PDF (clicables) */
.pdf-list { display: grid; gap: 0.85rem; }
.pdf-list + .pdf-subhead { margin-top: 2.2rem; }
.pdf-subhead {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-700); margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border);
}
.pdf-card {
  display: flex; align-items: center; gap: 1.1rem;
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--red);
  border-radius: var(--radius-sm); padding: 1rem 1.3rem;
  text-decoration: none; color: var(--text); transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.pdf-card:hover { box-shadow: var(--shadow-soft); border-color: var(--red); transform: translateX(3px); color: var(--text); }
.pdf-card:hover .pdf-go { color: var(--red-dark); }
.pdf-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 9px;
  background: var(--red-soft); display: grid; place-items: center;
}
.pdf-icon::before {
  content: ""; width: 22px; height: 22px; background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6M9 17h6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6M9 17h6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.pdf-card .pdf-title { flex: 1; font-weight: 600; font-size: 0.95rem; line-height: 1.45; color: var(--heading); }
.pdf-card .pdf-go {
  flex-shrink: 0; color: var(--red); font-weight: 700; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; transition: color var(--transition);
}
@media (max-width: 540px) {
  .pdf-card .pdf-go { display: none; }
  .pdf-card { padding: 0.9rem 1rem; gap: 0.8rem; }
}

/* ===================================================================
   Split / dos columnas
   =================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split-media { order: 2; }
.split--top { align-items: start; }
/* Hueco de imagen pendiente: oculto (no se elimina del código) hasta tener la foto definitiva */
.split--no-media { grid-template-columns: 1fr; }
.is-hidden { display: none; }
/* En la página de contacto: alinear el borde superior de la 1.ª tarjeta
   (Dirección) con el del 1.er campo (Nombre), compensando la altura del título. */
.split--top .split-media { margin-top: 2.7rem; }

/* Lista de checks */
.check-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--text); }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.45rem;
  width: 1.25rem; height: 1.25rem;
  background: var(--red);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/0.8rem no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/0.8rem no-repeat;
}

/* Pasos numerados */
.steps { counter-reset: step; display: grid; gap: 1.8rem; }
.step { position: relative; padding-left: 4.5rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: 50%;
}
.step h3 { margin-bottom: 0.3rem; }
.step p { color: var(--muted); margin: 0; }

/* ===================================================================
   FAQ acordeón
   =================================================================== */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 1rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq-item.open { border-color: var(--red); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; color: var(--heading);
  padding: 1.3rem 1.6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q::after { content: "+"; font-size: 1.5rem; color: var(--red); transition: transform var(--transition); }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a-inner { padding: 0 1.6rem 1.4rem; color: var(--muted); }
.faq-a-inner p { margin: 0 0 1rem; }
.faq-a-inner ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.faq-a-inner li { margin-bottom: 0.5rem; }
.faq-a-inner li::marker { color: var(--red); }
.faq-a-inner p:last-child, .faq-a-inner ul:last-child { margin-bottom: 0; }

/* ===================================================================
   Centros autorizados
   =================================================================== */
.map-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: stretch; }
.map-wrap > * { min-width: 0; }
.map-wrap .center-stack { display: flex; flex-direction: column; gap: 1.2rem; }
.center-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.8rem; }

/* Título-enlace al dossier con efecto del home original (texto → botón al pasar el ratón) */
.dossier-cta {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--red); line-height: 1.2;
  font-size: clamp(1rem, 1.9vw, 1.4rem);
  padding: 0.85rem 1.7rem; border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.dossier-cta svg { width: 1.05em; height: 1.05em; flex-shrink: 0; stroke: currentColor; fill: none; }
.dossier-cta:hover { background: var(--red); color: #fff; }

/* Distintivos de confianza (3 iconos circulares rellenos en rojo de marca) */
.trust-badges {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem); max-width: 1000px; margin: 0 auto; text-align: center;
}
.trust-badge .badge-icon {
  width: clamp(96px, 10vw, 128px); aspect-ratio: 1; border: 2px solid var(--red);
  border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.3rem;
}
.badge-img {
  display: block; width: 54%; height: 54%; background: var(--red);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.badge-img--seal { -webkit-mask-image: url('../assets/img/icon-seal-check.svg'); mask-image: url('../assets/img/icon-seal-check.svg'); }
.badge-img--heart { width: 62%; height: 62%; -webkit-mask-image: url('../assets/img/icon-hands-heart.svg'); mask-image: url('../assets/img/icon-hands-heart.svg'); }
.badge-img--iberia { width: 82%; height: 82%; -webkit-mask-image: url('../assets/img/iberia.svg'); mask-image: url('../assets/img/iberia.svg'); }
.trust-badge p { color: var(--muted); max-width: 30ch; margin: 0 auto; text-align: center; }
@media (max-width: 620px) { .trust-badges { grid-template-columns: 1fr; gap: 2.5rem; } }
.center-card h4 { margin-bottom: 0.3rem; }
.center-card address { font-style: normal; color: var(--muted); font-size: 0.95rem; }

/* ===================================================================
   Anchor / sidebar (página Humanos)
   =================================================================== */
.with-sidebar { display: grid; grid-template-columns: 250px 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.anchor-nav { position: sticky; top: 116px; }
.anchor-nav h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.anchor-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.anchor-nav a {
  display: block; font-size: 0.9rem; font-weight: 600; color: var(--gray-700);
  padding: 0.45rem 0.8rem; border-left: 2px solid var(--border);
}
.anchor-nav a:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }

.condition-block { padding-block: 2.5rem; border-bottom: 1px solid var(--border); scroll-margin-top: 120px; }
.condition-block:first-child { padding-top: 0; }
.condition-block:last-child { border-bottom: none; }
.condition-block h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* ===================================================================
   Vídeos
   =================================================================== */
.video-card { background:#fff; border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; transition: box-shadow var(--transition); }
.video-card:hover { box-shadow: var(--shadow-soft); }
.video-thumb { position: relative; }
.video-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px;
  background: var(--red); border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-soft);
}
.video-thumb .play::after {
  content:""; width:0; height:0;
  border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px;
}
/* Vídeos: menos espacio superior en cada apartado para que quede más ajustado */
#preparacion, #doctores, #pacientes, #famosos { padding-top: clamp(2rem, 4vw, 3.25rem); }
.video-embed { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; border: 0; }
.video-card .video-body { padding: 1.2rem 1.4rem; }
.video-card .video-dl { margin: 0.5rem 0 0; font-size: 0.88rem; font-weight: 700; }
.video-card h4 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.video-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ===================================================================
   Noticias
   =================================================================== */
.post-card { display: flex; flex-direction: column; background:#fff; border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; transition: box-shadow var(--transition); }
.post-card:hover { box-shadow: var(--shadow-soft); }
.post-card .post-body { padding: 1.4rem 1.6rem; display:flex; flex-direction:column; gap:0.5rem; flex:1; }
.post-date { font-size: 0.76rem; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.post-card h3 { font-size: 1.15rem; margin: 0; }
.post-card h3 a { color: var(--heading); }
.post-card h3 a:hover { color: var(--red); }
.post-card p { color: var(--muted); margin: 0; flex: 1; }
.post-card .read-more { font-weight: 700; font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ===================================================================
   Banda CTA
   =================================================================== */
.cta-band { background: var(--red); color: #fff; border-radius: var(--radius); padding: clamp(2.5rem, 5vw, 4rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band h2::after { background: #fff; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 600px; margin-inline: auto; }

/* ===================================================================
   Formulario de contacto
   =================================================================== */
.form-grid { display: grid; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.88rem; font-family: var(--font-head); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 1rem; padding: 0.85rem 1rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: #fff; color: var(--text); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft);
}
.field input:invalid:not(:placeholder-shown) { border-color: var(--red); }
.req { color: var(--red); font-weight: 700; }
.form-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.form-check input { width: auto; margin-top: 0.25rem; accent-color: var(--red); }
.form-success {
  background: #edf8f0; border: 1px solid #bfe3c8; color: #1f7a3a;
  border-radius: var(--radius-sm); padding: 0.9rem 1.1rem;
  font-size: 0.92rem; font-weight: 600; margin: 0; text-align: left;
}
/* Campo trampa anti-spam (honeypot): oculto a usuarios, visible para bots */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--red); font-size: 0.88rem; font-weight: 700; margin: 0; text-align: left; }
.form-note { color: var(--muted); font-size: 0.8rem; margin: 0.1rem 0 0; text-align: left; }
.form-note a { color: var(--muted); text-decoration: underline; }

/* ===================================================================
   Pie de página
   =================================================================== */
.site-footer { background: var(--gray-900); color: #b8b8b8; padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.site-footer a { color: #b8b8b8; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.footer-brand .brand-logo { height: 44px; width: auto; margin-bottom: 1rem; background: #fff; padding: 9px 12px; border-radius: var(--radius-sm); }
.footer-brand p { color: #9a9a9a; font-size: 0.93rem; max-width: 32ch; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; font-size: 0.83rem; color: #8a8a8a;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; }
.footer-legal a { color: #b8b8b8; }
.footer-legal a:hover { color: #fff; }

/* ---------- Banner de cookies (RGPD) ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1500;
  max-width: 680px; margin-inline: auto;
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--red);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem;
  animation: gate-in 0.3s ease;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; color: var(--muted); text-align: left; flex: 1 1 280px; }
.cookie-banner .cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.6rem 1.25rem; font-size: 0.82rem; }

/* ===================================================================
   Modal — Verificación profesional sanitario
   =================================================================== */
.gate {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(20, 20, 20, 0.7); backdrop-filter: blur(4px);
}
.gate.active { display: flex; }
.gate-box {
  background: #fff; border-radius: var(--radius); border-top: 5px solid var(--red);
  max-width: 540px; width: 100%; padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow); text-align: center; animation: gate-in 0.3s ease;
}
@keyframes gate-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.gate-icon {
  width: 64px; height: 64px; margin: 0 auto 1.4rem; display: grid; place-items: center;
  background: var(--red-soft); color: var(--red); border-radius: 50%; font-size: 1.8rem;
}
.gate-box h2 { font-size: 1.5rem; }
.gate-box h2::after { display: none; }
.gate-box p { color: var(--muted); font-size: 0.96rem; }
.gate-actions { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.8rem; }
.gate-actions .btn { justify-content: center; width: 100%; }
.gate-deny { background: none; border: none; cursor: pointer; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 0.88rem; text-decoration: underline; }
.gate-denied-msg { display: none; }
.gate.denied .gate-default { display: none; }
.gate.denied .gate-denied-msg { display: block; }

/* Aviso superior de profesional sanitario */
.pro-banner { background: var(--red); color: #fff; font-size: 0.8rem; text-align: center; padding: 0.55rem 1rem; }
.pro-banner strong { color: #fff; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1180px) {
  .main-nav a { padding: 0.6rem 0.5rem; font-size: 0.8rem; }
  .brand-logo { height: 46px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .main-nav {
    position: fixed; inset: 92px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); margin: 0;
    max-height: calc(100vh - 92px); overflow-y: auto;
    transform: translateY(-120%); transition: transform 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 1rem; }
  .main-nav > ul > li { border-bottom: 1px solid var(--border); }
  .main-nav > ul > li:last-child { border-bottom: none; }
  .main-nav a { padding: 0.9rem 0.5rem; font-size: 1rem; }
  .main-nav > ul > li > a::before { display: none; }
  .main-nav > ul > li:last-child > a { background: none; color: var(--gray-700); border-radius: 0; padding: 0.9rem 0.5rem; margin-left: 0; }
  .has-dropdown > a::after { float: right; margin-top: 0.55rem; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-top: none; padding: 0 0 0.5rem 1rem; display: none;
  }
  .has-dropdown.open > .dropdown { display: block; }

  .hero-inner, .split, .map-wrap, .with-sidebar { grid-template-columns: 1fr; }
  .hero-inner--home { align-items: normal; }
  .hero-inner--home .hero-img { height: auto; aspect-ratio: 3 / 2; }
  .split--reverse .split-media { order: 0; }
  .split--top .split-media { margin-top: 0; }
  .anchor-nav { position: static; display: none; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .step { padding-left: 0; padding-top: 4rem; }
}
