/* ── Custom styles for All About Driving Inc ── */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    }
::-webkit-scrollbar-track {
    background: #F6FBF8;
}
::-webkit-scrollbar-thumb {
    background: #B8E6D0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8CCFB5;
}

/* ── Navbar transition ── */
header.scrolled {
    background: rgba(246, 251, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(11, 29, 58, 0.06);
}

header.scrolled .nav-title {
    color: #0B1D3A;
}

/* ── Service cards ── */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
}

/* ── Why cards ── */
.why-card {
    transition: transform 0.3s ease;
}
.why-card:hover {
    transform: translateY(-2px);
}

/* ── Nav links on scroll ── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #B8E6D0;
    transition: width 0.25s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile menu ── */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.menu-line {
    transition: all 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ── Select arrow ── */
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='%230B1D3A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #B8E6D0;
    outline-offset: 2px;
}
