/* ============================================
   Dr. Mohammed Khan, MD — Premium Medical Site
   ============================================ */

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0c0a08;
}
::-webkit-scrollbar-thumb {
  background: #1e3a2f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #FAF6F0;
}

/* Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Gold accent line animation */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Navbar transitions */
#navbar.scrolled {
  background: rgba(12, 10, 8, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

#navbar.scrolled .menu-line {
  background: #FAF6F0;
}

/* Mobile menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: fadeSlideIn 0.4s ease forwards;
  opacity: 0;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Menu toggle animation */
.menu-toggle-active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
.menu-toggle-active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle-active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.5rem;
}

/* Scroll reveal base — content always visible by default */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal with animation (progressive enhancement via JS) */
.js-loaded .reveal-animated {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-loaded .reveal-animated.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.reveal-animated.delay-1 { transition-delay: 0.1s; }
.reveal-animated.delay-2 { transition-delay: 0.2s; }
.reveal-animated.delay-3 { transition-delay: 0.3s; }
.reveal-animated.delay-4 { transition-delay: 0.4s; }
.reveal-animated.delay-5 { transition-delay: 0.5s; }
.reveal-animated.delay-6 { transition-delay: 0.6s; }

/* Floating animation for hero cards */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.float-slow {
  animation: float 5s ease-in-out infinite;
}
.float-medium {
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}
.float-fast {
  animation: float 3.5s ease-in-out infinite;
  animation-delay: 2s;
}

/* Gold gradient text utility */
.text-gold-gradient {
  background: linear-gradient(135deg, #D4A853, #E8C97A, #B8923F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover glow */
.service-card:hover {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.08), 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal-animated {
    opacity: 1;
    transform: none;
  }
  .float-slow, .float-medium, .float-fast {
    animation: none;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  #hero h1 {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  #hero h1 span {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  #hero h1 {
    font-size: 2rem;
  }

  #hero h1 span {
    font-size: 1.75rem;
  }
}
