/* ==========================================================================
   Vidhya Dental Clinic | Implant & Laser Centre - Atelier Design System
   Tailored for Implantology, Specialized Laser Dentistry, and Smile Architecture
   ========================================================================== */

:root {
  /* Atelier Surgical Color Tokens */
  --color-primary: #00353a;
  --color-primary-container: #0b4d53;
  --color-primary-light: #16646c;
  --color-primary-hover: #083b40;
  --color-on-primary: #ffffff;
  --color-primary-fixed: #b3ecf3;
  
  --color-secondary: #37675b;
  --color-secondary-container: #b7eada;
  --color-secondary-light: #e7f0ed;
  --color-on-secondary: #ffffff;
  --color-on-secondary-container: #3b6b5f;
  
  --color-tertiary: #c5a880;
  --color-tertiary-dark: #8c6d44;
  --color-tertiary-container: #574222;
  --color-tertiary-fixed: #fedeb2;
  --color-tertiary-fixed-dim: #e0c298;
  
  --color-surface: #effcfe;
  --color-surface-dim: #d0dcdf;
  --color-surface-lowest: #ffffff;
  --color-surface-low: #eaf6f8;
  --color-surface-container: #e4f0f2;
  --color-surface-container-high: #deeaed;
  --color-surface-container-highest: #d9e5e7;
  
  --color-text-main: #121d1f;
  --color-text-muted: #404849;
  --color-text-subtle: #6c787a;
  --color-outline: #70797a;
  --color-outline-variant: #bfc8c9;
  --color-border: #d8dfdc;
  
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-subtle: 0 2px 8px -2px rgba(11, 77, 83, 0.04), 0 1px 3px rgba(11, 77, 83, 0.02);
  --shadow-card: 0 4px 20px -4px rgba(11, 77, 83, 0.08), 0 2px 6px rgba(11, 77, 83, 0.03);
  --shadow-lifted: 0 12px 32px -6px rgba(11, 77, 83, 0.12), 0 4px 12px rgba(11, 77, 83, 0.05);
  --shadow-modal: 0 24px 48px -12px rgba(11, 77, 83, 0.22);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-surface);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface-low);
}
::-webkit-scrollbar-thumb {
  background: #bfc8c9;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #70797a;
}

/* Typography Helpers */
.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

/* Dialog & Modal Guidance Compliance */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(18, 29, 31, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog[open] {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Interactive Before & After Split Image Slider */
.before-after-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
  background-color: #0b4d53;
}

.before-after-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.before-after-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  overflow: hidden;
  width: 50%;
  pointer-events: none;
  border-right: 2.5px solid var(--color-tertiary);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.25);
  transition: width 0.05s linear;
}

.before-after-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none;
}

.before-after-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-primary-container);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 20;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.before-after-handle:hover,
.before-after-handle:active {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--color-primary);
}

.before-after-slider-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 30;
  margin: 0;
}

/* Badge & Tag Styling */
.badge-gold {
  background: linear-gradient(135deg, #fdf6ec 0%, #faedd8 100%);
  color: #7a5829;
  border: 1px solid rgba(197, 168, 128, 0.4);
}

.badge-teal {
  background-color: #eaf6f8;
  color: var(--color-primary-container);
  border: 1px solid rgba(11, 77, 83, 0.18);
}

.badge-sage {
  background-color: #e7f0ed;
  color: var(--color-secondary);
  border: 1px solid rgba(55, 103, 91, 0.2);
}

/* Status Indicators */
.pulse-green {
  box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(46, 125, 50, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0);
  }
}

/* Card Hover Elevation Transitions */
.card-hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
  border-color: rgba(11, 77, 83, 0.25);
}

/* Smooth Navigation Underline */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary-container);
  transition: width 0.25s ease;
  border-radius: 9999px;
}

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

.nav-link.active {
  color: var(--color-primary) !important;
  font-weight: 700;
}

/* Interactive Tabs */
.tab-btn.active {
  background-color: var(--color-primary-container);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(11, 77, 83, 0.2);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background-color: #ffffff;
  border-left: 4px solid var(--color-primary-container);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  animation: slideInToast 0.3s ease forwards;
}

@keyframes slideInToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
