/* Custom styles for The Best Driving School */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7d2424;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

/* Navbar transition */
#navbar.scrolled {
    background: rgba(61, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled #nav-logo-text {
    opacity: 1;
}

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

/* Hero parallax-like effect */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Image hover zoom */
.group img {
    transition: transform 0.7s ease;
}

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

/* Service card hover */
.group .group-hover\:scale-110 {
    transition: transform 0.5s ease;
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #d45656;
    outline-offset: 2px;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 86, 86, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(212, 86, 86, 0); }
}

/* Reduced motion */
@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;
    }
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .reveal {
        display: none !important;
    }

    body {
        color: #1a1a1a;
        background: white;
    }
}
