/* Custom styles for El Paso Center for Orthodontics */

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

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

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

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

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

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

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

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

/* Intersection observer animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s 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; }

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(10, 15, 13, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

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

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* Hamburger animation */
.menu-line {
  transition: all 0.3s ease;
}

.nav-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.nav-open .menu-line:nth-child(2) {
  opacity: 0;
}
.nav-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* Card hover glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), transparent, rgba(16, 185, 129, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.service-card:hover::before {
  opacity: 1;
}

/* Image parallax container */
.img-container {
  overflow: hidden;
}

.img-container img {
  transition: transform 0.6s ease;
}

.img-container:hover img {
  transform: scale(1.03);
}

/* Gold accent line */
.gold-line {
  height: 2px;
  width: 60px;
  background: linear-gradient(90deg, #d4a853, transparent);
  border-radius: 1px;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@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;
  }
}
