/* ===== Custom Styles for City Dental Chicago ===== */

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

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

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Experience cards stagger */
#patient-experience .grid > div:nth-child(1) { transition-delay: 0.05s; }
#patient-experience .grid > div:nth-child(2) { transition-delay: 0.15s; }
#patient-experience .grid > div:nth-child(3) { transition-delay: 0.25s; }

/* Navbar transition */
#navbar.scrolled {
  background: rgba(5, 10, 8, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hero image hover */
#hero .relative:first-of-type > div:first-of-type img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
#hero .relative:first-of-type:hover > div:first-of-type img {
  transform: scale(1.02);
}

/* Button magnetic hover effect */
a[href="#contact"],
button[type="submit"] {
  position: relative;
  overflow: hidden;
}

a[href="#contact"]::before,
button[type="submit"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

a[href="#contact"]:hover::before,
button[type="submit"]:hover::before {
  opacity: 1;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Mobile menu animation */
#mobileMenu {
  animation: fadeIn 0.3s ease;
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0a1210 inset !important;
  -webkit-text-fill-color: #fefdf8 !important;
}

/* Print styles */
@media print {
  nav, #contactForm, button[type="submit"] {
    display: none;
  }
  body {
    background: white !important;
    color: #1a1a1a !important;
  }
}
