/* =====================================================================
   AMBIOS · Tema "Editorial" (inspirado en el estilo de exactsciences.com)
   ---------------------------------------------------------------------
   Capa de override que se carga DESPUÉS de ambios-theme.css. Reinterpreta
   el sitio con un lenguaje visual más editorial y "premium":
     · Mucho más aire (ritmo vertical amplio)
     · Titulares grandes, con tracking negativo y line-height ajustado
     · Cuerpo de texto más generoso y legible
     · Botones tipo píldora con transición suave
     · Tarjetas sin bordes duros: radios amplios + sombras sutiles
     · Fotografía a sangre con esquinas redondeadas
     · Logos de marcas en escala de grises que se colorean al pasar el mouse

   IMPORTANTE: conserva 100% la paleta de marca Ambios (navy/azul/aqua).
   Solo cambia LAYOUT y TIPOGRAFÍA. Para revertir, basta quitar el <link>.

   CÓMO USARLO (en include/header.php, tras ambios-theme.css):
     <link href="assets/css/ambios-theme.css" rel="stylesheet">
     <link href="assets/css/ambios-exact.css" rel="stylesheet">   <!-- nuevo -->
   ===================================================================== */

/* =====================================================================
   0 · Tokens de la capa editorial
   ===================================================================== */
:root {
  /* Radios más generosos, estilo Exact */
  --ex-radius-sm: 14px;
  --ex-radius:    22px;
  --ex-radius-lg: 28px;
  --ex-pill:      999px;

  /* Sombras suaves y difusas (nada de bordes marcados) */
  --ex-shadow:      0 10px 30px rgba(0, 43, 79, .06);
  --ex-shadow-lg:   0 24px 60px rgba(0, 43, 79, .12);
  --ex-shadow-soft: 0 2px 10px rgba(0, 43, 79, .05);

  /* Ritmo vertical de sección (amplio) */
  --ex-section-y: clamp(64px, 8vw, 116px);

  /* Neutros editoriales */
  --ex-ink:     #10233a;   /* casi-negro azulado para titulares */
  --ex-body:    #45566a;   /* cuerpo de texto, gris azulado */
  --ex-hair:    rgba(0, 43, 79, .09);  /* líneas finas */
  --ex-cream:   #f6f9fc;   /* fondo claro alterno, muy sutil */
}

/* =====================================================================
   1 · Tipografía — escala grande y editorial
   ===================================================================== */
body {
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ex-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ex-ink);
  letter-spacing: -0.018em;
  line-height: 1.1;
  font-weight: 700;
}

/* Titular de sección: grande, respirado */
.section h2,
.section .row h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
  margin-bottom: .35em;
}

/* Antetítulo / eyebrow uniforme en todo el sitio */
.section .subtitle,
.subtitle {
  display: inline-block;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ambios-aqua-700) !important;
  margin-bottom: .9rem;
}

/* Bajada / intro bajo los títulos de sección */
.section .row.text-center p,
.section-intro {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--ex-body);
  max-width: 640px;
  margin-inline: auto;
}

/* Encabezado de sección con más aire debajo */
.section .row.text-center.mb-4 { margin-bottom: 3.2rem !important; }

/* =====================================================================
   2 · Ritmo de secciones — mucho más aire
   ===================================================================== */
.section {
  padding: var(--ex-section-y) 0;
  scroll-margin-top: 96px;
}

/* Fondo claro alterno más neutro (crema azulada, no azul plano) */
.light-background { --background-color: var(--ex-cream); }

/* Contenedor con un pelín más de margen lateral en pantallas medias */
@media (min-width: 1200px) {
  .container, .container-xl { max-width: 1200px; }
}

/* =====================================================================
   3 · Botones — píldora, generosos, con lift sutil
   ===================================================================== */
