/* ============================================
   Leon River Endodontics — Design System
   Aesthetic: Refined Clinical Warmth
   Typography: Playfair Display + DM Sans
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Color: Deep teal trust + warm gold accent */
  --color-primary: #1B3A4B;
  --color-primary-light: #2C5F6E;
  --color-primary-pale: #D6E4E9;
  --color-accent: #C5975B;
  --color-accent-light: #E8D5B7;
  --color-accent-dark: #A07840;
  --color-cream: #FAFAF7;
  --color-surface: #F0EDE8;
  --color-white: #FFFFFF;
  --color-text: #2C2C3A;
  --color-text-light: #6B6B7B;
  --color-text-inv: #F0EDE8;
  --color-border: #E0DDD7;
  --color-border-dark: #C8C4BC;
  --color-success: #3A7D5C;
  --color-error: #B33A3A;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing — generous for breathing room */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 7rem;

  /* Layout */
  --max-width: 1180px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(27,58,75,0.06);
  --shadow-md: 0 4px 20px rgba(27,58,75,0.08);
  --shadow-lg: 0 8px 40px rgba(27,58,75,0.12);
  --shadow-card: 0 2px 12px rgba(27,58,75,0.06);
  --shadow-card-hover: 0 8px 30px rgba(27,58,75,0.12);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.3s;
  --duration-slow: 0.6s;
}

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 2rem;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-light);
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
a:hover { color: var(--color-accent-dark); border-color: var(--color-accent); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.75rem; margin-bottom: var(--space-md); }
h2 { font-size: 2rem; margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
h3 { font-size: 1.35rem; margin-top: var(--space-md); margin-bottom: var(--space-xs); }
h4 { font-size: 1.1rem; margin-top: var(--space-sm); margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); }
strong { font-weight: 600; }

ul, ol { margin-bottom: var(--space-sm); padding-left: 1.75rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--color-accent); }

/* --- Utility --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }

/* Gold accent line — distinctive motif */
.accent-line { display: block; width: 60px; height: 3px; background: var(--color-accent); border-radius: 2px; }
.accent-line-center { margin: var(--space-sm) auto; }
.accent-line-left { margin: var(--space-sm) 0; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  background: var(--color-primary); color: var(--color-white); padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius) var(--radius); z-index: 10000;
  border: none; font-weight: 600; font-family: var(--font-body);
}
.skip-link:focus { top: 0; color: var(--color-white); }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 0.875rem 2rem; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 0.9375rem;
  text-align: center; cursor: pointer; border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  letter-spacing: 0.02em; text-transform: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--color-accent); color: var(--color-white); border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: var(--color-white);
  box-shadow: 0 4px 16px rgba(197,151,91,0.3);
}
.btn-secondary {
  background: transparent; color: var(--color-primary); border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary); color: var(--color-white);
}
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8125rem; }
.btn-white {
  background: var(--color-white); color: var(--color-primary); border-color: var(--color-white);
}
.btn-white:hover {
  background: var(--color-cream); border-color: var(--color-cream); color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}
.btn-outline-white {
  background: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1); border-color: var(--color-white); color: var(--color-white);
}

/* --- Demo Banner --- */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffffff;
  padding: 0.5rem 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
}

.demo-banner__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.demo-banner__content span {
  opacity: 0.9;
}

.demo-banner__content a {
  color: #64b5f6;
  text-decoration: none;
  font-weight: 600;
  border: none;
}

.demo-banner__content a:hover {
  text-decoration: underline;
}

/* --- Header --- */
.site-header {
  position: sticky; top: 2rem; z-index: 100;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--color-primary); color: var(--color-text-inv);
  font-size: 0.8125rem; padding: 0.35rem 0;
  letter-spacing: 0.02em;
}
.header-top-inner {
  display: flex; justify-content: space-between; align-items: center;
}
.header-top a { color: var(--color-accent-light); border: none; font-weight: 500; }
.header-top a:hover { color: var(--color-white); }
.header-top-left { display: flex; align-items: center; gap: 0.75rem; }
.header-phone { font-weight: 700; letter-spacing: 0.03em; }
.header-top-divider { width: 1px; height: 0.75em; background: rgba(255,255,255,0.25); }
.header-portal-link { opacity: 0.7; font-size: 0.75rem; letter-spacing: 0.03em; text-transform: uppercase; }
.header-portal-link:hover { opacity: 1; }

