/* =========================================================
   Centro Medicae — Propuesta de rediseño
   Estética de centro médico multidisciplinar: clínica, legible,
   confianza sanitaria. Azul + verde salud sobre blanco, sin
   decoración superflua ni animaciones juguetonas.
   ========================================================= */

:root {
  /* Marca */
  --blue-900: #0A3552;
  --blue-700: #0E6E90;
  --blue-600: #1483A8;
  --blue-400: #4FA9C4;
  --blue-100: #E4F2F6;
  --blue-050: #F2F9FB;

  --green-700: #1F8F5F;
  --green-500: #2FAE79;
  --green-100: #E3F5EC;

  /* Neutros — claros, clínicos, sin blanco puro de "app" ni calidez de madera */
  --ink: #16232E;
  --ink-soft: #52626D;
  --line: #DCE6EA;
  --bg: #FFFFFF;
  --bg-soft: #F4F9FA;
  --white: #ffffff;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(10, 53, 82, .06);
  --shadow: 0 16px 40px rgba(10, 53, 82, .12);
  --shadow-lg: 0 26px 64px rgba(10, 53, 82, .18);

  --maxw: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', 'Public Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 7px 15px; border-radius: var(--radius-pill);
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 680px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 16px 0 12px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .96rem;
  padding: 14px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent; transition: background .25s var(--ease), color .25s, border-color .25s, box-shadow .25s, transform .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 10px 24px rgba(14, 110, 144, .3); }