.btn,
.btn-getstarted,
.hero-cta a,
.audience-card .btn-aud,
.home-blog-foot a,
.cta-band .cta-band-btn {
  border-radius: var(--ex-pill) !important;
  font-weight: 600;
  letter-spacing: .005em;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}

.btn-primary,
.hero-cta .primary {
  padding: 13px 30px;
  box-shadow: 0 8px 22px rgba(0, 74, 136, .22);
}
.btn-primary:hover,
.hero-cta .primary:hover,
.btn-getstarted:hover,
.home-blog-foot a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 74, 136, .28);
}

/* CTA del header un poco más presente (estilo Exact: píldora clara y firme) */
.header .btn-getstarted {
  padding: 9px 24px;
  font-size: .92rem;
  box-shadow: 0 6px 16px rgba(0, 74, 136, .18);
}
.header .btn-getstarted:hover { transform: translateY(-1px); }

/* Enlace "de texto con flecha": la flecha se desliza al hover */
.feat-link,
.post-link,
.prod-link,
.pcc-link,
.feat-card .feat-link {
  display: inline-flex; align-items: center; gap: .45em;
}
.feat-card:hover .feat-link,
.post-card:hover .post-link,
.prod-card:hover .prod-link { gap: .8em; }

/* =====================================================================
   4 · Tarjetas — sin bordes duros, radios amplios, sombra al hover
   ===================================================================== */
.feat-card,
.post-card,
.prod-card,
.prod-cat-card,
.svc-card,
.sede-card,
.mvv-card,
.about-stat,
.testi-card,
.evento-card {
  border: 1px solid var(--ex-hair) !important;
  border-radius: var(--ex-radius) !important;
  box-shadow: var(--ex-shadow-soft);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.feat-card:hover,
.post-card:hover,
.prod-card:hover,
.prod-cat-card:hover,
.svc-card:hover,
.sede-card:hover,
.evento-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ex-shadow-lg);
  border-color: transparent !important;
}

/* Tarjetas destacadas del home: más padding, ícono más suave */
.feat-card { padding: 34px 32px; border-radius: var(--ex-radius-lg) !important; }
.feat-card .feat-ico {
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--ambios-aqua-tint); color: var(--ambios-blue);
  font-size: 27px;
}
.feat-card h3 { font-size: 1.35rem; }

/* Portadas de tarjetas: más altas y con transición de zoom sutil */
.post-card .post-cover,
.prod-card .prod-cover { overflow: hidden; }
.post-card .post-cover img,
.prod-card .prod-cover img { transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.post-card:hover .post-cover img,
.prod-card:hover .prod-cover img { transform: scale(1.05); }

/* Tarjetas con foto de portada a 2 columnas (Pharma, Vigilancia) */
.photo-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.photo-cards .post-card { text-decoration: none; }
.photo-cards .post-cover { aspect-ratio: 16/9; }
.photo-cards .post-card h3 { font-size: 1.35rem; }
@media (max-width: 700px) { .photo-cards { grid-template-columns: 1fr; } }

/* Chips de categoría más suaves */
.post-card .post-meta .cat,
.prod-card .prod-tag,
.svc-card .svc-tag {
  background: var(--ambios-aqua-tint);
  color: var(--ambios-aqua-700);
}

/* =====================================================================
   5 · Hero — más limpio, titular más grande, degradado más sutil
   ===================================================================== */
/* Alto del hero: proporcional a la ventana pero acotado, para que no se
   dispare en pantallas muy altas (y capture/renderice de forma consistente) */
.hero-carousel .ambios-hero { min-height: clamp(560px, 82vh, 820px); }
@media (max-width: 768px) { .hero-carousel .ambios-hero { min-height: clamp(460px, 78vh, 640px); } }

.ambios-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: .35em 0 .5em;
}
.ambios-hero p.lead {
  font-size: 1.22rem;
  line-height: 1.6;
  max-width: 560px;
}
.ambios-hero .eyebrow {
  letter-spacing: .18em;
  font-size: .82rem;
}
.hero-cta { margin-top: 34px; gap: 14px; }

