/* Fuentes self-hosted (privacidad + performance) — reemplaza Google Fonts CDN */
@font-face{font-family:'Nunito';src:url('../assets/fonts/Nunito-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:'Nunito';src:url('../assets/fonts/Nunito-Bold.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:'Nunito';src:url('../assets/fonts/Nunito-ExtraBold.woff2') format('woff2');font-weight:800;font-display:swap}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}

/* ============================================================
   Dr. Rochín · Médico — drrochin.com
   Hoja de estilos basada en el Manual de Identidad de Marca
   (Brand Kit v1.0 · 2026)
   Paleta: azul y blanco. Regla 60/30/10.
   Tipografía: Nunito (titulares) + Inter (texto).
   ============================================================ */

:root {
  /* --- Colores primarios (Brand Kit 3.1) --- */
  --azul-rochin: #3D6CB4;      /* Logo, botones primarios, enlaces, íconos */
  --azul-profundo: #23456E;    /* Footer, fondos formales */
  --azul-cielo: #A9C6E8;
  --azul-niebla: #EDF3FA;
  --blanco: #FFFFFF;

  /* --- Escala de grises (Brand Kit 3.2) --- */
  --negro-carbon: #16181D;     /* Titulares de máximo contraste */
  --gris-pizarra: #4B5563;     /* Texto de párrafo */
  --gris-medio: #6B7280;   /* AA sobre blanco (4.8:1) — corregido */       /* Notas y pies; nunca texto pequeño esencial */
  --gris-claro: #E5E7EB;       /* Bordes, divisores */

  /* --- Tints útiles (Brand Kit 3.3) --- */
  --azul-rochin-90: #ECF0F8;
  --azul-profundo-20: #4F6A8B;

  /* --- Tipografía (Brand Kit 4.1 / 4.2) --- */
  --font-heading: "Nunito", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --color-whatsapp: #12833F;   /* verde de acción accesible AA (blanco 4.8:1) */

  --radius: 16px;              /* Formas redondeadas de la marca */
  --shadow: 0 6px 24px rgba(35, 69, 110, 0.10);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--gris-pizarra);
  background: var(--blanco);
  line-height: 1.7;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--azul-rochin); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--negro-carbon);
  line-height: 1.2;
  font-weight: 800; /* Nunito Extrabold en titulares */
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 0.6em; font-weight: 700; }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; font-weight: 700; }
h1 .acento, h2 .acento { color: var(--azul-rochin); }

.section { padding: 80px 0; }
.section--niebla { background: var(--azul-niebla); }
.section-intro { max-width: 720px; color: var(--gris-pizarra); margin-bottom: 44px; }

/* ---------- Barra superior ---------- */
.topbar {
  background: var(--azul-profundo);
  color: var(--azul-cielo);
  font-size: 0.85rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.topbar a { color: var(--blanco); font-weight: 500; }

/* ---------- Header / Nav ---------- */
.header {
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-claro);
  position: sticky; top: 0; z-index: 50;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; gap: 16px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 48px; width: auto; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--gris-pizarra); font-weight: 600; font-size: 0.95rem;
  font-family: var(--font-heading);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--azul-rochin); text-decoration: none; }
.nav a[aria-current="page"] { border-bottom: 3px solid var(--azul-rochin); padding-bottom: 2px; }
/* El botón del menú no hereda los colores de enlace del nav */
.nav a.btn--primary, .nav a.btn--primary:hover { color: var(--blanco); border-bottom: none; }
.nav a.btn--primary:hover { background: #507BBC; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--gris-claro);
  border-radius: 12px; padding: 8px 12px; font-size: 1.2rem; cursor: pointer; color: var(--azul-profundo);
}

/* ---------- Botones (Nunito Bold, redondeados) ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary { background: var(--azul-rochin); color: var(--blanco); }
.btn--primary:hover { background: #507BBC; }
.btn--whatsapp { background: var(--color-whatsapp); color: var(--blanco); }
.btn--outline { border: 2px solid var(--azul-rochin); color: var(--azul-rochin); }
.btn--outline-blanco { border: 2px solid var(--blanco); color: var(--blanco); }
.btn--blanco { background: var(--blanco); color: var(--azul-rochin); }
.btn--sm { padding: 9px 20px; font-size: 0.88rem; }

/* ---------- Hero ---------- */
.hero { background: var(--azul-niebla); padding: 92px 0; }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { color: var(--negro-carbon); margin-bottom: 20px; }
.hero p { color: var(--gris-pizarra); font-size: 1.08rem; margin-bottom: 30px; max-width: 560px; }
.hero__eyebrow {
  display: inline-block; background: var(--blanco); border: 1px solid var(--azul-cielo);
  color: var(--azul-profundo); font-family: var(--font-heading); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__note { font-size: 0.85rem; color: var(--gris-medio); margin-top: 18px; }

/* ---------- Placeholder de fotos ---------- */
.photo-placeholder {
  background: var(--blanco);
  border: 2px dashed var(--azul-cielo); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; min-height: 320px;
  color: var(--gris-pizarra); font-size: 0.9rem;
}
.photo-placeholder strong { color: var(--azul-profundo); margin-bottom: 6px; font-family: var(--font-heading); }

/* ---------- Tarjetas (blancas, esquinas redondeadas) ---------- */
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--blanco); border: 1px solid var(--gris-claro);
  border-radius: var(--radius); padding: 32px;
  box-shadow: 0 2px 12px rgba(35, 69, 110, 0.05);
}
.card__icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--azul-niebla);
  color: var(--azul-rochin); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { color: var(--azul-profundo); }
