/* ==========================================================================
   Dr. Jean Karlo Rojas — Medicina Nuclear
   Hoja de estilos principal
   Paleta: azul marino institucional, blanco, gris azulado, teal médico discreto
   ========================================================================== */

/* ---------- Variables de diseño ---------- */
:root {
  /* Colores institucionales */
  --navy-900: #0b2138;   /* azul marino profundo */
  --navy-800: #123253;   /* azul marino institucional */
  --navy-700: #1b4570;   /* azul marino medio */
  --teal-600: #2b7d84;   /* teal médico discreto */
  --teal-500: #3a97a0;
  --celeste-500: #4f8fb8;

  /* Neutros */
  --white: #ffffff;
  --paper: #f7f9fc;      /* fondo gris azulado muy claro */
  --lavender: #f2f3fa;   /* lavanda/gris suave */
  --gray-100: #eef2f7;
  --gray-200: #dde5ee;
  --gray-300: #c6d1de;

  /* Texto */
  --text: #16283a;
  --text-soft: #40566b;
  --text-muted: #64788c;
  --on-navy: #eaf1f8;
  --on-navy-soft: #b9cbdd;

  /* Acentos WhatsApp */
  --wa: #1eaf5a;
  --wa-dark: #178c48;

  /* Tipografía */
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Métricas */
  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(18, 50, 83, 0.06),
    0 2px 8px rgba(18, 50, 83, 0.05);
  --shadow-md: 0 6px 24px rgba(18, 50, 83, 0.09);
  --ring: 0 0 0 3px rgba(79, 143, 184, 0.35);
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* compensa header fijo al navegar por anclas */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy-700);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

/* Foco accesible visible en todo elemento interactivo */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

/* ---------- Utilidades de layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.section--tint {
  background: var(--paper);
}
.section--lavender {
  background: var(--lavender);
}
.section--navy {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: var(--on-navy);
}
.section--navy h2,
.section--navy h3 {
  color: var(--white);
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.5rem;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 0.65rem;
}
.section--navy .eyebrow {
  color: var(--teal-500);
}
.lead {
  font-size: 1.1rem;
  color: var(--text-soft);
}
.section--navy .lead {
  color: var(--on-navy-soft);
}

/* Salto para lectores de pantalla */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 200;
  background: var(--navy-800);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition);
  text-align: center;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn svg {
  flex: none;
}

.btn--primary {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--navy-700);
}

.btn--wa {
  background: var(--wa);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--wa:hover {
  background: var(--wa-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--gray-300);
}
.btn--ghost:hover {
  border-color: var(--navy-700);
  background: var(--white);
}

.btn--on-navy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--on-navy:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn--lg {
  padding: 1rem 1.8rem;
  font-size: 1.05rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--navy-900);
  white-space: nowrap;
  flex: none;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--navy-800), var(--teal-600));
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-list a:hover {
  color: var(--navy-800);
  text-decoration: none;
  border-bottom-color: var(--teal-500);
}

.header-cta {
  display: inline-flex;
  flex: none;
}
/* Botón WhatsApp del header más compacto en escritorio */
.header-cta .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.92rem;
}

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-800);
  position: relative;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle span::before {
  position: absolute;
  top: -6px;
}
.nav-toggle span::after {
  position: absolute;
  top: 6px;
}
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(170deg, var(--paper) 0%, var(--lavender) 100%);
  overflow: hidden;
}
.hero::after {
  /* halo molecular muy sutil, decorativo */
  content: "";
  position: absolute;
  right: -160px;
  top: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(
    circle,
    rgba(58, 151, 160, 0.12),
    rgba(58, 151, 160, 0) 68%
  );
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  margin-bottom: 0.6rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--navy-700);
  font-weight: 500;
  margin-bottom: 1.1rem;
}
.hero-text {
  color: var(--text-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.9rem;
  padding: 0;
  list-style: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-500);
}
.badge--id {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}
.badge--id::before {
  background: var(--celeste-500);
}

