/* Custom styles for Advance Area Service Corp */

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

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

::-webkit-scrollbar-track {
    background: #F5F2EB;
}

::-webkit-scrollbar-thumb {
    background: #2D5A3D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d7a47;
}

/* Hero animations */
.hero-badge {
    animation: fadeInDown 0.8s ease-out forwards;
    opacity: 0;
}

.hero-headline {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section reveal animations */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.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; }

/* Service card hover effect */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Navigation active state */
.nav-link {
    position: relative;
}

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

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

/* Header scroll state */
header.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Mobile menu animation */
.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.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

/* Print styles */
@media print {
    header, footer, #contactForm, .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* Tablet adjustments */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.25rem;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .hero-headline {
        font-size: 4rem;
    }
}
