/* ============================================================
   SMILEBRIGHT DENTAL CLINIC — DESIGN SYSTEM
   A boutique, editorial take on healthcare UI.
   Palette: deep pine teal + warm porcelain + brushed brass.
   Type: Fraunces (display) + Inter (body/UI).
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  /* ---- Brand palette (light) ---- */
  --pine-900: #0e2921;
  --pine-800: #123a2f;
  --pine-700: #17493c;
  --pine-600: #1d5c4c;
  --pine-500: #256f5b;
  --pine-400: #3a8b73;

  --brass-600: #9c7a3f;
  --brass-500: #b08d4f;
  --brass-400: #c7a468;
  --brass-200: #e8dcc3;

  --porcelain-100: #fdfbf7;
  --porcelain-200: #faf6ef;
  --porcelain-300: #f3ede1;

  --ink-900: #14201c;
  --ink-700: #364440;
  --slate-500: #5e6b65;
  --slate-400: #78847e;

  --mist-200: #ece6d9;
  --mist-300: #e2dbca;

  /* ---- Semantic tokens (light theme, default) ---- */
  --bg: var(--porcelain-200);
  --bg-alt: var(--porcelain-300);
  --surface: #ffffff;
  --surface-alt: var(--porcelain-100);
  --surface-glass: rgba(255, 255, 255, 0.72);
  --overlay-tint: rgba(14, 41, 33, 0.86);

  --text-primary: var(--ink-900);
  --text-secondary: var(--slate-500);
  --text-on-primary: #fbf9f4;
  --text-on-brass: #241a08;

  --primary: var(--pine-700);
  --primary-strong: var(--pine-900);
  --primary-soft: var(--pine-500);
  --primary-tint: rgba(23, 73, 60, 0.08);

  --accent: var(--brass-500);
  --accent-strong: var(--brass-600);
  --accent-tint: rgba(176, 141, 79, 0.14);

  --border: var(--mist-300);
  --border-soft: var(--mist-200);

  --success: #2e7d5b;
  --success-tint: rgba(46, 125, 91, 0.12);
  --warning: #a9762c;
  --warning-tint: rgba(169, 118, 44, 0.12);
  --danger: #a5423a;
  --danger-tint: rgba(165, 66, 58, 0.1);

  --footer-bg: var(--pine-900);
  --footer-text: rgba(251, 249, 244, 0.72);
  --footer-heading: #fbf9f4;
  --footer-border: rgba(251, 249, 244, 0.12);

  --shadow-rgb: 20, 32, 28;
  --shadow-sm: 0 1px 2px rgba(var(--shadow-rgb), 0.06);
  --shadow-md: 0 6px 16px rgba(var(--shadow-rgb), 0.08);
  --shadow-lg: 0 16px 40px rgba(var(--shadow-rgb), 0.1);
  --shadow-xl: 0 28px 60px rgba(var(--shadow-rgb), 0.14);
  --shadow-focus: 0 0 0 4px var(--primary-tint);

  /* ---- Radius ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* ---- Spacing (8px rhythm) ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* ---- Type ---- */
  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --fs-h4: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --fs-h2: clamp(2.1rem, 1.7rem + 1.8vw, 3rem);
  --fs-h1: clamp(2.6rem, 1.9rem + 3.2vw, 4.5rem);
  --fs-stat: clamp(2.25rem, 1.9rem + 1.5vw, 3.25rem);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms var(--ease);
  --t-base: 280ms var(--ease);
  --t-slow: 520ms var(--ease-out-soft);

  --z-nav: 1000;
  --z-mobile-menu: 999;
  --z-back-to-top: 500;
  --z-loading: 99999;

  --container: 1360px;
  --container-narrow: 760px;

  color-scheme: light;
}