/* Retrato / avatar circular */
.hero-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar-photo {
  position: relative;
  width: min(380px, 82vw);
  aspect-ratio: 1 / 1;
}
/* Halo decorativo muy sutil detrás del avatar */
.avatar-photo::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(58, 151, 160, 0.16),
    rgba(58, 151, 160, 0) 70%
  );
  z-index: 0;
}
/* Anillo blanco + hairline teal alrededor del círculo */
.avatar-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 7px var(--white), 0 0 0 9px rgba(43, 125, 132, 0.28),
    0 18px 44px rgba(18, 50, 83, 0.26);
  z-index: 1;
  pointer-events: none;
}
.avatar-photo img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-caption {
  margin-top: 2rem;
  text-align: center;
  line-height: 1.4;
}
.avatar-caption strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--navy-900);
}
.avatar-caption span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Sobre mí ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 1.4rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.facts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.facts li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.facts li:first-child {
  padding-top: 0;
}
.facts dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.facts dd {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}
.note {
  font-size: 0.92rem;
  color: var(--text-muted);
  border-left: 3px solid var(--gray-300);
  padding-left: 0.9rem;
  margin-top: 1.4rem;
}

/* ---------- Grid de cards genérico ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--teal-600);
  margin-bottom: 1rem;
}
.card h3 {
  margin-bottom: 0.4rem;
}
.card p {
  color: var(--text-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- Teranóstica: pasos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
  margin-top: 2.2rem;
}
.step {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem 1.4rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-600);
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 600;
  margin-bottom: 0.9rem;
}
.step h3 {
  color: var(--white);
  margin-bottom: 0.35rem;
}
.step p {
  color: var(--on-navy-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Para médicos ---------- */
.doctors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lavender);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232b7d84' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.doctors-cta-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.doctors-cta-card p {
  color: var(--text-soft);
}

/* ---------- Artículos ---------- */
.article-card {
  display: flex;
  flex-direction: column;
}
.tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.tag--pacientes {
  background: #e7f2f3;
  color: var(--teal-600);
}
.tag--medicos {
  background: #e8eef7;
  color: var(--navy-700);
}
.tag--teranostica {
  background: #eee9f7;
  color: #5a4a8f;
}
.article-card h3 {
  margin-bottom: 0.5rem;
}
.article-card p {
  color: var(--text-soft);
  font-size: 0.96rem;
  flex-grow: 1;
}
.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-700);
  margin-top: 0.6rem;
}
.article-link[aria-disabled="true"] {
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}
.article-link .soon {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gray-100);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* ---------- Innovación ---------- */
.innovation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.4rem 0 0;
  list-style: none;
}
.pill {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-800);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.5rem 1rem;
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.contact-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.contact-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.contact-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-navy-soft);
}
.contact-list dd {
  margin: 0;
  color: var(--white);
  font-weight: 500;
}
.contact-list a {
  color: var(--white);
}
.contact-card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.contact-card h3 {
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--text-soft);
}
.contact-card .btn {
  width: 100%;
  margin-top: 0.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--on-navy-soft);
  padding-block: 3rem 2rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.9rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.footer-col a {
  color: var(--on-navy-soft);
}
.footer-col a:hover {
  color: var(--white);
}
.disclaimer {
  font-size: 0.82rem;
  color: var(--on-navy-soft);
  line-height: 1.6;
  max-width: 70ch;
}
.footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--on-navy-soft);
}

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.5rem);
  bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--wa);
  color: var(--white);
  font-weight: 600;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(30, 175, 90, 0.4);
  transition: transform var(--transition), background var(--transition);
}
.wa-float:hover {
  background: var(--wa-dark);
  text-decoration: none;
  transform: translateY(-2px);
}
.wa-float .wa-label {
  display: inline;
}

/* ---------- Animaciones de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .doctors-grid,
  .innovation-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-portrait {
    order: -1;
    max-width: 360px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Colapso del menú a hamburguesa (antes, porque el nav tiene más ítems) */
@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1.25rem 1.25rem;
    transform: translateY(-140%);
    transition: transform 240ms ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav.is-open {
    transform: none;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gray-100);
  }
  .header-cta {
    margin-top: 0.9rem;
  }
  .header-cta .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .hero-actions .btn {
    width: 100%;
  }
  .wa-float .wa-label {
    display: none; /* solo icono en pantallas pequeñas */
  }
  .wa-float {
    padding: 0.9rem;
  }
}

