/* Custom styles for My First Drive Driving School */

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

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

/* Selection color */
::selection {
    background: #059669;
    color: white;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* Nav text color on scroll */
#navbar.scrolled .nav-logo-text {
    color: #064e3b;
}

#navbar.scrolled a:not(.bg-emerald-600):not([href^="tel:"]) {
    color: #064e3b !important;
}

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#hero .absolute.inset-0:first-of-type {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Card hover effects */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Scroll reveal base styles */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 500ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { transition: none; }
    #hero .absolute.inset-0:first-of-type { animation: none; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    max-height: 500px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Service card line accent on hover */
.group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #059669, #34d399);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Process step connector (mobile) */
@media (max-width: 767px) {
    .relative::after {
        display: none !important;
    }
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Testimonial card hover */
.bg-white.rounded-2xl:hover {
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: 0 20px 60px -15px rgba(6, 78, 59, 0.08);
}