/* ---- Dark theme overrides ---- */
body.dark-mode {
  --bg: #0b1512;
  --bg-alt: #0f1c18;
  --surface: #12211c;
  --surface-alt: #172922;
  --surface-glass: rgba(18, 33, 28, 0.72);
  --overlay-tint: rgba(8, 18, 15, 0.88);

  --text-primary: #f3f0e8;
  --text-secondary: #a7b3ac;
  --text-on-primary: #f3f0e8;
  --text-on-brass: #1c1508;

  --primary: #4fa98a;
  --primary-strong: #6fc0a3;
  --primary-soft: #3d8a70;
  --primary-tint: rgba(79, 169, 138, 0.16);

  --accent: #d2b27a;
  --accent-strong: #e2c592;
  --accent-tint: rgba(210, 178, 122, 0.16);

  --border: #253932;
  --border-soft: #1d2e28;

  --success: #4fbf90;
  --success-tint: rgba(79, 191, 144, 0.14);
  --warning: #d0a24f;
  --warning-tint: rgba(208, 162, 79, 0.14);
  --danger: #e0837a;
  --danger-tint: rgba(224, 131, 122, 0.12);

  --footer-bg: #070f0c;
  --footer-text: rgba(243, 240, 232, 0.68);
  --footer-heading: #f3f0e8;
  --footer-border: rgba(243, 240, 232, 0.1);

  --shadow-rgb: 0, 0, 0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 30px 64px rgba(0, 0, 0, 0.55);
  --shadow-focus: 0 0 0 4px var(--primary-tint);

  color-scheme: dark;
}

/* ============================================================
     2. RESET & BASE
     ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg);
  line-height: 1.65;
  font-size: var(--text-base);
  transition: background-color var(--t-base), color var(--t-base);
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

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

::selection {
  background: var(--primary);
  color: var(--text-on-primary);
}

/* ============================================================
     3. LOADING SCREEN
     ============================================================ */

.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--pine-900);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-loading);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease-out-soft), visibility 0.6s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  position: relative;
  width: 46px;
  height: 46px;
}

.loader-inner {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(251, 249, 244, 0.2);
  border-top-color: var(--accent-400, #c7a468);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
     4. TYPOGRAPHY
     ============================================================ */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--primary-strong);
}

/* Eyebrow / kicker label — used above section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* Focus visibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
     5. BUTTONS
     ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.95rem 1.9rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--t-base), box-shadow var(--t-base),
    background-color var(--t-base), color var(--t-base),
    border-color var(--t-base);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text-on-primary);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1.1rem 2.5rem;
  font-size: var(--text-base);
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
     6. NAVBAR
     ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 84px;
  background-color: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  z-index: var(--z-nav);
  transition: height var(--t-base), border-color var(--t-base),
    background-color var(--t-base), box-shadow var(--t-base);
}

.navbar.scrolled {
  height: 68px;
  border-bottom-color: var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-logo i {
  font-size: 1.2rem;
  color: var(--primary);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-tint);
  border-radius: 50%;
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: var(--space-2xs) 0.1rem;
  position: relative;
  transition: color var(--t-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--t-base);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.theme-toggle {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-base), background-color var(--t-base),
    border-color var(--t-base);
}

.theme-toggle:hover {
  transform: rotate(15deg);
  border-color: var(--primary);
  color: var(--primary);
}

.nav-cta {
  display: inline-flex;
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--t-fast);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================================
     7. HERO
     ============================================================ */

.hero {
  margin-top: 84px;
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(2px);
  animation: float 9s ease-in-out infinite;
}

body.dark-mode .shape {
  opacity: 0.25;
}

.shape-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(
    circle at 30% 30%,
    var(--primary-tint),
    transparent 70%
  );
  top: -80px;
  right: -60px;
  animation-delay: 0s;
}

.shape-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(
    circle at 30% 30%,
    var(--accent-tint),
    transparent 70%
  );
  bottom: -60px;
  left: 6%;
  animation-delay: 2s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle at 30% 30%,
    var(--primary-tint),
    transparent 70%
  );
  top: 45%;
  left: 78%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-24px);
  }
}

