/* ===== Custom Styles for Rollins Truck & Trailer Repair ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111111;
}
::-webkit-scrollbar-thumb {
    background: #2d5a3d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d7040;
}

/* Selection color */
::selection {
    background: #c9a84c;
    color: #111111;
}

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

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

#navbar:not(.scrolled) {
    background: transparent;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s 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; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }

/* ===== Hero Section ===== */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #111111, transparent);
    pointer-events: none;
}

/* ===== Map Filter ===== */
iframe[src*="google.com/maps"] {
    border-radius: 16px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    #hero::after {
        height: 100px;
    }
}

/* ===== Focus styles for accessibility ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card {
        transition: none;
    }
    .service-card:hover {
        transform: none;
    }
}