.card p { color: var(--gris-pizarra); font-size: 0.95rem; }
.card ul { margin: 12px 0 0 18px; color: var(--gris-pizarra); font-size: 0.95rem; }
.card li { margin-bottom: 4px; }

/* ---------- Franja de valores ---------- */
.values { background: var(--azul-rochin); color: var(--blanco); padding: 44px 0; }
.values .container { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px; text-align: center; }
.values strong {
  display: block; font-family: var(--font-heading); font-weight: 800;
  font-size: 1.2rem; margin-bottom: 4px; color: var(--blanco);
}
.values span { color: var(--azul-niebla); font-size: 0.88rem; }

/* ---------- Credenciales ---------- */
.cred-list { list-style: none; }
.cred-list li {
  padding: 14px 0 14px 36px; border-bottom: 1px solid var(--gris-claro); position: relative;
}
.cred-list li::before {
  content: "✓"; position: absolute; left: 0; top: 14px;
  color: var(--azul-rochin); font-weight: 700;
}

/* ---------- Horarios / contacto ---------- */
.info-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.info-table th, .info-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--gris-claro); }
.info-table th { color: var(--azul-profundo); white-space: nowrap; font-family: var(--font-heading); font-weight: 700; }

.contact-block { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.contact-block__icon {
  width: 46px; height: 46px; border-radius: 50%; background: var(--azul-niebla);
  color: var(--azul-rochin); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.contact-block h3 { margin-bottom: 2px; font-size: 1.05rem; color: var(--azul-profundo); }
.contact-block p { color: var(--gris-pizarra); font-size: 0.95rem; }

/* ---------- CTA final ---------- */
.cta-band { background: var(--azul-rochin); color: var(--blanco); text-align: center; padding: 68px 0; }
.cta-band h2 { color: var(--blanco); }
.cta-band p { color: var(--azul-niebla); max-width: 640px; margin: 0 auto 30px; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card__meta {
  font-size: 0.78rem; color: var(--gris-medio); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 8px; font-family: var(--font-heading); font-weight: 700;
}
.post-card h3 a { color: var(--azul-profundo); }
.article-body { max-width: 760px; margin: 0 auto; }
.article-body h2 { margin-top: 1.6em; }
.article-body p { margin-bottom: 1.15em; }
.article-body ul, .article-body ol { margin: 0 0 1.15em 22px; }
.article-meta { color: var(--gris-medio); font-size: 0.9rem; margin-bottom: 32px; }
.disclaimer {
  background: var(--azul-niebla); border-left: 4px solid var(--azul-rochin);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem; color: var(--gris-pizarra); margin-top: 44px;
}

/* ---------- FAQ ---------- */
details.faq {
  border: 1px solid var(--gris-claro); border-radius: var(--radius);
  padding: 18px 24px; margin-bottom: 14px; background: var(--blanco);
}
details.faq summary {
  font-family: var(--font-heading); font-weight: 700; color: var(--azul-profundo);
  cursor: pointer; font-size: 1.02rem;
}
details.faq p { margin-top: 12px; color: var(--gris-pizarra); }

/* ---------- Aviso legal / páginas de texto ---------- */
.legal-body { max-width: 800px; margin: 0 auto; }
.legal-body h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal-body p, .legal-body li { color: var(--gris-pizarra); margin-bottom: 1em; font-size: 0.98rem; }
.legal-body ul { margin-left: 22px; }

/* ---------- Encabezado de página interior ---------- */
.page-head { background: var(--azul-niebla); padding: 56px 0; }
.page-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.page-head p { color: var(--gris-pizarra); max-width: 700px; margin-top: 10px; }

/* ---------- Footer (Azul Profundo, Brand Kit 3.1) ---------- */
.footer { background: var(--azul-profundo); color: var(--azul-cielo); padding: 60px 0 24px; font-size: 0.92rem; }
.footer h4 { color: var(--blanco); margin-bottom: 14px; font-size: 1rem; }
.footer a { color: var(--azul-niebla); }
.footer .grid--3 { margin-bottom: 40px; }
.footer__logo { height: 44px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer__legal {
  border-top: 1px solid rgba(255,255,255,0.15); padding-top: 22px;
  font-size: 0.8rem; color: var(--azul-cielo); text-align: center; line-height: 1.9;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  background: var(--color-whatsapp); color: var(--blanco);
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.wa-float svg { width: 30px; height: 30px; fill: var(--blanco); }
.wa-float:hover { text-decoration: none; transform: scale(1.06); }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  background: var(--azul-profundo); color: var(--azul-niebla);
  border-radius: var(--radius); padding: 18px 24px;
  display: none; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); font-size: 0.88rem;
}
.cookie-banner.visible { display: flex; }
.cookie-banner a { color: var(--blanco); text-decoration: underline; }
.cookie-banner button {
  background: var(--blanco); color: var(--azul-profundo); border: none; cursor: pointer;
  font-family: var(--font-heading); font-weight: 700;
}

/* ---------- Calificación / social proof (estilo Manhattan) ---------- */
.rating-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blanco); border: 1px solid var(--gris-claro);
  border-radius: 999px; padding: 8px 18px; margin-top: 18px;
  font-size: 0.9rem; color: var(--gris-pizarra);
  box-shadow: 0 2px 10px rgba(35,69,110,0.06);
}
.rating-badge .stars { color: #E8B93B; letter-spacing: 2px; font-size: 1rem; }
.rating-badge strong { color: var(--negro-carbon); font-family: var(--font-heading); }
.rating-badge:hover { text-decoration: none; }

/* ---------- Chips de condiciones ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: var(--blanco); border: 1px solid var(--azul-cielo);
  color: var(--azul-profundo); font-family: var(--font-heading); font-weight: 700;
  font-size: 0.92rem; padding: 10px 20px; border-radius: 999px;
}

/* ---------- Proceso en 3 pasos ---------- */
.steps { counter-reset: paso; }
.step { position: relative; padding-left: 0; }
.step__num {
  font-family: var(--font-heading); font-weight: 800; font-size: 2.6rem;
  color: var(--azul-rochin); line-height: 1; margin-bottom: 12px;
}

/* ---------- Testimonios ---------- */
.testimonial {
  background: var(--blanco); border: 1px solid var(--gris-claro);
  border-radius: var(--radius); padding: 32px;
  box-shadow: 0 2px 12px rgba(35,69,110,0.05);
  display: flex; flex-direction: column; gap: 14px;
}
.testimonial blockquote {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
  color: var(--azul-profundo); line-height: 1.5;
}
.testimonial cite { font-style: normal; color: var(--gris-medio); font-size: 0.88rem; }
.testimonial .stars { color: #E8B93B; letter-spacing: 2px; }

/* ============================================================
   Movimiento sutil (estilo Apple / Manhattan)
   - Reveal al hacer scroll con IntersectionObserver (js/main.js)
   - Transiciones cortas, easing suave, distancias pequeñas
   - Se desactiva por completo con prefers-reduced-motion
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Entrada del hero al cargar */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow, .hero h1, .hero p, .hero__actions, .rating-badge, .hero .photo-placeholder, .hero__note {
  animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1 { animation-delay: 0.08s; }
.hero p { animation-delay: 0.16s; }
.hero__actions { animation-delay: 0.24s; }
.rating-badge, .hero__note { animation-delay: 0.32s; }
.hero .photo-placeholder { animation-delay: 0.2s; }

/* Header: sombra sutil al hacer scroll */
.header { transition: box-shadow 0.3s ease; }
.header.is-scrolled { box-shadow: 0 4px 20px rgba(35, 69, 110, 0.10); }

/* Micro-interacciones */
.card, .testimonial {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover, .testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(35, 69, 110, 0.12);
}
.chip { transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease; }
.chip:hover { transform: translateY(-2px); border-color: var(--azul-rochin); background: var(--azul-rochin-90); }
.wa-float { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease; }
.nav a { transition: color 0.2s ease; }
.brand img { transition: transform 0.3s ease; }
.brand:hover img { transform: scale(1.02); }

/* Accesibilidad: sin movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero h1, .hero p, .hero__actions, .rating-badge, .hero .photo-placeholder, .hero__note { animation: none; }
  .card, .testimonial, .chip, .wa-float, .brand img { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--blanco); flex-direction: column; align-items: flex-start;
    padding: 18px 24px; gap: 16px; border-bottom: 1px solid var(--gris-claro);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 56px 0; }
  .topbar .container { justify-content: center; text-align: center; }
  .brand img { height: 40px; }
}