.hero-container {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: fadeUp 0.8s var(--ease-out-soft);
}

.hero-title {
  font-size: var(--fs-h1);
  line-height: 1.04;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.hero-title::after {
  content: "";
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
  max-width: 46ch;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  max-width: 480px;
}

.stat-card {
  background: var(--surface);
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-3xs);
  letter-spacing: 0.02em;
}

.hero-image {
  animation: fadeUp 0.9s var(--ease-out-soft) 0.1s backwards;
  position: relative;
}

.hero-img-wrapper {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  box-shadow: var(--shadow-xl);
}

.hero-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

.floating-card {
  position: absolute;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  animation: floatCard 4s ease-in-out infinite;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.floating-card i {
  font-size: 1.1rem;
  color: var(--primary);
}

.card-1 {
  bottom: 24px;
  left: -18px;
}

.card-2 {
  top: 28px;
  right: -18px;
  animation-delay: 1.5s;
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Signature smile-curve divider ---- */
.smile-divider {
  width: 100%;
  height: 64px;
  display: block;
  color: var(--bg-alt);
  margin-top: calc(var(--space-2xl) * -1);
  position: relative;
  z-index: 2;
}

.smile-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

.smile-divider .curve-fill {
  fill: var(--bg-alt);
}

.smile-divider .curve-dot {
  fill: var(--accent);
}

/* ============================================================
     8. SECTION SCAFFOLDING
     ============================================================ */

section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-container {
  max-width: var(--container);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-xs);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* ============================================================
     9. ABOUT SECTION
     ============================================================ */

.about {
  background-color: var(--bg-alt);
}

.about-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 4.8;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-card {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  transition: box-shadow var(--t-base), transform var(--t-base);
}

.about-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.about-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  font-size: var(--fs-h4);
}

.about-card h3 i {
  font-size: 1.1rem;
  color: var(--primary);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-tint);
  border-radius: 50%;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.benefits-list li:last-child {
  margin-bottom: 0;
}

.benefits-list i {
  color: var(--success);
  font-size: var(--text-sm);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--success-tint);
  border-radius: 50%;
}

/* ============================================================
     10. SERVICES SECTION
     ============================================================ */

.services {
  background-color: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: left;
  transition: transform var(--t-base), box-shadow var(--t-base),
    border-color var(--t-base);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
  transition: transform var(--t-base), background-color var(--t-base),
    color var(--t-base);
}

.service-card:hover .service-icon {
  transform: scale(1.06) rotate(-4deg);
  background: var(--primary);
  color: var(--text-on-primary);
}

.service-card h3 {
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-h4);
}

.service-card p {
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
}

.service-link {
  color: var(--primary);
  font-weight: 600;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  transition: gap var(--t-fast), color var(--t-fast);
}

.service-link:hover {
  gap: var(--space-xs);
  color: var(--accent-strong);
}

/* ============================================================
     11. DOCTORS SECTION
     ============================================================ */

.doctors {
  background-color: var(--bg-alt);
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.doctor-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.doctor-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3.6;
}

.doctor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: transform var(--t-slow);
}

.doctor-card:hover .doctor-image img {
  transform: scale(1.06);
}

.doctor-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--overlay-tint) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-md);
  opacity: 0;
  transition: opacity var(--t-base);
}

.doctor-card:hover .doctor-overlay {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: var(--space-xs);
}

.social-links a {
  width: 38px;
  height: 38px;
  background: rgba(251, 249, 244, 0.16);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbf9f4;
  transition: all var(--t-fast);
  backdrop-filter: blur(4px);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--text-on-brass);
  transform: scale(1.08);
}

.doctor-info {
  padding: var(--space-md);
  text-align: left;
}

.doctor-info h3 {
  margin-bottom: 0.2rem;
  color: var(--text-primary);
  font-size: var(--fs-h4);
}

