/* ============================================================
   Lumina Dental Clinic — custom styles layered on top of Tailwind (CDN)
   ============================================================ */

:root {
  --blue: #1467e8;
  --blue-light: #4b8ef0;
  --blue-dark: #0d449e;
  --ink: #0e1b2c;
  --ink-soft: #425466;
  --surface: #f4f7fb;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: var(--ink);
}

.font-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.text-ink-soft { color: var(--ink-soft); }
.text-ink-faint { color: #7c8ba1; }
.bg-surface { background-color: var(--surface); }
.border-surface-line { border-color: #dde6f0; }

::selection {
  background: var(--blue);
  color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: #c3d3e8;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 0.25em;
  color: var(--ink);
  animation: pulseFade 1.4s ease-in-out infinite;
}
.preloader-icon {
  width: 2.25rem;
  height: 2.25rem;
  animation: preloaderSpin 1.6s ease-in-out infinite;
}
@keyframes pulseFade {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes preloaderSpin {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(6deg); }
}

/* Header */
#site-header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}
#site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -18px rgba(14, 27, 44, 0.25);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transition: width 0.35s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--blue);
}

/* Gradient text */
.text-blue-gradient {
  background: linear-gradient(120deg, #0d449e, #4b8ef0 50%, #1467e8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bg-blue-gradient {
  background: linear-gradient(135deg, #4b8ef0 0%, #1467e8 55%, #0d449e 100%);
}

/* Eyebrow labels */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow-light { color: rgba(255,255,255,0.9); }
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(20, 103, 232, 0.15);
}
.eyebrow-dot-light {
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

/* Buttons */
.btn-blue {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-blue::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  z-index: -1;
}
.btn-blue:hover::before {
  transform: translateX(120%);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Soft background patterns */
.pattern-bg {
  background-image:
    radial-gradient(circle at 15% 25%, rgba(20,103,232,0.06), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(20,103,232,0.05), transparent 40%);
}
.pattern-bg-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
}

/* Hero */
.hero-bg {
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.scroll-indicator {
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--blue-light);
  border-radius: 999px;
  position: relative;
}
.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--blue);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 6px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  100% { top: 22px; opacity: 0; }
}

/* Floating hero cards */
.float-card {
  animation: floatY 4.5s ease-in-out infinite;
}
.float-card-2 {
  animation: floatY 4.5s ease-in-out infinite;
  animation-delay: 0.4s;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Cards */
.card-shadow {
  box-shadow: 0 20px 45px -22px rgba(14, 27, 44, 0.22);
}
.card-shadow-lg {
  box-shadow: 0 30px 70px -20px rgba(14, 27, 44, 0.35);
}

/* Doctor / service card image zoom */
.doctor-card img,
.service-card img {
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.doctor-card:hover img,
.service-card:hover img {
  transform: scale(1.08);
}

.service-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -10px rgba(14,27,44,0.35);
}

/* Doctor view button overlay */
.doctor-view-btn {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.85rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(13,68,158,0.92), rgba(13,68,158,0));
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: pointer;
  border: none;
}
.doctor-card:hover .doctor-view-btn,
.doctor-card:focus-within .doctor-view-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Filter tabs (Services) */
.filter-tab-btn {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #dde6f0;
  color: var(--ink-soft);
  background: #ffffff;
  transition: all 0.3s ease;
}
.filter-tab-btn:hover {
  border-color: var(--blue-light);
  color: var(--blue);
}
.filter-tab-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 25px -10px rgba(20,103,232,0.5);
}

.service-card {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.service-card.hiding {
  opacity: 0;
  transform: scale(0.96);
  position: absolute;
  pointer-events: none;
}

/* ---------- Before & After comparison slider ---------- */
.ba-slider {
  position: relative;
  user-select: none;
}
.ba-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: ew-resize;
}
.ba-img-before,
.ba-img-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-img-after {
  clip-path: inset(0 50% 0 0);
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #ffffff;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(14,27,44,0.08);
}
.ba-handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -8px rgba(14,27,44,0.4);
}
.ba-tag {
  position: absolute;
  top: 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(14,27,44,0.55);
  color: #ffffff;
  pointer-events: none;
}
.ba-tag-before { left: 0.85rem; }
.ba-tag-after { right: 0.85rem; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.ba-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
}
.ba-card { transition: box-shadow 0.3s ease; }

/* Testimonials */
.testimonial-slide {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.star {
  color: #ffd75e;
}

/* ---------- FAQ accordion ---------- */
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
}
.faq-chevron {
  color: var(--blue);
  transition: transform 0.35s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-item.open {
  border-color: var(--blue-light) !important;
  box-shadow: 0 15px 35px -20px rgba(20,103,232,0.3);
}
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(.2,.7,.2,1);
}
.faq-panel > .faq-panel-inner {
  overflow: hidden;
}
.faq-item.open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-panel-inner {
  color: var(--ink-soft);
  line-height: 1.7;
  padding: 0 1.5rem 1.35rem;
  min-height: 0;
}

/* Appointment / newsletter inputs */
.input-field {
  background: #ffffff;
  border: 1px solid #dde6f0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
#appointment .input-field,
#appointment-form .input-field {
  background: #ffffff;
}
.input-field:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 103, 232, 0.15);
}
.input-field.field-error {
  border-color: #e0473f;
}

/* Emergency banner */
.emergency-banner {
  background: linear-gradient(135deg, #4b8ef0 0%, #1467e8 55%, #0d449e 100%);
  box-shadow: 0 30px 70px -25px rgba(20,103,232,0.55);
}
.emergency-pulse-wrap {
  position: relative;
}
.emergency-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.6);
  animation: emergencyPulse 2s ease-out infinite;
}
@keyframes emergencyPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* WhatsApp floating button */
.whatsapp-btn {
  box-shadow: 0 10px 25px -8px rgba(37,211,102,0.6);
  position: relative;
}
.whatsapp-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #25D366;
  animation: whatsappPulse 2.4s ease-out infinite;
}
@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Back to top */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}

/* Doctor modal / lightbox-style dialog */
#doctor-modal {
  transition: opacity 0.3s ease;
}
#doctor-modal.hidden-lb {
  opacity: 0;
  pointer-events: none;
}

/* Focus visibility for a11y */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
