/* Premium Dental Redesign — Custom Styles & Tokens */

/* ── DESIGN SYSTEM BASE ── */
:root {
  --c-primary: #0F172A;        /* Deep midnight slate */
  --c-primary-dk: #020617;     /* Almost black */
  --c-accent: #C9A24B;         /* Warm champagne gold */
  --c-accent-lt: #F5E6C4;      /* Soft gold tint */
  --c-ink: #0F172A;
  --c-muted: #475569;
  --c-surface: #FFFFFF;
  --c-subtle: #FAF9F6;         /* Warm cream background */
  --c-border: #E2E8F0;
  --c-success: #15803D;
  --c-rating: #EAB308;
  
  --f-heading: "Fraunces", serif;
  --f-body: "Inter", sans-serif;
  
  --r-sm: 0.375rem;
  --r-md: 0.5rem;
  --r-lg: 0.75rem;
  --r-xl: 1rem;
  --r-2xl: 1.5rem;
  
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 32px 64px -16px rgba(15, 23, 42, 0.12);
}

body {
  font-family: var(--f-body);
  color: var(--c-muted);
  background-color: var(--c-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-heading);
  color: var(--c-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ── Correct Section Padding ── */
.section-py {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}
@media (min-width: 1024px) {
  .section-py {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* ── Image Utilities ── */
.img-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.img-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

/* ── Floating Header Glassmorphism ── */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

/* ── Interactive Service Selector Dashboard ── */
.service-tab-btn.active {
  background-color: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}

.service-tab-btn.active i {
  color: var(--c-accent) !important;
}

.service-tab-content {
  display: none;
}

.service-tab-content.active {
  display: block;
  animation: fadeIn .4s ease-out;
}

/* ── Doctor Profile Tabs ── */
.doc-tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.doc-tab-btn.active {
  border-color: var(--c-accent);
  color: var(--c-ink);
  font-weight: 700;
}

.doc-tab-content {
  display: none;
}

.doc-tab-content.active {
  display: block;
  animation: fadeIn .4s ease-out;
}

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

/* ── Before/After slider thumb ────────────────────────────── */
#baSlider {
  height: 4px;
  background: transparent;
}

#baSlider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

#baSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-accent, #C9A24B);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  margin-top: -9px;
}

#baSlider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

#baSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-accent, #C9A24B);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

/* ── Lightbox for Gallery ── */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 100;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.95);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--c-accent);
}

/* ── Comparison Table Grid ── */
.comparison-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-row:last-child {
  border-bottom: none;
}

@media (max-width: 640px) {
  .comparison-row {
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 0.85rem;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }
}

/* ── Accessibility & Focus Rings ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--c-accent, #C9A24B);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 76px;
  }
}