.doctor-role {
  font-size: var(--text-sm);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.doctor-exp {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ============================================================
     12. WHY CHOOSE US
     ============================================================ */

.why-choose-us {
  background-color: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  background: var(--surface-alt);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  text-align: left;
  transition: transform var(--t-base), border-color var(--t-base);
  border: 1px solid var(--border-soft);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-strong);
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  margin-bottom: var(--space-2xs);
  font-size: var(--fs-h4);
}

.feature-card p {
  font-size: var(--text-sm);
}

/* ============================================================
     13. STATISTICS
     ============================================================ */

.statistics {
  background: var(--primary-strong);
  color: var(--text-on-primary);
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.statistics::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 85% 20%,
    rgba(251, 249, 244, 0.08),
    transparent 55%
  );
  pointer-events: none;
}

.stats-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  position: relative;
}

.stat-box {
  text-align: center;
  padding: var(--space-md);
  border-right: 1px solid rgba(251, 249, 244, 0.14);
}

.stat-box:last-child {
  border-right: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 500;
  line-height: 1;
  margin-bottom: var(--space-2xs);
  color: var(--text-on-primary);
}

.stat-text {
  font-size: var(--text-sm);
  opacity: 0.78;
  letter-spacing: 0.02em;
}

/* ============================================================
     14. TESTIMONIALS
     ============================================================ */

.testimonials {
  background: var(--bg-alt);
}

.testimonials-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.testimonials-slider {
  display: flex;
  transition: transform 0.6s var(--ease-out-soft);
  will-change: transform;
}

.testimonial-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  padding: 6px;
  box-sizing: border-box;
}

.testimonial-card {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.testimonial-rating {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.testimonial-rating i {
  font-size: 15px;
}

.testimonial-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.testimonial-author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-soft);
}

.author-name {
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.author-title {
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.slider-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--t-fast);
}

.slider-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
  transform: scale(1.05);
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 0;
}

