:root {
  --blue-900: #0e2757;
  --blue-700: #14367a;
  --blue-600: #1a4aa3;
  --blue-100: #e6eefb;
  --red: #d3202f;
  --red-dark: #b01723;
  --ink: #16213a;
  --muted: #55607a;
  --line: #dde4f0;
  --bg: #ffffff;
  --tint: #f3f6fc;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgb(14 39 87 / 0.25);
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--blue-700); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top bar ---------- */
.topbar { background: var(--blue-900); color: #dbe5fb; font-size: .875rem; }
.topbar__in { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; }
.topbar__item { display: inline-flex; align-items: center; gap: .4rem; color: inherit; text-decoration: none; }
a.topbar__item:hover { color: #fff; }
.topbar__item:first-child { min-width: 0; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--blue-700); }
.brand__mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; background: var(--blue-700); border-radius: 10px; }
.brand__mark svg { width: 1.4rem; height: 1.4rem; fill: #fff; }
.brand__text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: -.01em; }
.brand__text small { font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-top: .2rem; }
.brand--light { color: #fff; }
.brand--light .brand__mark { background: #fff; }
.brand--light .brand__mark svg { fill: var(--blue-700); }
.brand--light .brand__text small { color: #ff9aa3; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--blue-600); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 2.75rem; height: 2.75rem; cursor: pointer; place-items: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1.25rem; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--lg { padding: .85rem 1.6rem; font-size: 1.02rem; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--blue-700); border-color: var(--blue-700); }
.btn--ghost:hover { background: var(--blue-700); color: #fff; }
.btn--light { background: #fff; color: var(--blue-700); }
.btn--light:hover { background: var(--blue-100); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--blue-100), #fff 85%); padding-block: clamp(2rem, 6vw, 4.5rem); overflow: hidden; }
.hero__in { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1.2fr .8fr; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: .6rem; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -.025em; color: var(--blue-900); text-wrap: balance; }
h1 span { color: var(--blue-600); }
.lead { margin-top: 1.1rem; font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 40rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2rem; color: var(--muted); font-size: .92rem; }
.hero__facts strong { display: block; font-size: 1.35rem; color: var(--blue-700); line-height: 1.2; }

.hero__photo { justify-self: center; max-width: 340px; position: relative; }
.hero__photo::before {
  content: ""; position: absolute; inset: 1.25rem -1rem -1rem 1.25rem; border-radius: 24px; background: var(--blue-700); z-index: 0;
}
.hero__photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 24px; box-shadow: var(--shadow); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--tint); }
.section__head { max-width: 42rem; margin-bottom: 2.5rem; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; color: var(--blue-900); }
.section__head p:last-child { margin-top: .75rem; color: var(--muted); }
h3 { font-size: 1.12rem; line-height: 1.3; color: var(--blue-900); }

/* Services */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
.card__ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--blue-100); color: var(--blue-700); margin-bottom: 1rem; }
.card__ico svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card p { margin-top: .4rem; color: var(--muted); font-size: .97rem; }

.ambulance { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; padding: 1.5rem 1.75rem; border-radius: var(--radius); background: var(--blue-700); color: #fff; }
.ambulance__ico { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--red); flex: none; }
.ambulance__ico svg { width: 1.8rem; height: 1.8rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ambulance h3 { color: #fff; font-size: 1.25rem; }
.ambulance p { color: #cfdcf7; }
.ambulance .btn { margin-left: auto; }

/* Doctors */
.doctors { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.doctor { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.doctor img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; background: var(--blue-100); }
.doctor img.doctor__img--wide { object-position: 55% 30%; }
.doctor__body { padding: 1.1rem 1.25rem 1.4rem; border-top: 4px solid var(--red); }
.doctor__role { color: var(--blue-600); font-weight: 700; font-size: .92rem; margin-top: .15rem; }
.doctor__deg { color: var(--muted); font-size: .9rem; margin-top: .35rem; }

/* Gallery */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.gallery figure { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue-100); }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s; }
.gallery li:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem .85rem;
  color: #fff; font-weight: 700; font-size: .95rem;
  background: linear-gradient(transparent, rgb(8 20 50 / .8));
}

/* Visit */
.visit { display: grid; gap: 2rem; grid-template-columns: .9fr 1.1fr; align-items: stretch; }
.visit dl { display: grid; gap: 1.25rem; }
.visit dt { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.visit dd { margin: .2rem 0 0; font-size: 1.1rem; }
.visit address { font-style: normal; }
.visit dd a { font-weight: 800; font-size: 1.4rem; text-decoration: none; color: var(--blue-700); }
.visit__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.visit__map { min-height: 22rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.visit__map iframe { width: 100%; height: 100%; min-height: 22rem; display: block; }

/* Footer */
.footer { background: var(--blue-900); color: #c4d2f2; padding-top: 2.5rem; }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: flex-start; }
.footer__in p { max-width: 28rem; margin-top: .9rem; font-size: .95rem; }
.footer__in > p { margin-top: 0; }
.footer a:not(.brand) { color: #fff; font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.footer__legal { margin-top: 2rem; padding-block: 1.25rem 5.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: .85rem; color: #93a6d1; }

.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.footer__credit { font-weight: 600; color: #c4d2f2; }

/* Floating call + WhatsApp buttons */
.fabs { position: fixed; left: 1rem; right: 1rem; pointer-events: none; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.fabs > *, .fabs .fab { pointer-events: auto; }
.fabs__row { pointer-events: none; display: flex; justify-content: space-between; gap: .6rem; width: 100%; }
.fab {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 8.5rem; padding: .85rem 0; border: 0; border-radius: 999px;
  color: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 25px -8px rgb(14 39 87 / .5); transition: transform .15s;
}
.fab:hover { transform: translateY(-2px); }
.fab--call { background: var(--red); order: -1; }
.fab--wa { background: #1faa59; }
.fab--wa:hover { background: #178a47; }

.wa { width: min(22rem, calc(100vw - 2rem)); background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px -12px rgb(14 39 87 / .45); border: 1px solid var(--line); }
.wa[hidden] { display: none; }
.wa__head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; background: #0b7a43; color: #fff; }
.wa__head h2 { font-size: 1rem; color: #fff; letter-spacing: 0; }
.wa__head p { font-size: .8rem; color: #c9f0da; }
.wa__avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #fff; flex: none; }
.wa__avatar svg { width: 1.3rem; height: 1.3rem; fill: var(--blue-700); }
.wa__close { margin-left: auto; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: rgb(255 255 255 / .15); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.wa__close:hover { background: rgb(255 255 255 / .3); }
.wa__form { display: grid; gap: .75rem; padding: 1rem; background: #ece5dd; }
.wa__bubble { justify-self: start; background: #fff; padding: .55rem .85rem; border-radius: 0 12px 12px 12px; font-size: .92rem; box-shadow: 0 1px 1px rgb(0 0 0 / .1); }
.wa__form textarea { width: 100%; resize: vertical; min-height: 5.5rem; padding: .7rem .85rem; font: inherit; font-size: .95rem; color: var(--ink); border: 1px solid #cfc8bf; border-radius: 12px; background: #fff; }
.wa__form textarea:focus { outline: 2px solid #1faa59; outline-offset: 1px; }
.btn--wa { background: #1faa59; color: #fff; }
.btn--wa:hover { background: #178a47; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__photo { max-width: 280px; justify-self: center; margin-right: 1rem; }
  .visit { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem 1rem 1rem;
    visibility: hidden; opacity: 0; transform: translateY(-.5rem); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav a:not(.btn) { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: .9rem; }
}

@media (max-width: 560px) {
  /* floating buttons: icon only on phones */
  .fab { width: 3.5rem; height: 3.5rem; padding: 0; }
  .fab span { display: none; }
  .fab .ico { width: 1.6rem; height: 1.6rem; }
  .hero__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; font-size: .78rem; line-height: 1.3; }
  .hero__facts strong { font-size: 1.05rem; white-space: nowrap; }
  .topbar__in { justify-content: center; }
  .topbar__item:first-child { display: none; }
  .ambulance .btn { margin-left: 0; width: 100%; }
  .doctors { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .doctor__body { padding: .85rem .85rem 1.1rem; }
  .doctor h3 { font-size: 1rem; }
  .doctor__role, .doctor__deg { font-size: .85rem; }
  .gallery { gap: .65rem; }
  .gallery figcaption { font-size: .82rem; padding: 2rem .65rem .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
