/* Chris's Auto Service — Custom Styles */

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

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

#navbar.scrolled .menu-line {
    background: white;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Mobile menu button active state */
#mobileMenu.open ~ .mobile-menu-btn .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenu.open ~ .mobile-menu-btn .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open ~ .mobile-menu-btn .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Scroll reveal animations (progressive enhancement) */
@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);
    }

    .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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Gold accent line animation */
.gold-line {
    position: relative;
    display: inline-block;
}

.gold-line::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4A537, #E2B84B);
    transition: width 0.4s ease;
}

.gold-line:hover::after {
    width: 100%;
}

/* Floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-small {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-6px) rotate(1deg); }
}

.floating-card-1 {
    animation: float 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-reverse 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-small 4s ease-in-out infinite;
}

/* Pulse animation for open indicator */
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.pulse-dot {
    animation: pulse-ring 2s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
    background: #060E1F;
}

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

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

/* Selection color */
::selection {
    background: rgba(212, 165, 55, 0.3);
    color: white;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0F1F3A inset !important;
    -webkit-text-fill-color: white !important;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #D4A537;
    outline-offset: 2px;
}
