:root {
  --navy: #122C4A;
  --navy-deep: #0A1B2E;
  --navy-mid: #1D4066;
  --red: #C63A2E;
  --red-deep: #A32E24;
  --sage: #4F7A5C;
  --sage-light: #DCE8DF;
  --paper: #F5F6F3;
  --paper-warm: #EFEDE6;
  --ink: #14202B;
  --ink-soft: #4B5A66;
  --line: #DCE0DE;
  --white: #FFFFFF;
  --whatsapp: #25D366;
  --whatsapp-deep: #1EBE5D;
  --radius: 6px;
  --shadow: 0 12px 32px -16px rgba(10,27,46,0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--red);
  display: inline-block;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
section { padding: 96px 0; }

@media (max-width: 720px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
}

/* SVG Icon Helper */
.wa-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

/* Heartbeat signature divider */
.pulse-divider {
  width: 100%;
  height: 34px;
  margin: 8px 0 0;
  overflow: hidden;
}
.pulse-divider svg { width: 100%; height: 100%; display: block; }
.pulse-path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1.4s ease;
}
.pulse-divider.in-view .pulse-path { stroke-dashoffset: 0; }
.pulse-divider.subtle .pulse-path { stroke: var(--line); opacity: 0.9; }

/* Top utility bar */
.topbar {
  background: var(--navy-deep);
  color: #C9D4DC;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 32px;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a { color: #C9D4DC; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar .emergency { color: #FF8A75; font-weight: 500; }
.topbar-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }

/* Header & Navigation */
header.site {
  background: rgba(245,246,243,0.96);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 52px; width: 52px; object-fit: cover; border-radius: 50%; border: 2px solid var(--line); }

.brand-text {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px; 
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.brand-text span {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--red);
  font-weight: 600;
  margin-top: 3px;
}

nav.links { display: flex; gap: 30px; align-items: center; }
nav.links a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: color 0.2s ease; }
nav.links a:hover { color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-deep); transform: translateY(-1px); }
.menu-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--navy); cursor: pointer; }

