:root {
  --bg-page: #ffffff;
  --bg-muted: #f8fafc;
  --bg-navy: #0b2545;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border-color: #e2e8f0;
  --blue-primary: #0369a1;
  --blue-hover: #075985;
  --teal-accent: #0f766e;
  --teal-bg: #f0fdfa;
  --teal-border: #99f6e4;
  --red-emergency: #b91c1c;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-page);
  scroll-behavior: smooth;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--blue-primary);
  outline-offset: 2px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Header: Deep Clinical Navy 3-Zone Contract */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #0b2545;
  color: #ffffff;
  border-bottom: 1px solid #163a66;
  box-shadow: 0 2px 8px rgba(7, 26, 51, 0.16);
}

.top-accent-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #2dd4bf 55%, #67e8f9 100%);
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-cross-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.desktop-nav a {
  color: rgba(224, 242, 254, 0.9);
  padding: 0.25rem 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
}

.btn-primary {
  background: var(--blue-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-header-cta {
  background: #14b8a6;
  color: #06203a;
}

.btn-header-cta:hover {
  background: #2dd4bf;
}

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-teal {
  background: var(--teal-accent);
  color: #ffffff;
}

.btn-teal:hover {
  background: #115e59;
}

.btn-emergency {
  background: var(--red-emergency);
  color: #ffffff;
}

.btn-emergency:hover {
  background: #991b1b;
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: #091e3a;
  color: #ffffff;
  padding: 1rem;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-drawer nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e0f2fe;
}

.mobile-drawer nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
  .mobile-menu-btn,
  .mobile-drawer {
    display: none !important;
  }
}

.header-cta-desktop {
  display: none;
}

@media (min-width: 640px) {
  .header-cta-desktop {
    display: inline-flex;
  }
}

/* Sections & Surfaces */
main {
  flex: 1;
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section-muted {
  background: var(--bg-muted);
}

.section-blue {
  background: #f2f8fd;
}

.section-teal {
  background: #f0faf8;
}

.hero-wash {
  background: linear-gradient(135deg, #edf7ff 0%, #ffffff 55%, #ecfdf9 100%);
  border-bottom: 1px solid #bae6fd;
}

.page-hero-navy {
  background: linear-gradient(90deg, #0b2545 0%, #0f3a68 55%, #0d5c6b 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(12, 74, 110, 0.35);
}

.page-hero-navy .eyebrow {
  color: #5eead4;
}

.page-hero-navy .hero-title {
  color: #ffffff;
}

.page-hero-navy .lead {
  color: rgba(224, 242, 254, 0.9);
}

.page-hero-navy .breadcrumb {
  color: rgba(186, 230, 253, 0.85);
}

.page-hero-navy .breadcrumb a:hover {
  color: #5eead4;
  text-decoration: underline;
}

.page-hero-navy .breadcrumb-current {
  color: #ffffff;
  font-weight: 600;
}

.section-navy,
.section-navy-gradient {
  background: linear-gradient(135deg, #0b2545 0%, #0f3a68 60%, #0e5a67 100%);
  color: #ffffff;
}

.timing-band {
  margin-top: 2.5rem;
  border-radius: 0.75rem;
  background: #0b2545;
  color: #ffffff;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.12);
}

@media (min-width: 1024px) {
  .section {
    padding: 4.5rem 0;
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--teal-accent);
}

.section-navy .eyebrow,
.section-navy-gradient .eyebrow {
  color: #5eead4;
}

.hero-title {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--bg-navy);
}

.section-title {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--bg-navy);
}

.section-navy .section-title,
.section-navy-gradient .section-title {
  color: #ffffff;
}

.lead {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 40rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .split-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2.5rem;
  }
  .col-span-4 { grid-column: span 4 / span 4; }
  .col-span-5 { grid-column: span 5 / span 5; }
  .col-span-6 { grid-column: span 6 / span 6; }
  .col-span-7 { grid-column: span 7 / span 7; }
  .col-span-8 { grid-column: span 8 / span 8; }
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-accent-blue {
  border-top: 4px solid #0284c7;
}

.card-accent-teal {
  border-top: 4px solid #0d9488;
}

.card-accent-red {
  border-top: 4px solid #dc2626;
}

.card-hover:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 18px rgba(3, 105, 161, 0.08);
}

.card-media {
  padding: 0;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.aspect-3-4 {
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #eff8ff 0%, #f0fdfa 100%);
  overflow: hidden;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
  background: #eff8ff;
  overflow: hidden;
}

.appt-panel-navy {
  background: linear-gradient(155deg, #0b2545 0%, #0f3a68 65%, #0d6e6e 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 2rem;
}

.cta-band-navy {
  background: linear-gradient(90deg, #0b2545 0%, #0f3a68 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.75rem;
}

.info-callout-blue {
  background: #f4f9fd;
  border: 1px solid #bae6fd;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.doctor-monogram {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
  color: var(--bg-navy);
}

.doctor-monogram-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: 1px solid #7dd3fc;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--blue-primary);
}

/* Emergency & Callout Boxes */
.emergency-box {
  border: 1px solid var(--red-border);
  border-top: 4px solid #dc2626;
  background: var(--red-bg);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.emergency-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #7f1d1d;
}

.emergency-phone {
  display: inline-block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #991b1b;
}

.appointment-callout-box {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-main);
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px rgba(3, 105, 161, 0.15);
}

.alert {
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: #7f1d1d;
}

.alert-success {
  border: 1px solid var(--teal-border);
  background: var(--teal-bg);
  color: #115e59;
}

/* Filter Segmented Control */
.filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.5rem;
}

.filter-tab {
  border: none;
  background: transparent;
  padding: 0.45rem 0.85rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #e0f2fe;
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab.active {
  background: #14b8a6;
  color: #06203a;
  font-weight: 700;
}

/* FAQ Accordion */
.faq-list {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--bg-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 0.65rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Map Container */
.map-frame {
  width: 100%;
  height: 380px;
  border-radius: 0.75rem;
  border: 1px solid #bae6fd;
  background: #eff8ff;
  overflow: hidden;
}

.quota-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #78350f;
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  text-align: center;
}

.quota-banner a {
  text-decoration: underline;
  font-weight: 600;
}

/* Authoritative Deep Navy Footer */
.site-footer {
  background: #071a33;
  border-top: 4px solid #0d9488;
  padding: 3.5rem 0 2rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-list a {
  color: #cbd5e1;
}

.footer-list a:hover {
  color: #5eead4;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

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