/* ============================================
   Expert Electronics — Custom Styles
   Premium Dark Luxury Auto Repair Website
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(194, 112, 78, 0.3);
    color: #FAF3EB;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #110E0C;
}
::-webkit-scrollbar-thumb {
    background: #3D322C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C2704E;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(17, 14, 12, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 165, 116, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #D4A574 !important;
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #D4A574;
    transition: width 0.3s ease;
}

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

.menu-line {
    display: block;
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
    margin-right: 0;
}

/* ============================================
   Hero
   ============================================ */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.25s; }
.hero-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-reveal:nth-child(4) { animation-delay: 0.55s; }
.hero-reveal:nth-child(5) { animation-delay: 0.7s; }

.hero-image-reveal {
    opacity: 0;
    transform: translateX(40px);
    animation: heroImageReveal 1s ease forwards 0.3s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scrollIndicator {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ============================================
   Services
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ============================================
   About
   ============================================ */
/* About section uses same scroll animation via JS */

/* ============================================
   Why Us
   ============================================ */
.why-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}

.why-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.why-card:nth-child(1) { transition-delay: 0.05s; }
.why-card:nth-child(2) { transition-delay: 0.1s; }
.why-card:nth-child(3) { transition-delay: 0.15s; }
.why-card:nth-child(4) { transition-delay: 0.2s; }

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonial-card:nth-child(3) { transition-delay: 0.15s; }

/* ============================================
   General Scroll Animations
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Form
   ============================================ */
select option {
    background: #2C2420;
    color: #FAF3EB;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero-reveal {
        animation-duration: 0.6s;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero h1 span {
        display: inline;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    .hero-image-reveal {
        margin-top: 2rem;
    }
}
