:root {
  --ink: #0f2034;
  --ink-soft: #3a4f68;
  --muted: #6b7d93;
  --line: #bed0e7;
  --bg: #d8e8f9;
  --bg-tint: #ccddf5;
  --bg-tint2: #bdd0ee;
  --blue: #1f4f87;
  --blue-deep: #12365f;
  --blue-bright: #2f73c2;
  --blue-pale: #a8c4e0;
  --wa: #25d366;
  --wa-deep: #1ebe5a;
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16,40,80,.06), 0 2px 8px rgba(16,40,80,.05);
  --shadow: 0 10px 30px rgba(16,40,80,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-bright); }

/* ---------- Placeholder imagen ---------- */
.ph {
  position: relative;
  background: repeating-linear-gradient(135deg, #e7eef7 0 14px, #eff5fb 14px 28px);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph span {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .72rem;
  letter-spacing: .04em;
  color: #8aa0bb;
  background: rgba(255,255,255,.78);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- Top bar ---------- */
.topbar { background: var(--blue-deep); color: #dfe9f5; font-size: .86rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 42px; gap: 18px; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; }
.topbar .tb-right { display: flex; gap: 22px; align-items: center; }
.topbar svg { width: 15px; height: 15px; opacity: .85; }

@media (max-width: 680px) {
  .topbar .tb-left { display: none; }
  .topbar .wrap { justify-content: center; }
}

/* ---------- Header ---------- */
header { position: sticky; top: 0; z-index: 60; background: rgba(216,232,249,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.logo { display: flex; align-items: center; gap: 13px; }
.logo-img { width: 68px; height: 68px; object-fit: contain; border-radius: 11px; }
.logo-img-footer { filter: brightness(0) invert(1); opacity: .85; }
.logo .mark {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--blue-bright), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.logo .lt { line-height: 1.1; }
.logo .lt b { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--ink); display: block; letter-spacing: -.01em; }
.logo .lt small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

nav.main { display: flex; gap: 30px; align-items: center; }
nav.main a { font-size: .95rem; font-weight: 600; color: var(--ink-soft); transition: color .15s; }
nav.main a:hover { color: var(--blue-bright); }

.hdr-cta { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-wa { background: var(--wa); color: #06351b; }
.btn-wa:hover { background: var(--wa-deep); color: #fff; }
.btn-call { background: var(--blue); color: #fff; }
.btn-call:hover { background: var(--blue-deep); }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--blue-pale); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-tiktok { background: #010101; color: #fff; border-color: #010101; }
.btn-tiktok:hover { background: #2d2d2d; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink); }

@media (max-width: 920px) {
  nav.main { display: none; }
  .hdr-cta .btn-call { display: none; }
}

/* ---------- Hamburger ---------- */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 8px; }
.hamburger span { display: block; height: 2px; border-radius: 2px; background: var(--blue-deep); transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Menú móvil ---------- */
.mobile-nav { display: none; position: fixed; inset: 0; top: 76px; background: rgba(216,232,249,.98); backdrop-filter: blur(12px); z-index: 55; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; }
.mobile-nav.open { display: flex; }
.mobile-link { font-size: 1.4rem; font-family: var(--serif); font-weight: 600; color: var(--blue-deep); padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: center; }
.mobile-link:hover { color: var(--blue); }
.mobile-wa { margin-top: 16px; width: 100%; justify-content: center; }

@media (max-width: 920px) {
  .hamburger { display: flex; }
  .hdr-cta { display: none; }
}

@media (max-width: 480px) {
  .sec-head h2 { font-size: 1.8rem; }
  .hero h1 { font-size: 2rem; }
  .cta-band h2 { font-size: 1.8rem; }
  .about h2 { font-size: 1.8rem; }
  section.pad { padding: 56px 0; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 88% -8%, var(--bg-tint2), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-tint));
  padding: 74px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.hero h1 { font-size: 3.1rem; margin: 18px 0 18px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 1.17rem; color: var(--ink-soft); max-width: 520px; }

.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.trust-row { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.trust-row .ti { display: flex; align-items: center; gap: 11px; }
.trust-row .ti .n { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--blue); line-height: 1; }
.trust-row .ti .l { font-size: .82rem; color: var(--muted); line-height: 1.2; max-width: 120px; }

.hero-figure { position: relative; }
.hero-figure .ph { aspect-ratio: 4/5; border-radius: 18px; box-shadow: var(--shadow); }
.hero-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); display: block; }

.hero-badge {
  position: absolute;
  left: -22px;
  bottom: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 250px;
}
.hero-badge .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-tint2); display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
.hero-badge .ic svg { width: 22px; height: 22px; }
.hero-badge b { font-size: .95rem; display: block; color: var(--ink); }
.hero-badge small { font-size: .78rem; color: var(--muted); }

@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.5rem; }
  .hero-figure { max-width: 420px; margin: 0 auto; }
}

/* ---------- Strip ---------- */
.strip { background: var(--blue-deep); color: #cfe0f3; }
.strip .wrap { display: flex; justify-content: space-around; gap: 22px; padding: 22px 28px; flex-wrap: wrap; text-align: center; }
.strip .si { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: .97rem; color: #e7f0fa; }
.strip .si svg { width: 20px; height: 20px; color: #8fc0f0; }

/* ---------- Secciones base ---------- */
section.pad { padding: 84px 0; }
.sec-head { text-align: center; max-width: 660px; margin: 0 auto 50px; }
.sec-head h2 { font-size: 2.3rem; margin: 14px 0 12px; }
.sec-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Sobre el doctor ---------- */
.about .wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: center; }
.about-fig .ph { aspect-ratio: 1/1; border-radius: 16px; box-shadow: var(--shadow); }
.about-slideshow { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.about-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; border-radius: 16px; opacity: 0; transition: opacity .8s ease; }
.about-slide.active { opacity: 1; }
.about-slide.cert { object-fit: contain; object-position: center; }
.about h2 { font-size: 2.25rem; margin: 14px 0 18px; }
.about p { color: var(--ink-soft); margin-bottom: 16px; font-size: 1.04rem; }

.cred-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.cred { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cred svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.cred b { display: block; font-size: .92rem; color: var(--ink); }
.cred small { font-size: .82rem; color: var(--muted); }

@media (max-width: 920px) {
  .about .wrap { grid-template-columns: 1fr; gap: 36px; }
  .about-fig { max-width: 380px; }
  .cred-list { grid-template-columns: 1fr; }
}

/* ---------- Servicios ---------- */
.services { background: var(--bg-tint); }

/* Carrusel de servicios */
.svc-carousel { margin: 0 auto; }
.svc-slider { display: flex; align-items: center; gap: 14px; }
.svc-track-wrap { flex: 1; overflow: hidden; }
.svc-track { display: flex; gap: 20px; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.svc { flex: 0 0 calc(33.333% - 14px); min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; box-sizing: border-box; }
.svc .ic { width: 52px; height: 52px; border-radius: 13px; background: var(--bg-tint2); display: flex; align-items: center; justify-content: center; color: var(--blue); margin-bottom: 18px; }
.svc .ic svg { width: 26px; height: 26px; }
.svc h3 { font-size: 1.22rem; margin-bottom: 8px; }
.svc p { color: var(--ink-soft); font-size: .96rem; }

.svc-arr { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--blue); box-shadow: var(--shadow-sm); transition: background .15s, color .15s; }
.svc-arr:hover { background: var(--blue); color: #fff; }

.svc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--line); cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.dot.active { background: var(--blue); transform: scale(1.35); }

@media (max-width: 767px) {
  .svc-track { gap: 0; }
  .svc { flex: 0 0 100%; padding: 28px 22px; }
  .svc-arr { width: 36px; height: 36px; }
}

/* ---------- Por qué elegirnos ---------- */
.why .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.why-list { display: flex; flex-direction: column; gap: 20px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-item .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.why-item .ic svg { width: 23px; height: 23px; }
.why-item h4 { font-size: 1.1rem; font-family: var(--serif); margin-bottom: 4px; }
.why-item p { color: var(--ink-soft); font-size: .96rem; }
.why-fig .ph { aspect-ratio: 3/4; border-radius: 16px; box-shadow: var(--shadow); }
.why-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; border-radius: 16px; box-shadow: var(--shadow); display: block; }

@media (max-width: 920px) {
  .why .wrap { grid-template-columns: 1fr; gap: 36px; }
  .why-fig { max-width: 380px; order: -1; }
}

/* ---------- Testimonios ---------- */
.testi { background: var(--blue-deep); color: #eaf2fb; }
.testi .sec-head h2 { color: #fff; }
.testi .sec-head p { color: #b7cde6; }
.testi .eyebrow { color: #8fc0f0; }

.grid-testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 16px; padding: 28px 26px; backdrop-filter: blur(4px); }
.quote .stars { color: #ffd166; letter-spacing: 2px; font-size: 1rem; margin-bottom: 14px; }
.quote p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; color: #eef5fc; font-style: italic; margin-bottom: 18px; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .av { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #cfe0f3; font-family: var(--serif); }
.quote .who b { font-size: .95rem; color: #fff; display: block; }
.quote .who small { font-size: .8rem; color: #9fbbd8; }

@media (max-width: 920px) {
  .grid-testi { grid-template-columns: 1fr; }
  .grid-testi .quote:nth-child(3) { display: none; }
}

/* ---------- Galería ---------- */
.gallery .grid-gal { display: grid; grid-template-columns: 2fr 3fr; gap: 14px; align-items: stretch; }
.grid-gal .ph { border-radius: 12px; }
.gal-img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; border-radius: 12px; display: block; }
.gal-img-sanjose { object-position: center top; }
.gal-img-arcangeles { object-position: center center; }

@media (max-width: 680px) {
  .gallery .grid-gal { grid-template-columns: 1fr; }
  .gal-img { height: auto; min-height: unset; aspect-ratio: 16/9; }
  .gal-img-sanjose { aspect-ratio: 3/4; }
}

/* ---------- Ubicación ---------- */
.location { background: var(--bg-tint); }
.loc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.loc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.loc-map-iframe { flex-shrink: 0; }
.loc-map-iframe iframe { display: block; width: 100%; height: 260px; }

.loc-info { padding: 32px 30px; flex: 1; display: flex; flex-direction: column; }
.loc-info h3 { font-size: 1.45rem; margin: 10px 0 20px; }
.loc-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.loc-row:last-of-type { border-bottom: none; }
.loc-row .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-tint2); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.loc-row .ic svg { width: 20px; height: 20px; }
.loc-row b { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.loc-row span { color: var(--ink); font-size: 1rem; }
.loc-info .btn-wa { margin-top: auto; padding-top: 24px; width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .loc-cards { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-deep), var(--blue-bright)); color: #fff; text-align: center; padding: 72px 0; }
.cta-band h2 { color: #fff; font-size: 2.4rem; margin-bottom: 14px; }
.cta-band p { color: #d4e6f8; font-size: 1.12rem; max-width: 560px; margin: 0 auto 30px; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.18); }

/* ---------- Footer ---------- */
footer { background: #0c1c30; color: #9fb4cc; padding: 56px 0 28px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
footer .logo .lt b { color: #fff; }
footer .logo .lt small { color: #7d95b0; }
footer p.fdesc { margin-top: 16px; max-width: 320px; color: #8ca3bd; }
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); color: #9fb4cc; border: 1px solid rgba(255,255,255,.1); transition: background .2s, color .2s; }
.social-link:hover { background: var(--blue); color: #fff; }
footer h5 { color: #fff; font-family: var(--sans); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }
footer ul a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; flex-wrap: wrap; gap: 10px; font-size: .84rem; color: #6f88a3; }

@media (max-width: 780px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  footer p.fdesc { grid-column: span 2; }
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--wa);
  color: #fff;
  border-radius: 50px;
  box-shadow: 0 10px 28px rgba(37,211,102,.45);
  overflow: hidden;
  transition: padding .25s, gap .25s;
  padding: 0;
}
.wa-float .ic { width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-float .ic svg { width: 32px; height: 32px; }
.wa-float .txt { max-width: 0; opacity: 0; white-space: nowrap; font-weight: 700; font-size: .98rem; transition: max-width .25s, opacity .2s, padding .25s; overflow: hidden; }
.wa-float:hover { padding-right: 22px; }
.wa-float:hover .txt { max-width: 200px; opacity: 1; padding-left: 4px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50px; box-shadow: 0 0 0 0 rgba(37,211,102,.5); animation: pulse 2.4s infinite; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.45); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

@media (max-width: 600px) {
  .wa-float .ic { width: 56px; height: 56px; }
}

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