.header-main { padding: 0.875rem 0; }
.header-main-inner {
  display: flex; align-items: center; gap: var(--space-sm);
}
.site-logo { flex-shrink: 0; border: none; }
.site-logo:hover { border: none; }
.site-logo img { height: 48px; width: auto; }

/* Navigation */
#primary-nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 0; padding: 0; margin: 0; }
.nav-item { position: relative; padding-bottom: 0.25rem; margin-bottom: -0.25rem; }
.nav-link {
  display: block; padding: 0.5rem 0.6rem; color: var(--color-text);
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 500;
  background: none; border: none; border-bottom: none; cursor: pointer;
  transition: color var(--duration) var(--ease);
  letter-spacing: 0.01em; white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-accent);
}
.dropdown-toggle { padding-right: 1.25rem; position: relative; }
.dropdown-toggle::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%;
  width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-60%) rotate(45deg);
  transition: transform var(--duration) var(--ease);
}
.dropdown-toggle[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }

.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 240px; z-index: 1000; padding: 0.5rem 0;
  list-style: none;
}
.dropdown-menu a {
  display: block; padding: 0.6rem 1.25rem; color: var(--color-text);
  font-size: 0.875rem; border: none;
  transition: all var(--duration) var(--ease);
}
.dropdown-menu a:hover {
  background: var(--color-surface); color: var(--color-accent-dark);
  padding-left: 1.5rem;
}
.has-dropdown.is-open > .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu { display: block; }

.header-cta { flex-shrink: 0; }