@media (max-width: 900px) {
  nav.links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 32px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  }
  nav.links.open { display: flex; }
  .menu-toggle { display: block; }
  .nav .btn-primary { display: none; }
  .brand-text { font-size: 18px; } 
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,27,46,0.35) 0%, rgba(10,27,46,0.55) 55%, rgba(9,20,33,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 32px 72px; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 7px 14px;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: clamp(38px, 5.4vw, 64px); max-width: 820px; font-weight: 600; }
.hero h1 em { font-style: normal; color: #FF9F8C; }
.hero-sub { max-width: 560px; margin-top: 20px; font-size: 17.5px; color: rgba(255,255,255,0.86); }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-actions .btn-ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
.hero-actions .btn-ghost:hover { background: #fff; color: var(--navy); }

/* Trust Strip */
.trust { background: var(--navy); color: #fff; }
.trust .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 32px;
}
.trust-item { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 18px; }
.trust-item:first-child { border-left: none; padding-left: 0; }
.trust-item .num { font-family: 'Fraunces', serif; font-size: 26px; color: #fff; font-weight: 600; }
.trust-item .label { font-size: 12.5px; color: #AEC0CE; margin-top: 4px; font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.04em; }

@media (max-width: 800px) {
  .trust .wrap { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .trust-item:nth-child(3) { border-left: none; padding-left: 0; }
}

/* Headings & About */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 16.5px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .eyebrow { justify-content: center; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-photo img { width: 100%; height: 460px; object-fit: cover; }
.about-photo figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(10,27,46,0.88), transparent);
  color: #fff; padding: 26px 22px 16px;
}
.about-photo figcaption strong { display: block; font-family: 'Fraunces', serif; font-size: 17px; }
.about-photo figcaption span { font-size: 12.5px; color: #C9D4DC; font-family: 'IBM Plex Mono', monospace; }
.about-copy h2 { margin-top: 14px; }
.about-copy p { color: var(--ink-soft); margin-top: 16px; font-size: 16px; }
.values-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.value-pill {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; font-size: 13.5px; font-weight: 500; color: var(--navy);
  background: #fff;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo img { height: 340px; }
}

/* Services */
.services { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { background: #fff; padding: 34px 30px; transition: background 0.25s ease; }
.service-card:hover { background: var(--paper-warm); }
.service-card .sicon {
  width: 42px; height: 42px; border-radius: 50%; background: var(--sage-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  color: var(--sage); font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px;
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* Maternity & Surgical */
.maternity { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.maternity .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.maternity .eyebrow { color: #FF9F8C; }
.maternity .eyebrow::before { background: #FF9F8C; }
.maternity h2 { color: #fff; font-size: clamp(28px, 3.2vw, 38px); margin-top: 14px; }
.maternity p.lead { color: #C9D4DC; margin-top: 18px; font-size: 16.5px; max-width: 480px; }
.maternity-list { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.maternity-list div { display: flex; align-items: center; gap: 12px; color: #E4EAEE; font-size: 15px; }
.maternity-list div::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FF9F8C; flex-shrink: 0; }
.maternity-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); }
.maternity-photo img { width: 100%; height: 420px; object-fit: cover; }
.maternity .btn-primary { margin-top: 32px; }

@media (max-width: 860px) {
  .maternity .wrap { grid-template-columns: 1fr; gap: 36px; }
  .maternity-photo img { height: 300px; }
}

.surgical .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.surgical-photo { flex: 1 1 420px; max-width: 520px; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.surgical-photo img { width: 100%; height: 380px; object-fit: cover; display: block; }
.surgical-copy { flex: 1 1 400px; }
.surgical-copy h2 { margin-top: 14px; }
.surgical-copy p { margin-top: 16px; color: var(--ink-soft); }
.surgical-copy ul { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.surgical-copy li { padding-left: 22px; position: relative; color: var(--ink-soft); font-size: 15px; }
.surgical-copy li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
.surgical-copy .btn { margin-top: 28px; }

@media (max-width: 860px) {
  .surgical .wrap { flex-direction: column; }
  .surgical-photo img { height: 280px; }
}

/* Team Grid */
.team-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 56px; box-shadow: var(--shadow); }
.team-hero img { width: 100%; height: 320px; object-fit: cover; }
.doctor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.doctor-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.doctor-card img { width: 100%; height: 260px; object-fit: cover; object-position: top; }
.doctor-card .dc-body { padding: 18px 18px 22px; }
.doctor-card h4 { font-size: 16.5px; }
.doctor-card .role {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; display: block;
}

@media (max-width: 900px) { .doctor-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .doctor-grid { grid-template-columns: 1fr; } }

/* Patient Info & Gallery */
#patients { background: var(--white); border-top: 1px solid var(--line); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.info-card { background: #fff; padding: 30px 28px; }
.info-card h3 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.info-card h3::before { content: ""; width: 8px; height: 8px; background: var(--sage); border-radius: 50%; flex-shrink: 0; }
.info-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.info-card li { color: var(--ink-soft); font-size: 14.5px; padding-left: 16px; position: relative; }
.info-card li::before { content: "·"; position: absolute; left: 0; color: var(--red); font-weight: 700; }

@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 14px; }
.gallery a { border-radius: var(--radius); overflow: hidden; display: block; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery .g1 { grid-row: 1 / 3; }

@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px 180px; }
  .gallery .g1 { grid-row: auto; grid-column: 1 / 3; height: 220px; }
}

/* Appointment Form & Section */
.appointment { background: var(--paper-warm); border-top: 1px solid var(--line); }
.appt-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
.appt-side h2 { margin-top: 14px; font-size: clamp(26px, 3vw, 34px); }
.appt-side p { margin-top: 14px; color: var(--ink-soft); }
.appt-side .contact-line { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; }
.appt-side .contact-line .lbl {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.06em; width: 80px; flex-shrink: 0; padding-top: 2px;
}
.appt-side .contact-line div { font-size: 15px; color: var(--navy); font-weight: 500; }
.appt-side .contact-line a { color: inherit; text-decoration: none; font-weight: 600; }

/* High-Visibility Google Maps CTA Button */
.btn-google-maps {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff !important;
  background-color: #4285f4;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.btn-google-maps:hover {
  background-color: #2b6cb0;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

form.appt-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / 3; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--line); border-radius: 4px; padding: 11px 13px;
  font-family: 'Inter', sans-serif; font-size: 14.5px; color: var(--ink);
  background: var(--paper); transition: border-color 0.2s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--navy); background: #fff;
}
form.appt-form .btn-whatsapp { width: 100%; justify-content: center; margin-top: 6px; padding: 14px; font-size: 15px; }

@media (max-width: 860px) {
  .appt-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .form-field.full { grid-column: 1; }
  form.appt-form { padding: 26px; }
}

/* Footer */
footer { background: var(--navy-deep); color: #AEC0CE; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px;
  padding: 72px 32px 40px; max-width: 1180px; margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { height: 38px; width: 38px; border-radius: 50%; }
.footer-brand span { font-family: 'Fraunces', serif; color: #fff; font-size: 16px; font-weight: 600; }
footer p.desc { font-size: 14px; line-height: 1.7; color: #8FA2AF; max-width: 280px; }
footer h5 {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: #fff;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; font-weight: 500;
}
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
footer ul li a { font-size: 14px; color: #AEC0CE; display: inline-flex; align-items: center; gap: 6px; }
footer ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09);
  padding: 22px 32px; max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: #7A8D9A;
}

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; padding: 56px 20px 30px; } }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-path { stroke-dashoffset: 0; transition: none; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }