/* ==========================================================================
   ALPHA CLINIC — Modern Enterprise Design System & Stylesheet
   Specialized Dental Clinic & Smart Healthcare Platform | Riyadh, KSA
   Owned by Global Vision Company Medical Complex / CR & License: 7043654396
   Strict WCAG 2.1 AA Compliance, Fluid Mobile-First Typography & Responsive Layout
   ========================================================================== */

/* --- 1. Design Tokens & Custom Properties --- */
:root {
  /* Brand Color Palette */
  --brand-navy: #091f3b;
  --brand-navy-dark: #051326;
  --brand-navy-light: #162f54;
  --brand-teal: #0d9488;
  --brand-teal-hover: #0f766e;
  --brand-teal-light: #14b8a6;
  --brand-teal-pale: #f0fdfa;
  --brand-teal-border: #99f6e4;
  --brand-cyan: #0284c7;
  --brand-cyan-light: #e0f2fe;
  --brand-amber: #d97706;
  --brand-amber-light: #fef3c7;
  --brand-emerald: #059669;
  --brand-emerald-light: #d1fae5;
  --brand-rose: #e11d48;
  --brand-rose-light: #ffe4e6;

  /* Neutrals & Surfaces */
  --surface-ground: #f8fafc;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-tinted: #f0f9ff;
  
  /* Borders */
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0d9488;

  /* Typography Colors (WCAG AA compliant >= 4.5:1 ratio) */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #526077;
  --text-inverse: #ffffff;
  --text-teal: #0f766e;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.06);
  --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.08);
  --shadow-glow: 0 0 25px rgba(13, 148, 136, 0.25);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing & Layout */
  --container-max: 1220px;
  --header-height: 76px;

  /* Typography Font Stack */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Note: overflow-x: clip ensures no horizontal scroll without breaking sticky navigation */
body {
  font-family: var(--font-sans);
  background-color: var(--surface-ground);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

/* Skip Link for Accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background-color: var(--brand-navy);
  color: var(--text-inverse);
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 16px;
}

/* Focus Visible Styling (WCAG AA requirement) */
:focus-visible {
  outline: 3px solid var(--brand-teal);
  outline-offset: 3px;
}

/* Vestibular Safety: Prefers-reduced-motion Overrides */
@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;
  }
}

/* --- 3. Layout Primitives --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.main-content {
  flex: 1 0 auto;
  padding-bottom: clamp(48px, 8vw, 96px);
}

/* --- 4. Typography Primitives (Fluid clamp() & Accessible sizes) --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--brand-navy);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 3.8vw + 1rem, 3.25rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 2.4vw + 0.75rem, 2.35rem);
}

h3 {
  font-size: clamp(1.25rem, 1.4vw + 0.6rem, 1.6rem);
}

h4 {
  font-size: clamp(1.05rem, 0.8vw + 0.5rem, 1.25rem);
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.text-lead {
  font-size: clamp(1.05rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.65;
  color: var(--text-secondary);
}

.text-sm {
  font-size: 0.875rem; /* 14px */
}

.text-xs {
  font-size: 0.75rem; /* 12px - strict minimum */
}

/* --- 5. Interactive Components: Buttons & Badges --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px; /* Touch target requirement */
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-teal);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}
.btn-primary:hover {
  background-color: var(--brand-teal-hover);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface-card);
  color: var(--brand-navy);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background-color: var(--surface-muted);
  border-color: var(--brand-navy);
  transform: translateY(-1px);
}

.btn-navy {
  background-color: var(--brand-navy);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(9, 31, 59, 0.3);
}
.btn-navy:hover {
  background-color: var(--brand-navy-light);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
  background-color: #20ba5a;
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-teal {
  background-color: var(--brand-teal-pale);
  color: var(--brand-teal);
  border: 1px solid var(--brand-teal-border);
}

.badge-amber {
  background-color: var(--brand-amber-light);
  color: var(--brand-amber);
  border: 1px solid #fde68a;
}

.badge-emerald {
  background-color: var(--brand-emerald-light);
  color: var(--brand-emerald);
  border: 1px solid #a7f3d0;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

/* --- 6. Sticky Header & Glassmorphism Navigation --- */
/* Strict Rule: Header must be sticky, direct child of body, never hidden when scrolling down */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Logo is home link; sits at start of header; NO separate 'Home' menu item */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-image {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Desktop Navigation Links */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
}

.nav-link.active {
  color: var(--brand-teal);
  font-weight: 700;
  background-color: var(--brand-teal-pale);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 14px;
  right: 14px;
  height: 2px;
  background-color: var(--brand-teal);
  border-radius: var(--radius-full);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.riyadh-live-pill {
  display: none;
  align-items: center;
  gap: 8px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .riyadh-live-pill {
    display: inline-flex;
  }
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-navy);
  background-color: var(--brand-teal-pale);
  border: 1px solid var(--brand-teal-border);
  transition: all 0.2s ease;
}
.btn-header-login:hover {
  background-color: var(--brand-teal);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

/* Hamburger / Drawer Toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  color: var(--brand-navy);
  transition: background-color 0.2s ease;
}

@media (min-width: 992px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle:hover {
  background-color: var(--surface-muted);
}

.hamburger-icon {
  width: 22px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  width: 100%;
  height: 2.5px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle[aria-expanded="true"] .line-1 {
  transform: translateY(7.75px) rotate(45deg);
}
.mobile-toggle[aria-expanded="true"] .line-2 {
  opacity: 0;
}
.mobile-toggle[aria-expanded="true"] .line-3 {
  transform: translateY(-7.75px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  inset-block-start: var(--header-height);
  inset-inline: 0;
  bottom: 0;
  background-color: rgba(9, 31, 59, 0.65);
  backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: min(340px, 85vw);
  height: 100%;
  background-color: var(--surface-card);
  box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background-color: var(--brand-teal-pale);
  color: var(--brand-teal);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- 7. Hero & Homepage Sections --- */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-ground) 100%);
  padding-block: clamp(32px, 6vw, 64px);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-title span.accent-teal {
  color: var(--brand-teal);
  position: relative;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 560px) {
  .hero-ctas {
    flex-direction: row;
    align-items: center;
  }
}

/* Immediate Assistance Module */
.hero-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 16px;
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.hero-contact-pill:hover {
  border-color: var(--brand-teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.contact-pill-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-pill-text {
  display: flex;
  flex-direction: column;
  text-align: start;
}

.contact-pill-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-pill-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.hero-features-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.feature-check-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.check-icon {
  width: 18px;
  height: 18px;
  color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Hero Showcase Card & Riyadh Clock */
.hero-card-wrapper {
  position: relative;
}

.hero-booking-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.clock-live-box {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: var(--text-inverse);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 130px;
  box-shadow: 0 4px 16px rgba(9, 31, 59, 0.2);
}

.clock-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #93c5fd;
  font-weight: 700;
}

.clock-time {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-block: 4px;
}

.clock-location {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Quick Slot Picker on Hero */
.quick-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-block: 20px;
}

.quick-slot-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  min-height: 48px;
}
.quick-slot-pill:hover {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  color: var(--brand-teal);
}

/* --- 8. Section Standard Styling --- */
.section {
  padding-block: clamp(48px, 7vw, 84px);
}

.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(36px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-header.text-start {
  text-align: start;
  margin-inline: 0;
}

/* Grid Systems */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

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

/* --- 9. Dental Services & Cards --- */
.service-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

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

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--brand-teal-pale);
  color: var(--brand-teal);
  font-weight: 800;
  font-size: 1.1rem;
  border: 1px solid var(--brand-teal-border);
}

.service-ticket-prefix {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--surface-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.service-card-title {
  font-size: 1.35rem;
}

.service-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.service-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.service-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Feature & Benefit Cards */
.feature-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background-color: var(--brand-teal-pale);
  color: var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Step Cards */
.step-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--brand-navy);
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 1rem;
}

/* Testimonial Cards */
.testimonial-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.rating-stars {
  color: #f59e0b;
  letter-spacing: 2px;
  font-size: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--brand-navy-light);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Credentials Bar / Location Card */
.credentials-banner {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 48px);
  box-shadow: var(--shadow-xl);
}

.credentials-banner h2, .credentials-banner h3 {
  color: var(--text-inverse);
}

.credentials-banner p {
  color: #cbd5e1;
}

.credentials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 28px;
}

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

.credential-item {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.credential-label {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #99f6e4;
  margin-bottom: 6px;
}

.credential-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

/* --- 10. Interactive Booking Workflow (book.html) --- */
.booking-workflow-wrapper {
  max-width: 860px;
  margin-inline: auto;
  margin-block: clamp(24px, 4vw, 40px);
}

/* Progress Tracker */
.workflow-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.workflow-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background-color: var(--border-subtle);
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  background-color: var(--surface-ground);
  padding-inline: 8px;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid var(--border-strong);
  background-color: var(--surface-card);
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.progress-step.is-active .step-indicator {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal);
  color: var(--text-inverse);
  box-shadow: 0 0 0 4px var(--brand-teal-pale);
}

.progress-step.is-complete .step-indicator {
  border-color: var(--brand-emerald);
  background-color: var(--brand-emerald);
  color: var(--text-inverse);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.progress-step.is-active .step-title {
  color: var(--brand-teal);
}

/* 15-Day Date Carousel */
.date-picker-container {
  margin-bottom: 28px;
}

.date-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.date-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.date-pill {
  flex: 0 0 74px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  color: var(--text-primary);
  min-height: 78px;
  transition: all 0.2s ease;
  user-select: none;
}

.date-pill:hover:not(.is-disabled) {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
}

.date-pill.is-selected {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.date-pill.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background-color: var(--surface-muted);
}

.date-pill-weekday {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.date-pill-day {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.date-pill-month {
  font-size: 0.725rem;
  font-weight: 600;
}

/* Time Slot Selection */
.time-slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.time-slot-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-card);
  min-height: 64px;
  transition: all 0.2s ease;
  text-align: start;
}

.time-slot-btn:hover:not(:disabled) {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  transform: translateY(-1px);
}

.time-slot-btn.is-selected {
  border-color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  box-shadow: 0 0 0 2px var(--brand-teal);
}

.time-slot-btn:disabled {
  background-color: var(--surface-muted);
  opacity: 0.55;
  cursor: not-allowed;
}

.slot-time-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.slot-capacity-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background-color: var(--brand-emerald-light);
  color: var(--brand-emerald);
}