/* ---------- Preferencias del usuario ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Páginas de artículo
   ========================================================================== */
.article-hero {
  background: linear-gradient(170deg, var(--paper) 0%, var(--lavender) 100%);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--gray-200);
}
.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.breadcrumb a {
  color: var(--navy-700);
}
.breadcrumb span {
  margin-inline: 0.4rem;
  color: var(--gray-300);
}
.article-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 20ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Cuerpo del artículo con ancho de lectura cómodo */
.prose {
  max-width: 72ch;
  margin-inline: auto;
  font-size: 1.07rem;
}
.prose > p:first-of-type {
  font-size: 1.18rem;
  color: var(--text-soft);
}
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-top: 2.4rem;
}
.prose h3 {
  margin-top: 1.6rem;
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}
.prose li {
  margin-bottom: 0.5rem;
  color: var(--text-soft);
}
.prose strong {
  color: var(--text);
}

/* Caja de puntos clave */
.keybox {
  background: var(--lavender);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
}
.keybox h2,
.keybox h3 {
  margin-top: 0;
  font-size: 1.05rem;
}
.keybox ul {
  margin-bottom: 0;
}

/* Aviso / disclaimer dentro del artículo */
.callout {
  background: #fbfbfd;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.callout strong {
  color: var(--navy-800);
}

/* CTA al final del artículo */
.article-cta {
  text-align: center;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: var(--on-navy);
  border-radius: var(--radius);
  padding: 2.2rem 1.6rem;
  margin-top: 2.5rem;
}
.article-cta h2 {
  color: var(--white);
  margin-top: 0;
}
.article-cta p {
  color: var(--on-navy-soft);
  max-width: 52ch;
  margin-inline: auto;
}

/* Artículos relacionados */
.related {
  border-top: 1px solid var(--gray-200);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--navy-700);
}

/* Figura didáctica dentro del artículo */
.prose figure {
  margin: 2rem 0;
}
.prose figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Bibliografía / referencias */
.references {
  margin-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 1.5rem;
}
.references h2 {
  font-size: 1.2rem;
  margin-top: 0;
}
.references ol {
  padding-left: 1.3rem;
}
.references li {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}
.references a {
  word-break: break-word;
}

/* ==========================================================================
   Congresos (línea de tiempo académica)
   ========================================================================== */
.timeline {
  position: relative;
  margin-top: 2.2rem;
  padding-left: 1.9rem;
  max-width: 780px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.7rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.9rem + 1px);
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal-600);
}
.timeline-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.timeline-year {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy-800);
  font-size: 1rem;
}
.timeline-role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-600);
  background: #e7f2f3;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.timeline-item h3 {
  margin: 0.35rem 0 0.2rem;
  font-size: 1.08rem;
}
.timeline-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* ==========================================================================
   Videos educativos (fachada YouTube / mp4)
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.video-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--navy-900), var(--navy-800));
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-embed .video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-embed iframe,
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: relative;
  z-index: 2;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-800);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}
.video-embed:hover .video-play,
.video-embed:focus-visible .video-play {
  transform: scale(1.07);
}
.video-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(11, 33, 56, 0.62);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.video-embed.is-pending {
  cursor: default;
}
.video-embed.is-pending .video-play {
  opacity: 0.55;
}
.video-pending-note {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: #eaf1f8;
}
.video-body {
  padding: 1.3rem 1.4rem;
}
.video-body h3 {
  margin: 0 0 0.4rem;
}
.video-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* ==========================================================================
   Congresos con foto (tarjetas)
   ========================================================================== */
.congress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2.2rem;
}
.congress-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.congress-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.congress-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
}
.congress-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.congress-body {
  padding: 1.4rem 1.5rem 1.6rem;
}
.congress-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.congress-date {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--navy-800);
  font-size: 0.95rem;
}
.congress-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.congress-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.7rem;
}
.congress-talk {
  font-size: 0.96rem;
  color: var(--text-soft);
  margin: 0;
}
.congress-talk strong {
  color: var(--navy-800);
}