.header-mobile-phone { display: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle-bar {
  display: block; width: 22px; height: 2px; background: var(--color-primary);
  margin: 5px 0; border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* --- Hero --- */
.hero {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 480px;
}
.hero::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
  z-index: 3;
}

.hero-slideshow { position: absolute; inset: 0; z-index: 0; }

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero-slide.is-active { opacity: 1; }
.hero-slide.is-transitioning { will-change: opacity; }

.hero-slide__img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(27,58,75,0.55) 0%,
    rgba(27,58,75,0.65) 40%,
    rgba(27,58,75,0.7) 60%,
    rgba(27,58,75,0.6) 100%
  );
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  color: var(--color-white); font-size: 3.25rem;
  margin-bottom: var(--space-xs);
  animation: fadeUp 0.8s var(--ease) both;
}
.hero-subtitle {
  font-size: 1.25rem; opacity: 0.85; margin-bottom: var(--space-lg);
  font-family: var(--font-body); font-weight: 400;
  animation: fadeUp 0.8s var(--ease) 0.15s both;
}
.hero-ctas {
  display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease) 0.3s both;
}
.emergency-message {
  margin-top: var(--space-lg); padding: 0.75rem 1.75rem;
  background: rgba(197,151,91,0.15); border: 1px solid rgba(197,151,91,0.3);
  border-radius: var(--radius); font-weight: 600; display: inline-block;
  font-size: 0.9375rem;
  animation: fadeUp 0.8s var(--ease) 0.45s both;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding-top: var(--space-sm); padding-bottom: var(--space-sm); font-size: 0.8125rem;
  color: var(--color-text-light);
}
.breadcrumbs ol { list-style: none; display: flex; gap: 0.35rem; padding: 0; margin: 0; }
.breadcrumbs li::before { content: "/"; margin-right: 0.35rem; color: var(--color-border-dark); }
.breadcrumbs li:first-child::before { content: ""; margin: 0; }
.breadcrumbs a { color: var(--color-primary-light); border: none; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs [aria-current="page"] { color: var(--color-text-light); }

/* --- Page Content --- */
.page-content {
  padding-top: var(--space-lg); padding-bottom: var(--space-xl);
}
.page-content h1 {
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
  position: relative;
}
.page-content h1::after {
  content: ""; display: block; width: 60px; height: 3px;
  background: var(--color-accent); border-radius: 2px;
  margin-top: var(--space-sm);
}
.page-content h2 {
  position: relative; padding-bottom: var(--space-xs);
}

/* --- Doctor Personal (Outside the Office) --- */
.doctor-personal {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  position: relative;
}
.doctor-personal::before {
  content: "";
  position: absolute;
  top: var(--space-md);
  bottom: var(--space-md);
  left: 0;
  width: 4px;
  background: var(--color-accent);
  border-radius: 0 2px 2px 0;
}
.doctor-personal__photo {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.doctor-personal__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.doctor-personal__text {
  padding: var(--space-sm) 0;
}
.doctor-personal__text p {
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.85;
}
.doctor-personal__text p:last-child {
  margin-bottom: 0;
}

/* --- Sections --- */
.section {
  padding: var(--space-xl) 0;
}
.section-alt {
  background: var(--color-white);
}
.section-dark {
  background: var(--color-primary);
  color: var(--color-text-inv);
}
.section-dark h2, .section-dark h3 { color: var(--color-white); }
.section-dark .accent-line { background: var(--color-accent-light); }

.section-heading {
  text-align: center; margin-bottom: var(--space-lg);
}
.section-heading h2 { margin-top: 0; }

/* --- Doctor Profile --- */
.doctor-profile .doctor-photo {
  float: right; margin: 0 0 var(--space-md) var(--space-lg);
  max-width: 320px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--color-white);
}
.doctor-profile .credential-badge {
  display: inline-block; padding: 0.35rem 1rem;
  background: var(--color-accent-light); color: var(--color-accent-dark);
  border-radius: 100px; font-size: 0.8125rem; font-weight: 600;
  margin-bottom: var(--space-sm);
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}
.team-card {
  text-align: center;
  transition: transform var(--duration) var(--ease);
}
.team-card:hover { transform: translateY(-4px); }
.team-card img {
  border-radius: 50%; width: 180px; height: 180px; object-fit: cover;
  margin: 0 auto var(--space-sm);
  border: 4px solid var(--color-white); box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration) var(--ease);
}
.team-card:hover img { box-shadow: var(--shadow-lg); }
.team-card h3 { font-size: 1.15rem; margin: 0; font-family: var(--font-heading); }
.team-card p { font-size: 0.875rem; color: var(--color-text-light); margin: 0.25rem 0 0; }

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.service-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  transition: all var(--duration) var(--ease);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--color-accent); opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent-light);
}
.service-card:hover::before { opacity: 1; }
.service-card h3 { margin-top: 0; transition: color var(--duration) var(--ease); }
.service-card a { display: block; border: none; color: inherit; }
.service-card a:hover h3 { color: var(--color-accent-dark); }
.service-card p { color: var(--color-text-light); font-size: 0.9375rem; margin-bottom: 0; }

/* --- Technology Cards --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.tech-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-md);
  transition: all var(--duration) var(--ease);
}
.tech-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.tech-card img {
  border-radius: var(--radius); margin-bottom: var(--space-sm);
  background: var(--color-surface);
}
.tech-card h3 { margin-top: 0; font-size: 1.15rem; }
.tech-card p { color: var(--color-text-light); font-size: 0.9375rem; }

/* --- Testimonials --- */
.testimonials-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.testimonial-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: var(--space-lg); position: relative;
  box-shadow: var(--shadow-card);
  transition: all var(--duration) var(--ease);
}
.testimonial-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.testimonial-card::before {
  content: "\201C"; position: absolute; top: var(--space-sm); left: var(--space-md);
  font-family: var(--font-heading); font-size: 4rem; color: var(--color-accent-light);
  line-height: 1;
}
.testimonial-card .stars {
  color: var(--color-accent); font-size: 1.1rem; margin-bottom: var(--space-xs);
  letter-spacing: 2px;
}
.testimonial-card blockquote { border: none; background: none; padding: 0; margin: 0; }
.testimonial-card p { font-style: italic; color: var(--color-text); padding-top: var(--space-sm); }
.testimonial-card cite {
  display: block; font-style: normal; font-weight: 600;
  color: var(--color-primary); margin-top: var(--space-sm);
  font-size: 0.875rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--color-primary);
  background-image: linear-gradient(135deg, #1B3A4B, #2C5F6E);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xl) calc(var(--space-xl) + 1rem);
  text-align: center;
  margin: var(--space-xl) 0;
  position: relative;
  color: var(--color-white);
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(197,151,91,0.1) 0%, transparent 70%);
}
.cta-banner h2 { margin-top: 0; color: var(--color-white); position: relative; z-index: 1; }
.cta-banner p { opacity: 0.9; position: relative; z-index: 1; }
.cta-buttons {
  display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap;
  margin-top: var(--space-md); position: relative; z-index: 1;
}

