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

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

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

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

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

/* ===== Scroll Reveal ===== */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .section-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
}

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #a11d3e;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(161, 29, 62, 0.08);
}

.navbar-scrolled .nav-link {
    color: #4a4a4a;
}

.navbar-scrolled .nav-link:hover {
    color: #a11d3e;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    padding: 8px 0;
    border-bottom: 1px solid #fce7eb;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Custom Select ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a11d3e' stroke-width='2' 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;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* ===== Button Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a11d3e;
    outline-offset: 2px;
}

/* ===== Selection Color ===== */
::selection {
    background: #fce7eb;
    color: #6f1f33;
}

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

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

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

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

/* ===== Image Optimization ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== Form Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* ===== Tablet Adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== Large Screen Optimizations ===== */
@media (min-width: 1280px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
