/* Custom styles for Oak Hill Fire Department */

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

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span:first-of-type {
    color: #1e1815;
}

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

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

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state for reveal elements (no JS fallback) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

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

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

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

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

/* Selection color */
::selection {
    background: #c74040;
    color: #fefcfb;
}

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

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

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #fceee9 0%, #fadada 100%);
}

/* Print styles */
@media print {
    #navbar, #back-to-top, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