/* --- Forms --- */
.form { max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 0.35rem;
  font-size: 0.875rem; color: var(--color-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius); font-size: 1rem;
  font-family: var(--font-body); background: var(--color-white);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(197,151,91,0.15);
}
.form-checkbox label {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-weight: 400; cursor: pointer; font-size: 0.9375rem;
}
.form-checkbox input[type="checkbox"] { width: auto; margin-top: 0.3rem; accent-color: var(--color-accent); }
fieldset { border: none; padding: 0; margin-bottom: var(--space-md); }
legend { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--color-primary); }
.checkbox-group label {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 400; margin-bottom: 0.35rem; cursor: pointer;
}
.checkbox-group input[type="checkbox"] { width: auto; accent-color: var(--color-accent); }
.checkbox-group-inline { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* --- Insurance Grid --- */
.insurance-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem; margin: var(--space-md) 0; list-style: none; padding: 0;
}
.insurance-grid li {
  padding: 0.6rem; background: var(--color-white);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  text-align: center; font-size: 0.875rem; font-weight: 500;
}

/* --- FAQ --- */
.faq-list { margin: var(--space-md) 0; }
.faq-item {
  border-bottom: 1px solid var(--color-border); padding: var(--space-md) 0;
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item h3 {
  margin-top: 0; color: var(--color-primary); font-family: var(--font-heading);
  font-size: 1.2rem;
}

/* --- Homepage Sections --- */
.home-section {
  padding: var(--space-xl) 0;
}
.home-section-alt {
  background: var(--color-white);
  padding: var(--space-xl) 0;
}
.home-doctors {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-lg); margin: var(--space-lg) 0;
}
.home-doctor-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: var(--space-lg); text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--duration) var(--ease);
}
.home-doctor-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.home-doctor-card img {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  margin: 0 auto var(--space-sm);
  border: 4px solid var(--color-accent-light);
}
.home-doctor-card h3 { font-family: var(--font-heading); margin-top: 0; }
.home-doctor-card a { border: none; }

.home-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md); margin: var(--space-lg) 0;
}
.home-feature {
  text-align: center; padding: var(--space-md);
  background: var(--color-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--duration) var(--ease);
}
.home-feature:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.home-feature h3 { font-size: 1.1rem; margin-top: var(--space-xs); }
.home-feature a { border: none; color: inherit; display: block; }
.home-feature a:hover h3 { color: var(--color-accent-dark); }

/* --- Featured Links (Homepage) --- */
.featured-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}
.featured-link {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-primary);
  border-bottom: none;
  transition: all var(--duration) var(--ease);
}
.featured-link:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent-light);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.featured-link__icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: var(--color-primary-pale);
  border-radius: 50%;
  color: var(--color-primary-light);
  transition: all var(--duration) var(--ease);
}
.featured-link:hover .featured-link__icon {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}
.featured-link__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* --- Table --- */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-md); }
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-weight: 600; color: var(--color-primary); font-size: 0.9375rem; }

