/* ===== Custom Styles for Master Driving School ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f3e8ff;
}
::-webkit-scrollbar-thumb {
  background: #9333ea;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7e22ce;
}

/* ===== Navbar ===== */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(107, 33, 168, 0.08);
}

.nav-scrolled .nav-link {
  color: #581c87 !important;
}

.nav-scrolled .font-heading.font-extrabold.text-plum-900 {
  color: #581c87 !important;
}

/* ===== Hero Floating Cards ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

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

.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* ===== Service Cards ===== */
.service-card {
  border: 1px solid rgba(147, 51, 234, 0.08);
}

.service-card:hover {
  border-color: rgba(147, 51, 234, 0.2);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid rgba(147, 51, 234, 0.08);
}

.faq-item:hover {
  border-color: rgba(147, 51, 234, 0.15);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-content.open {
  max-height: 300px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-icon.rotated {
  transform: rotate(180deg);
}

/* ===== Mobile Menu ===== */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

/* Fallback: always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Button hover glow ===== */
button:hover, a:hover {
  /* handled inline */
}

/* ===== Select dropdown styling ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239333ea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  appearance: none;
}

/* ===== Focus visible ===== */
*:focus-visible {
  outline: 2px solid #9333ea;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
