/* ===== Custom Styles for Forest Avenue Dental ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #080505;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #d4a843, #a02222);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #e6c060, #c43636);
}

/* Selection color */
::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #fff;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Animation classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ===== Hero card float animations ===== */
.hero-card-1 {
  animation: float 5s ease-in-out infinite;
}
.hero-card-2 {
  animation: float 6s ease-in-out infinite 0.5s;
}
.hero-card-3 {
  animation: float 4.5s ease-in-out infinite 1s;
}

/* ===== Nav transition states ===== */
.nav-scrolled {
  background: rgba(8, 5, 5, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

.nav-scrolled .menu-line {
  background: #fff;
}

/* ===== Mobile menu animations ===== */
#mobile-menu {
  animation: fadeInUp 0.3s ease-out;
}

.menu-open .menu-line:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-open .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
.menu-open .menu-line:last-child {
  width: 1.25rem;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Service card hover glow ===== */
.group:hover .group-hover\:scale-110 {
  box-shadow: 0 0 25px rgba(212, 168, 67, 0.15);
}

/* ===== Button ripple effect ===== */
button, a {
  position: relative;
  overflow: hidden;
}

/* ===== Form focus states ===== */
input:focus, select:focus, textarea:focus {
  background: rgba(255, 255, 255, 0.07) !important;
}

/* ===== Gold shimmer text effect ===== */
.shimmer-text {
  background: linear-gradient(
    90deg,
    #d4a843 0%,
    #f0d080 25%,
    #d4a843 50%,
    #f0d080 75%,
    #d4a843 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ===== Decorative line animation ===== */
.deco-line {
  position: relative;
  overflow: hidden;
}
.deco-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4a843, transparent);
  animation: shimmer 3s linear infinite;
}

/* ===== Testimonial quote marks ===== */
.testimonial-quote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4a843, #a02222);
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.group:hover .testimonial-quote::before {
  opacity: 1;
}

/* ===== Intersection observer fade-in ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.2;
  }
}

/* ===== 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 {
    opacity: 1;
    transform: none;
  }
}