/* --- Blockquote --- */
blockquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  background: var(--color-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-light);
}
hr {
  border: none; border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  background-image: linear-gradient(180deg, #1B3A4B, #152D3B);
  color: var(--color-text-inv);
  padding: var(--space-xl) 0 0;
  position: relative;
}
.site-footer::before {
  content: ""; display: block; height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: var(--space-lg);
  padding-top: var(--space-xl);
}
.footer-heading {
  color: var(--color-white); font-family: var(--font-heading);
  font-size: 1.1rem; margin-bottom: var(--space-sm);
  position: relative; padding-bottom: var(--space-xs);
}
.footer-heading::after {
  content: ""; display: block; width: 40px; height: 2px;
  background: var(--color-accent); margin-top: var(--space-xs);
  border-radius: 1px;
}
.site-footer a { color: var(--color-accent-light); border: none; }
.site-footer a:hover { color: var(--color-white); }
.site-footer address { font-style: normal; line-height: 1.9; font-size: 0.9375rem; }

.hours-table { width: 100%; font-size: 0.875rem; }
.hours-table td { border: none; padding: 0.2rem 0; white-space: nowrap; }
.hours-table td:first-child { font-weight: 600; padding-right: 1rem; color: var(--color-accent-light); }

.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.6rem; }

.footer-bottom {
  margin-top: var(--space-lg); padding: var(--space-sm) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-sm); font-size: 0.8rem;
  opacity: 0.7;
}
.footer-legal { list-style: none; display: flex; gap: var(--space-md); padding: 0; margin: 0; }

/* --- Mobile Sticky CTA --- */
.mobile-sticky-cta { display: none; }

/* --- Contact Page Two-Column Layout --- */
.page-intro {
  margin-bottom: var(--space-lg);
  color: var(--color-text-light);
  font-size: 1.0625rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.contact-info-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) var(--space-md);
  align-self: start;
}

.contact-info-card h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.contact-info-card h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.contact-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-md) 0;
}

.contact-hours {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-sm) 0 0;
}

.contact-hours td {
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  border: none;
}

.contact-hours td:first-child {
  font-weight: 600;
  color: var(--color-primary);
  padding-right: 1.5rem;
}

.contact-form-col h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

/* Override form max-width when inside the contact grid */
.contact-form-col .form {
  max-width: none;
}

.contact-map {
  margin-top: var(--space-md);
}

.contact-map h2 {
  margin-top: 0;
}

/* --- Emergency Callout --- */
.emergency-callout {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  margin-bottom: var(--space-lg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9375rem;
}
.emergency-callout strong {
  color: var(--color-primary);
}

/* --- Step List (Procedure Pages) --- */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}
.step-list > li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: var(--space-md);
  margin-bottom: 0;
  border-left: 2px solid var(--color-border);
  margin-left: 1rem;
}
.step-list > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.step-list > li::before {
  content: counter(step-counter);
  position: absolute;
  left: -1rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: var(--font-body);
}
.step-list h3 {
  margin-top: 0;
  font-size: 1.15rem;
}
.step-list p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

/* --- Referral Portal Cards --- */
.referral-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}
.referral-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--duration) var(--ease);
}
.referral-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.referral-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}
.referral-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

/* --- Scroll Animation --- */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger-children > * { opacity: 0; transform: translateY(16px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.stagger-children.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.stagger-children.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.08s; }
.stagger-children.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.16s; }
.stagger-children.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.24s; }
.stagger-children.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.32s; }
.stagger-children.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.40s; }
.stagger-children.is-visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.48s; }
.stagger-children.is-visible > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.56s; }
.stagger-children.is-visible > *:nth-child(9) { opacity: 1; transform: none; transition-delay: 0.64s; }
.stagger-children.is-visible > *:nth-child(10) { opacity: 1; transform: none; transition-delay: 0.72s; }

/* --- Checklist --- */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}
.checklist li {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
}
.checklist li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* --- Info Card (standalone highlight block) --- */
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}
.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
}
.info-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}
.info-card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}
.info-card p:last-child {
  margin-bottom: 0;
}
.info-card .btn {
  margin-top: var(--space-sm);
}

/* --- Info Cards Grid --- */
.info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

/* --- Payment Grid --- */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: var(--space-sm) 0;
  list-style: none;
  padding: 0;
}
.payment-grid li {
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 0;
}