.slot-capacity-tag.tag-warning {
  background-color: var(--brand-amber-light);
  color: var(--brand-amber);
}

.slot-capacity-tag.tag-full {
  background-color: var(--surface-muted);
  color: var(--text-muted);
}

/* Booking Forms Primitives */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: #ffffff;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
  outline: none;
}

.form-textarea {
  min-height: 96px;
  resize: vertical;
}

.phone-input-wrapper {
  display: flex;
  align-items: stretch;
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 14px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border-strong);
  border-inline-end: none;
  border-start-start-radius: var(--radius-md);
  border-end-start-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
  user-select: none;
}

.phone-input {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.form-helper {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-rose);
  display: none;
}

.form-error.is-visible {
  display: block;
}

/* Concurrency Collision Alert Box */
.collision-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.875rem;
  margin-bottom: 24px;
}

/* Ticket Card (Step 3: Confirmation) */
.ticket-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--border-strong);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.ticket-ref-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-teal);
  letter-spacing: 0.05em;
  font-family: monospace;
}

.ticket-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

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

.ticket-item {
  display: flex;
  flex-direction: column;
}

.ticket-item-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ticket-item-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

/* --- 11. Login & Patient Portal Styles (login.html) --- */
.auth-wrapper {
  max-width: 520px;
  margin-inline: auto;
  margin-block: clamp(24px, 5vw, 48px);
}

.auth-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-xl);
}

/* WAI-ARIA Accessible Tablist Pattern */
.auth-tablist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background-color: var(--surface-muted);
  padding: 6px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.auth-tab {
  min-height: 48px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth-tab[aria-selected="true"] {
  background-color: var(--surface-card);
  color: var(--brand-navy);
  box-shadow: var(--shadow-sm);
}

.auth-tabpanel {
  display: none;
}

.auth-tabpanel.is-active {
  display: block;
}

.sub-tab-group {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.sub-tab-btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.sub-tab-btn.is-active {
  color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  font-weight: 700;
}

/* Live Queue Status Badge */
.live-queue-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, var(--surface-tinted) 0%, var(--brand-teal-pale) 100%);
  border: 1px solid var(--brand-teal-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

/* --- 12. Support & FAQ Styles (support.html) --- */
.support-wrapper {
  max-width: 900px;
  margin-inline: auto;
  margin-block: clamp(24px, 4vw, 40px);
}

.support-channels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 36px;
}

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

.support-channel-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.support-channel-card:hover {
  border-color: var(--brand-teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.faq-item {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:focus-within {
  border-color: var(--brand-teal);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: start;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  min-height: 48px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand-teal);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.is-open .faq-content {
  display: block;
}

/* Operating Hours Table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.hours-table tr:last-child {
  border-bottom: none;
}

.hours-table td {
  padding: 12px 0;
  font-size: 0.925rem;
}

.hours-table td.day-name {
  font-weight: 700;
  color: var(--brand-navy);
}

.hours-table td.day-hours {
  text-align: end;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- 13. Privacy Policy Styles (privacy.html) --- */
.privacy-wrapper {
  max-width: 1020px;
  margin-inline: auto;
  margin-block: clamp(24px, 4vw, 40px);
}

.privacy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 900px) {
  .privacy-layout {
    grid-template-columns: 280px 1fr;
  }
}

.privacy-toc-box {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.privacy-toc-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.privacy-toc-link:hover, .privacy-toc-link.is-active {
  color: var(--brand-teal);
  background-color: var(--brand-teal-pale);
  font-weight: 700;
}

.privacy-clause-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.privacy-clause-card h2 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  color: var(--brand-navy);
}

.privacy-clause-card p {
  margin-bottom: 14px;
  line-height: 1.7;
}

.privacy-clause-card ul {
  list-style: disc;
  padding-inline-start: 24px;
  margin-bottom: 14px;
}

.privacy-clause-card li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* --- 14. Global Comprehensive Footer --- */
.site-footer {
  margin-top: auto;
  background-color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: 32px;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 48px);
  margin-bottom: clamp(36px, 5vw, 56px);
}

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

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--brand-teal);
  transform: translateX(2px);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-bottom-bar {
    flex-direction: row;
    text-align: start;
  }
}

/* --- 15. Back to Top Button --- */
/* Strict Rule: fixed bottom-right, >= 48px touch target, translated aria-label */
.back-to-top {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--brand-navy);
  color: var(--text-inverse);
  box-shadow: 0 4px 16px rgba(9, 31, 59, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--brand-teal);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}
