/* Custom styles for S.W.A.T. Security Transportation Agency */

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

/* Base styles */
body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(45, 212, 168, 0.3);
    color: #f0f4f8;
}

/* Scroll reveal base - content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal animations - only applied when JS adds the class */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Initial hidden state for scroll reveals (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero fade-in animations - always visible */
.fade-in {
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(2) {
    animation-delay: 0.15s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.45s;
}

.fade-in:nth-child(5) {
    animation-delay: 0.6s;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(3, 6, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 212, 168, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

/* Custom select styling */
select option {
    background-color: #1a2744;
    color: #d0dbe8;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Subtle hover lift for cards */
.group:hover {
    transform: translateY(-2px);
}

.group {
    transition: transform 0.3s ease;
}

/* Button press effect */
button:active,
a:active {
    transform: scale(0.98);
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a2744 0%, #0b1220 100%);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2dd4a8;
}

/* Reduced motion preference */
@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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .fade-in {
        opacity: 1;
        animation: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fade-in {
        animation: none;
        opacity: 1;
    }
}