/* --- Gallery Grid --- */
.gallery-hint {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration) var(--ease);
}
.gallery-item:hover {
  box-shadow: var(--shadow-lg);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 58, 75, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__icon {
  width: 36px;
  height: 36px;
  color: var(--color-white);
  transform: scale(0.8);
  transition: transform var(--duration) var(--ease);
}
.gallery-item:hover .gallery-item__icon {
  transform: scale(1);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease), visibility var(--duration) var(--ease);
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}
.lightbox__close svg {
  width: 32px;
  height: 32px;
  color: var(--color-white);
  transition: color var(--duration) var(--ease);
}
.lightbox__close:hover svg {
  color: var(--color-accent-light);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  z-index: 101;
}
.lightbox__nav svg {
  width: 40px;
  height: 40px;
  color: var(--color-white);
  transition: color var(--duration) var(--ease);
}
.lightbox__nav:hover svg {
  color: var(--color-accent-light);
}
.lightbox__nav--prev {
  left: 0.5rem;
}
.lightbox__nav--next {
  right: 0.5rem;
}

/* --- Keyframes --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  :root { --space-xl: 3rem; --space-2xl: 4rem; }
  .header-address { display: none; }
  .header-top-divider, .header-portal-link { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-mobile-phone {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    color: var(--color-accent); border: none; border-radius: 50%;
    background: var(--color-primary-pale);
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  }
  .header-mobile-phone:hover { background: var(--color-accent); color: var(--color-white); }
  .site-logo img { height: 40px; }
  #primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--color-white); border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg); z-index: 999;
  }
  #primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; padding: var(--space-sm); }
  .dropdown-menu {
    position: static; border: none; box-shadow: none;
    padding-left: var(--space-sm); min-width: 0; display: none;
  }
  .dropdown-toggle[aria-expanded="true"] + .dropdown-menu { display: block; }
  .has-dropdown.is-open > .dropdown-menu { display: none; }
  .nav-item { padding-bottom: 0; margin-bottom: 0; }

  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1.1rem; }
  .hero { padding: var(--space-xl) 0; min-height: 400px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .btn { width: 280px; max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .doctor-profile .doctor-photo { float: none; margin: 0 0 var(--space-md) 0; max-width: 100%; }
  .doctor-personal { grid-template-columns: 1fr; gap: var(--space-md); padding: var(--space-md); padding-left: calc(var(--space-md) + 4px); }
  .doctor-personal__photo img { aspect-ratio: 3 / 2; }
  .home-doctors { grid-template-columns: 1fr; }
  .featured-links { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: var(--space-lg) var(--space-md) calc(var(--space-lg) + 1rem); margin: var(--space-lg) 0; border-radius: var(--radius); }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn { width: 280px; max-width: 100%; }
  .referral-cards { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox__content { padding: 1.5rem; }
  .lightbox__nav svg { width: 28px; height: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .footer-legal { flex-direction: column; gap: var(--space-xs); }

  .mobile-sticky-cta {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 1000; padding: 0.75rem var(--space-md); gap: 0.75rem; justify-content: center;
    background: var(--color-white); border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }
  .btn-mobile-call, .btn-mobile-appt {
    flex: 1; text-align: center; padding: 0.75rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.875rem; text-decoration: none;
    font-family: var(--font-body); border: none;
  }
  .btn-mobile-call { background: var(--color-accent); color: var(--color-white); }
  .btn-mobile-appt { background: var(--color-surface); color: var(--color-primary); }
  body { padding-bottom: 60px; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: var(--space-lg) 0; min-height: 320px; }
  .site-logo img { height: 36px; }
  .home-features { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .testimonials-list { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-md); }
  .gallery-grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .lightbox__content { padding: 1rem; }
  .lightbox__nav { padding: 0.5rem; }
  .lightbox__nav svg { width: 24px; height: 24px; }
  .lightbox__close svg { width: 24px; height: 24px; }
  .emergency-message { font-size: 0.8125rem; padding: 0.6rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity 0.1s linear; }
}