/* Paginación del hero: barritas finas y elegantes */
.hero-carousel .swiper-pagination-bullet {
  width: 28px; height: 4px; border-radius: 4px; opacity: .4;
}
.hero-carousel .swiper-pagination-bullet-active {
  width: 44px; opacity: 1; background: #fff;
}

/* =====================================================================
   6 · Bloques oscuros (impact / CTA / navy) — más aire y sobriedad
   ===================================================================== */
.impact { padding: var(--ex-section-y) 0; }
.impact h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-bottom: 2.4rem;
}
.impact .impact-num {
  font-size: clamp(2.8rem, 5.4vw, 4rem);
  letter-spacing: -0.03em;
}
.impact .impact-item { padding: 30px 18px; border-radius: var(--ex-radius); }

/* CTA de cierre: más generoso y centrado */
.cta-band { padding: clamp(64px, 8vw, 104px) 0; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); }
.cta-band .cta-band-sub { font-size: 1.15rem; margin-bottom: 2rem; }

/* Sección navy del blog: titulares grandes */
.section-navy h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }

/* =====================================================================
   7 · Franja de marcas — logos en escala de grises, color al hover
   (recurso editorial muy característico de sitios como Exact)
   ===================================================================== */
.marcas-grid { gap: 34px 28px; align-items: center; }
.marcas-grid img {
  filter: grayscale(1);
  opacity: .55;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
  max-width: 170px;
}
.marcas-grid img:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: none;
}

/* Sellos/acreditaciones: mismo tratamiento sobrio */
.sellos-grid .sello-logo { opacity: .8; transition: opacity .3s ease; }
.sellos-grid .sello-logo:hover { opacity: 1; }

/* =====================================================================
   8 · Bloque Profesionales / fotos — imágenes más "a sangre"
   ===================================================================== */
.pro-photos img,
.post-detail .post-hero,
.prod-detail .prod-hero {
  border-radius: var(--ex-radius-lg);
}
.pro-band { gap: 48px; }
.pro-tagline { font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.25; }
.pp-subhead { font-size: 1.5rem; margin-bottom: 22px; }

/* =====================================================================
   9 · Header — más aire y minimalismo
   ===================================================================== */
#header.header { --header-height: 78px; }
.header { min-height: 78px; }
.navmenu > ul > li > a { font-weight: 500; letter-spacing: .005em; }
.header .logo img { height: 42px; }

/* Sombra del header más sutil y solo al hacer scroll se siente */
#header.header,
.header.sticky-top,
body .header {
  box-shadow: 0 1px 0 var(--ex-hair) !important;
}

/* =====================================================================
   10 · Título de páginas internas — versión editorial
   ---------------------------------------------------------------------
   Se conserva el degradado navy→aqua de la marca, pero con más aire,
   titular grande y mejor jerarquía de breadcrumbs.
   ===================================================================== */
.page-title,
.page-title.light-background {
  padding: clamp(48px, 6vw, 84px) 0;
}
.page-title h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
}
.page-title .breadcrumbs { margin-top: .6rem; }
.page-title .breadcrumbs ol { font-size: .9rem; letter-spacing: .01em; }

/* Sub-navegación sticky (categorías): pastillas más suaves */
.cat-nav a { border-color: var(--ex-hair); border-radius: var(--ex-pill); }

/* =====================================================================
   11 · FAQ y testimonios — más aire, bordes suaves
   ===================================================================== */
.ambios-faq .accordion-item {
  border: 1px solid var(--ex-hair) !important;
  border-radius: var(--ex-radius) !important;
  box-shadow: var(--ex-shadow-soft);
  margin-bottom: 14px;
}
.ambios-faq .accordion-button { padding: 20px 22px; font-size: 1.05rem; }
.ambios-faq .accordion-body { padding: 0 22px 22px; font-size: 1rem; }

