/* Custom styles for Winsen Driving School */

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

/* Selection color */
::selection {
    background-color: rgba(117, 35, 35, 0.2);
    color: #752323;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(61, 12, 12, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

nav.scrolled a,
nav.scrolled button {
    opacity: 1 !important;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Hero text animation - only for below-fold content, hero is always visible */
#hero h1,
#hero p,
#hero .flex,
#hero .inline-flex {
    opacity: 1;
    transform: none;
}

/* Button hover effects */
a[href^="tel:"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

/* Card hover lift */
.rounded-2xl {
    will-change: transform;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #dc4949;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal.hidden-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fff8f7;
}

::-webkit-scrollbar-thumb {
    background: #c42929;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a51d1d;
}

/* Image loading placeholder */
img {
    background-color: #fce7e7;
}

/* Mobile menu link hover */
.mobile-link {
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.mobile-link:hover {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Form focus states */
input:focus,
textarea:focus {
    border-color: #c42929 !important;
    box-shadow: 0 0 0 3px rgba(196, 41, 41, 0.1);
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