.btn-primary:hover { background: var(--blue-900); }
.btn-wa { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-wa:hover { border-color: #25D366; color: #1a8f47; }
.btn-ghost { background: #fff; color: var(--blue-900); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--blue-400); }
.btn svg { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0; transition: padding .35s var(--ease), background .35s, box-shadow .35s;
}
.header.scrolled { background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(10,53,82,.08); padding: 11px 0; }

/* Header sobre el hero (foto): velo oscuro para leer en blanco antes del scroll */
.header--hero:not(.scrolled)::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,28,44,.55), rgba(6,28,44,0));
  z-index: 0;
}
.header--hero:not(.scrolled) .nav { position: relative; z-index: 1; }
.header--hero:not(.scrolled) .brand span { color: #fff; }
.header--hero:not(.scrolled) .nav-links > a { color: #fff; }
.header--hero:not(.scrolled) .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.header--hero:not(.scrolled) .btn-ghost:hover { background: rgba(255,255,255,.24); }
.header--hero:not(.scrolled) .burger { color: #fff; }

/* La barra de marca + hamburguesa debe quedar siempre por encima del panel
   desplegable, si no el botón que lo cierra queda tapado al abrirlo. */
.header .nav { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: var(--blue-900); }
.brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); object-fit: contain; padding: 3px; }
.brand span b { color: var(--green-700); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-weight: 600; font-size: .93rem; color: var(--ink); position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--green-500); border-radius: 2px; transition: width .3s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.burger { display: none; position: relative; background: none; border: 0; width: 26px; height: 26px; cursor: pointer; color: var(--blue-900); }
.burger svg { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; transition: opacity .2s; }
.burger .icon-close { opacity: 0; }
.header.menu-open .burger .icon-menu { opacity: 0; }
.header.menu-open .burger .icon-close { opacity: 1; }
.header.menu-open .brand span, .header.menu-open .brand span b { color: var(--blue-900); }
.header.menu-open .brand span b { color: var(--green-700); }

/* Menú móvil: el panel que anima max-height va SIN padding propio; el padding
   real vive en .mobile-menu-inner. Si no, "cerrado" deja una barra sólida del
   alto del padding tapando la cabecera (ver skill: gotcha nº1). z-index por
   debajo de .header .nav (5) para que marca + hamburguesa queden siempre
   visibles y pulsables por encima del panel (gotcha nº2). */
.mobile-menu {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; z-index: 2;
  background: #fff; box-shadow: var(--shadow-lg);
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
}
.mobile-menu.open { max-height: 100vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 88px 24px 26px; }
.mm-link { padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 1rem; color: var(--ink); }
.mm-cta { justify-content: center; margin-top: 16px; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: block; }
  .mobile-menu { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  padding: 150px 0 76px;
  background-image:
    linear-gradient(180deg, rgba(6,28,44,.32) 0%, rgba(6,28,44,.5) 48%, rgba(6,28,44,.92) 100%),
    url('img/recepcion.jpg');
  background-size: cover;
  background-position: center 42%;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.hero .eyebrow { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-inner h1 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.hero-inner h1 em { font-style: normal; color: var(--green-500); }
.hero-inner p.lead { font-size: 1.14rem; color: rgba(255,255,255,.9); margin: 20px 0 30px; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 30px; }
.hero-trust-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.88); font-size: .9rem; }
.hero-trust-item svg { width: 20px; height: 20px; color: var(--green-500); flex-shrink: 0; }
.hero-trust-item b { color: #fff; }

/* ---------- Franja de datos rápidos ---------- */
.strip { background: var(--blue-900); color: #fff; padding: 30px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.strip-item .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.2rem); color: var(--green-500); line-height: 1; }
.strip-item .lbl { margin-top: 6px; font-size: .84rem; opacity: .85; }
@media (max-width: 760px) { .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }

/* ---------- Especialidades ---------- */
.zones { background: var(--bg-soft); }
.esp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.esp-card {
  background: #fff; border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.esp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.esp-ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-700); margin-bottom: 16px;
}
.esp-ico svg { width: 26px; height: 26px; }
.esp-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.esp-card p { color: var(--ink-soft); font-size: .93rem; margin-bottom: 14px; }
.esp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.esp-tag { font-size: .74rem; font-weight: 600; color: var(--blue-700); background: var(--blue-100); padding: 4px 10px; border-radius: var(--radius-pill); }
.esp-price { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: 700; color: var(--green-700); font-size: .96rem; }
.esp-price small { font-family: var(--font-body); font-weight: 500; color: var(--ink-soft); font-size: .78rem; }

/* ---------- Instalaciones / Galería ---------- */
.gallery-teaser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-teaser figure, .gallery figure { border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-teaser img, .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-teaser figure:hover img, .gallery figure:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .gallery-teaser { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; }
.team-card { text-align: center; }
.team-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4; box-shadow: var(--shadow-sm); margin-bottom: 14px; background: var(--bg-soft); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h4 { font-size: 1rem; margin-bottom: 2px; }
.team-card .role { color: var(--green-700); font-weight: 600; font-size: .86rem; margin-bottom: 4px; }
.team-card .cred { color: var(--ink-soft); font-size: .8rem; }
.team-note { text-align: center; margin-top: 34px; color: var(--ink-soft); font-size: .94rem; }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(135deg, var(--blue-700), var(--blue-900)); color: #fff; border-radius: var(--radius-lg); padding: clamp(34px, 6vw, 56px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1; color: var(--green-500); }
.stat .lbl { margin-top: 8px; font-size: .92rem; opacity: .9; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tarifas: precios reales, formato tabla clara ---------- */
.tarifas-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.tarifa-category { margin-bottom: 38px; break-inside: avoid; }
.tarifa-category h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.02rem; font-weight: 700; color: var(--blue-900);
  padding-bottom: 10px; border-bottom: 2px solid var(--green-500); margin-bottom: 4px;
}
.tarifa-category h3 svg { width: 19px; height: 19px; color: var(--blue-700); flex-shrink: 0; }
.tarifa-list { list-style: none; }
.tarifa-item { display: flex; align-items: baseline; gap: 8px; padding: 12px 0; border-bottom: 1px dotted var(--line); }
.tarifa-item .name { font-weight: 600; color: var(--ink); font-size: .95rem; }
.tarifa-item .name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .8rem; margin-top: 2px; }
.tarifa-item .leader { flex: 1; border-bottom: 1px dotted var(--line); margin-bottom: 5px; min-width: 14px; }
.tarifa-item .price { font-family: var(--font-display); font-weight: 700; color: var(--green-700); white-space: nowrap; font-size: .95rem; }
@media (max-width: 820px) { .tarifas-cols { grid-template-columns: 1fr; } }
.tarifa-note { background: var(--blue-050); border-left: 3px solid var(--blue-400); padding: 16px 22px; margin-top: 8px; color: var(--ink-soft); font-size: .92rem; }
.tarifa-note b { color: var(--blue-900); }

/* ---------- Aseguradoras ---------- */
.insurers { background: var(--bg-soft); }
.insurers-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: center; }
.insurer-badge { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; place-items: center; box-shadow: var(--shadow-sm); aspect-ratio: 2/1; }
.insurer-badge img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 760px) { .insurers-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .insurers-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Info práctica ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info-item .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; flex: 0 0 auto; }
.info-item .ico svg { width: 20px; height: 20px; }
.info-item h4 { font-size: 1.02rem; margin-bottom: 3px; }
.info-item p { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: stretch; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.contact-card > p { color: var(--ink-soft); margin-bottom: 24px; }
.contact-line { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-line:first-of-type { border-top: 0; }
.contact-line .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--blue-100); color: var(--blue-700); display: grid; place-items: center; flex: 0 0 auto; }
.contact-line .ico svg { width: 21px; height: 21px; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-line b { font-family: var(--font-display); font-size: 1rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.socials { display: flex; gap: 12px; margin-top: 20px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700); transition: transform .3s var(--ease), background .3s, color .3s; }
.socials a:hover { transform: translateY(-4px); background: var(--blue-700); color: #fff; }
.socials svg { width: 19px; height: 19px; }
.map-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 400px; border: 6px solid #fff; }
.map-card iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-final { background: var(--bg-soft); text-align: center; }
.cta-box { background: linear-gradient(135deg, var(--blue-700), var(--blue-900)); color: #fff; border-radius: var(--radius-lg); padding: clamp(42px, 6vw, 72px) 24px; }
.cta-box h2 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin-bottom: 14px; }
.cta-box p { font-size: 1.06rem; opacity: .92; max-width: 48ch; margin: 0 auto 28px; }
.cta-box .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.cta-box .btn-ghost:hover { background: rgba(255,255,255,.24); }

/* ---------- Footer ---------- */
.footer { background: var(--blue-900); color: #c8dbe4; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 38px; }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer .brand img { background: #fff; }
.footer p { font-size: .92rem; opacity: .82; max-width: 34ch; }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: .96rem; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { font-size: .9rem; opacity: .82; transition: opacity .2s, color .2s; }
.footer ul a:hover { opacity: 1; color: var(--green-500); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; opacity: .72; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Botón flotante: llamada directa ----------
   El centro no publica número de WhatsApp Business (solo dos teléfonos), así
   que el botón persistente en pantalla es de llamada (tel:), el único canal
   100% verificado hoy. WhatsApp aparece como opción adicional en otras zonas
   de la página, no en el flotante — ver skill: gotcha nº4. */
.call-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--blue-700); color: #fff;
  display: grid; place-items: center; box-shadow: 0 14px 30px rgba(14,110,144,.45);
  transition: transform .3s var(--ease);
}
.call-float:hover { transform: scale(1.08); background: var(--blue-900); }
.call-float svg { width: 26px; height: 26px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6,28,44,.94); display: none; place-items: center; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; background: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive general ---------- */
@media (max-width: 980px) {
  .strip-grid { text-align: center; }
  .hero { background-position: 62% center; }
}
@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 124px; padding-bottom: 52px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
</content>