.testi-card { border: 1px solid var(--ex-hair) !important; border-radius: var(--ex-radius) !important; box-shadow: var(--ex-shadow-soft); padding: 30px; }
.testi-text { font-size: 1.05rem; line-height: 1.65; }

/* =====================================================================
   12 · Detalles finos
   ===================================================================== */
/* Scroll-top redondo y suave */
.scroll-top { border-radius: 50%; box-shadow: var(--ex-shadow); }

/* Imágenes de contenido con radio amplio por defecto en detalle */
.post-detail .post-content img { border-radius: var(--ex-radius-sm); }

/* Foco accesible coherente con la marca */
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--ambios-aqua);
  outline-offset: 2px;
}

/* =====================================================================
   13 · HOME · Efectos editoriales (portados de estilo-exact.html)
   ---------------------------------------------------------------------
   Hero con video, scrollytelling "Propósito", splits a sangre y
   marquesina de marcas. El JS vive en assets/js/ambios-exact.js.
   ===================================================================== */

/* --- 13.1 · Hero con video de fondo --- */
.hero-video-sec {
  position: relative;
  min-height: clamp(560px, 82vh, 820px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-video-sec .hvs-poster { position: absolute; inset: 0; background: center/cover no-repeat; z-index: 0; }
.hero-video-sec .hvs-video  { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-video-sec .hvs-overlay { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,26,52,.84) 0%, rgba(0,26,52,.58) 44%, rgba(0,26,52,.18) 82%, rgba(0,26,52,.04) 100%); }
.hero-video-sec .hvs-overlay::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,26,52,.30), transparent 30%, transparent 70%, rgba(0,26,52,.42)); }
.hero-video-sec .container { position: relative; z-index: 2; }
.hero-video-sec .hvs-inner { max-width: 660px; padding: 60px 0; }
.hero-video-sec .eyebrow {
  display: inline-block; color: var(--ambios-aqua);
  font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: .7rem;
}
.hero-video-sec h1 {
  color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  line-height: 1.04; letter-spacing: -.025em; margin: .2em 0 .45em;
}
.hero-video-sec p.lead {
  font-size: 1.22rem; line-height: 1.6; color: rgba(255,255,255,.92);
  max-width: 540px; margin: 0 0 30px;
}
.hero-video-sec .hero-cta { margin-top: 0; }
/* Indicador de scroll */
.hero-video-sec .scroll-cue {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: rgba(255,255,255,.8); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
}
.hero-video-sec .scroll-cue .mouse { width: 23px; height: 36px; border: 2px solid rgba(255,255,255,.7); border-radius: 13px; position: relative; }
.hero-video-sec .scroll-cue .mouse::before { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; border-radius: 2px; background: #fff; transform: translateX(-50%); animation: hvsWheel 1.6s ease-in-out infinite; }
@keyframes hvsWheel { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 768px) { .hero-video-sec { min-height: clamp(460px, 78vh, 640px); } .hero-video-sec .scroll-cue { display: none; } }

/* --- 13.2 · Scrollytelling "Nuestro propósito" --- */
.story { position: relative; }
.story-track { position: relative; height: 260vh; }               /* recorrido ≈ 2 pasos */
.story-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.story-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.14); transition: opacity 1s ease;
}
.story-bg.active { opacity: 1; transform: scale(1); transition: opacity 1s ease, transform 8s ease; }
.story-overlay { position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(0,26,52,.78) 0%, rgba(0,26,52,.5) 45%, rgba(0,26,52,.24) 100%),
              linear-gradient(180deg, rgba(0,26,52,.48), transparent 28%, transparent 62%, rgba(0,26,52,.52)); }
