/* ===== Custom Styles for Custom Audio & Corolla Electric ===== */

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

/* ===== Navbar ===== */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(15, 44, 31, 0.08);
}

.nav-scrolled .font-display.font-bold.text-forest-900 {
    color: #0f2c1f;
}

/* ===== Mobile Menu ===== */
.menu-open #mobileMenu {
    transform: translateX(0);
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1f5c40, #D4A843);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Gallery ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
}

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

/* Stagger delays */
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Custom Selection ===== */
::selection {
    background: #1f5c40;
    color: #faf9f6;
}

/* ===== Form Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: #1f5c40 !important;
    box-shadow: 0 0 0 4px rgba(31, 92, 64, 0.1) !important;
}

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Image Loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* ===== Print Styles ===== */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* ===== Ultra-wide ===== */
@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }
}