.dot.active {
  width: 22px;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

@media (max-width: 768px) {
  .testimonial-slide {
    padding: 0 4px;
  }

  .testimonial-card {
    padding: var(--space-md);
  }

  .testimonial-text {
    font-size: 1.05rem;
  }

  .testimonial-author img {
    width: 44px;
    height: 44px;
  }

  .slider-controls {
    gap: var(--space-sm);
    margin-top: var(--space-md);
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }
}

/* ============================================================
     15. APPOINTMENT
     ============================================================ */

.appointment {
  background: var(--bg);
  position: relative;
}

.appointment-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.appointment-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.appointment-form {
  background: var(--surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--t-base);
  background-color: var(--surface-alt);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: var(--shadow-focus);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.error-message {
  display: block;
  color: var(--danger);
  font-size: var(--text-xs);
  margin-top: var(--space-2xs);
  min-height: 16px;
}

.success-message {
  background: var(--success-tint);
  color: var(--success);
  border: 1px solid var(--success);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  display: none;
  font-size: var(--text-sm);
  font-weight: 500;
  animation: slideDown 0.4s var(--ease-out-soft);
}

.success-message.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
     16. FAQ
     ============================================================ */

.faq {
  background-color: var(--bg-alt);
}

.faq-container {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  transition: box-shadow var(--t-base), border-color var(--t-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--t-fast);
  text-align: left;
  font-family: var(--font-body);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question i {
  min-width: 18px;
  color: var(--accent-strong);
  transition: transform var(--t-base);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* ============================================================
     17. CONTACT
     ============================================================ */

.contact {
  background-color: var(--bg);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.contact-card {
  background: var(--surface-alt);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 190px;
  transition: all var(--t-base);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.contact-card h3 {
  margin-bottom: var(--space-2xs);
  color: var(--text-primary);
  font-size: var(--fs-h4);
}

.contact-card p {
  font-size: var(--text-sm);
  margin-bottom: 0.2rem;
}

.contact-card a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--t-fast);
}

.contact-card a:hover {
  color: var(--primary);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
  filter: grayscale(0.15);
}

body.dark-mode .contact-map {
  filter: grayscale(0.3) invert(0.92) hue-rotate(180deg) contrast(0.9);
}

/* ============================================================
     18. FOOTER
     ============================================================ */

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  position: relative;
}

.footer-container {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-column h4 {
  margin-bottom: var(--space-sm);
  color: var(--footer-heading);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 600;
}

.footer-column p {
  color: var(--footer-text);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

.footer-column ul li {
  margin-bottom: var(--space-xs);
}

.footer-column ul li a {
  color: var(--footer-text);
  font-size: var(--text-sm);
  transition: color var(--t-fast);
}

.footer-column ul li a:hover {
  color: var(--accent-400, #c7a468);
}

.social-icons {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(251, 249, 244, 0.08);
  border: 1px solid var(--footer-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-heading);
  transition: all var(--t-base);
}

.social-icons a:hover {
  background: var(--accent-400, #c7a468);
  border-color: var(--accent-400, #c7a468);
  color: #1c1508;
  transform: translateY(-3px);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-sm);
}

.newsletter-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--footer-border);
  background: rgba(251, 249, 244, 0.06);
  color: var(--footer-heading);
  font-size: var(--text-sm);
}

.newsletter-form input::placeholder {
  color: rgba(251, 249, 244, 0.45);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent-400, #c7a468);
}

.newsletter-form button {
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: rgba(251, 249, 244, 0.55);
  font-size: var(--text-xs);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: rgba(251, 249, 244, 0.55);
  font-size: var(--text-xs);
  transition: color var(--t-fast);
}

.footer-links a:hover {
  color: var(--accent-400, #c7a468);
}

/* ============================================================
     19. BACK TO TOP
     ============================================================ */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  z-index: var(--z-back-to-top);
  box-shadow: var(--shadow-lg);
  transition: all var(--t-base);
  opacity: 0;
  transform: translateY(10px);
}

.back-to-top.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ============================================================
     20. RESPONSIVE
     ============================================================ */

@media (max-width: 1180px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-image {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
  }

  .hero-content {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    margin: 0 auto;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 10;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .nav-cta {
    display: none;
  }
}

@media (max-width: 768px) {
  h1 {
    letter-spacing: -0.01em;
  }

  .nav-menu {
    position: fixed;
    top: 76px;
    right: var(--space-md);
    left: var(--space-md);
    width: auto;
    max-width: 380px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;

    padding: var(--space-sm);
    border-radius: var(--radius-lg);

    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transition: 0.3s var(--ease-out-soft);

    z-index: var(--z-mobile-menu);
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link.active,
  .nav-link:hover {
    color: var(--primary);
  }

  .hero {
    padding: var(--space-2xl) var(--space-md);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xs);
  }

  .stat-number {
    font-size: 1.25rem;
  }

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

  .doctors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

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

  .stats-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-box {
    border-right: none;
    border-bottom: 1px solid rgba(251, 249, 244, 0.14);
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .appointment-form {
    padding: var(--space-lg);
  }

  section {
    padding: var(--space-2xl) var(--space-md);
  }

  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: var(--text-sm);
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--space-md);
    gap: var(--space-sm);
  }

  .nav-logo span {
    display: none;
  }

  .hero {
    margin-top: 68px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-card {
    padding: var(--space-xs) var(--space-2xs);
  }

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

  .stats-wrapper {
    grid-template-columns: 1fr;
  }

  .stat-box {
    padding: var(--space-sm);
  }

  .faq-question {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }

  .faq-answer p {
    padding: 0 var(--space-md) var(--space-md);
  }

  .appointment-form {
    padding: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .social-icons {
    justify-content: center;
  }
}

/* ============================================================
     21. ACCESSIBILITY & PRINT
     ============================================================ */

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

@media print {
  .navbar,
  .back-to-top,
  .appointment,
  .footer,
  .loading-screen {
    display: none;
  }
}