.story-stage .container { position: relative; z-index: 3; width: 100%; }
.story-caption { position: relative; min-height: clamp(260px, 42vh, 440px); }
.story-line { position: absolute; top: 0; left: 0; max-width: 920px; opacity: 0; transform: translateY(38px); transition: opacity .8s ease, transform .8s ease; pointer-events: none; }
.story-line.active { opacity: 1; transform: none; pointer-events: auto; }
.story-line .num { display: block; font-weight: 700; color: var(--ambios-aqua); font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 18px; }
.story-line h2 { color: #fff; font-size: clamp(2.1rem, 5.4vw, 4.4rem); line-height: 1.05; letter-spacing: -.03em; }
.story-dots { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; gap: 14px; }
.story-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.35); transition: transform .3s ease, background .3s ease; }
.story-dot.active { background: var(--ambios-aqua); transform: scale(1.35); }
@media (max-width: 700px) { .story-dots { right: 16px; } }

/* --- 13.3 · Splits (imagen a sangre + texto, alternados) --- */
.ex-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ex-split + .ex-split { margin-top: clamp(48px, 6vw, 88px); }
.ex-split.reverse .ex-split-media { order: 2; }
.ex-split-media img { width: 100%; border-radius: var(--ex-radius-lg); box-shadow: var(--ex-shadow); aspect-ratio: 5/4; object-fit: cover; }
.ex-split-body h3 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.08; margin-bottom: 16px; }
.ex-split-body .lead { font-size: 1.14rem; color: var(--ex-body); margin-bottom: 22px; }
.ex-split .feat { display: flex; gap: 14px; margin: 16px 0; }
.ex-split .feat .ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px; background: var(--ambios-aqua-tint); color: var(--ambios-blue); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ex-split .feat h4 { font-size: 1.05rem; color: var(--ex-ink); margin: 0 0 3px; }
.ex-split .feat p { margin: 0; font-size: .96rem; color: var(--ex-body); }
@media (max-width: 900px) { .ex-split { grid-template-columns: 1fr; gap: 32px; } .ex-split.reverse .ex-split-media { order: 0; } }

/* --- 13.4 · Marquesina de marcas (loop continuo) --- */
.marca-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marca-track { display: flex; width: max-content; align-items: center; gap: 56px; animation: ambiosScrollX 36s linear infinite; }
.marca-marquee:hover .marca-track { animation-play-state: paused; }
.marca-track img {
  flex: 0 0 auto; height: 40px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1); opacity: .55; transition: filter .3s ease, opacity .3s ease;
}
.marca-track img:hover { filter: grayscale(0); opacity: 1; }
@keyframes ambiosScrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marca-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* --- 13.5 · Banda de confianza (marcas, justo bajo el hero) --- */
.trust-band { padding: 30px 0 26px; border-bottom: 1px solid var(--ex-hair); }
.trust-band .trust-label {
  text-align: center; font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ambios-muted); margin-bottom: 20px;
}

/* --- 13.6 · Anclas del menú superior: compensar el header sticky --- */
#nosotros, #diagnostico, #pharma, #vigilancia, #blog, #eventos, #contacto { scroll-margin-top: 90px; }

/* --- 13.7 · Enlace de texto con flecha (utilidad) --- */
.textlink { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--ambios-blue); text-decoration: none; transition: gap .2s ease, color .2s ease; }
.textlink:hover { color: var(--ambios-aqua-700); gap: .7em; }

/* --- 13.8 · Hero de video compacto para páginas internas (con breadcrumb) --- */
.hero-video-sec.hero-compact { min-height: clamp(360px, 52vh, 560px); }
.hero-video-sec.hero-compact .hvs-inner { padding: 40px 0; max-width: 760px; }
.hero-video-sec .hvs-crumbs { margin-bottom: 16px; }
.hero-video-sec .hvs-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.hero-video-sec .hvs-crumbs a { color: rgba(255,255,255,.82); }
.hero-video-sec .hvs-crumbs a:hover { color: #fff; }
.hero-video-sec .hvs-crumbs .current { color: #fff; }
.hero-video-sec .hvs-crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255,255,255,.5); }
