/* ========================================
   Havre Food Bank — Custom Styles
   ======================================== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom Selection */
::selection {
    background-color: #c8952e;
    color: white;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(30, 58, 95, 0.08);
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.15s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.45s; }
.hero-anim:nth-child(5) { animation-delay: 0.6s; }

.hero-image-anim {
    opacity: 0;
    transform: translateX(40px);
    animation: slideRight 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }

/* Menu Icon Animation */
#menuBtn.active .menu-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ========================================
   Counter Animation
   ======================================== */
.counter-animated {
    transition: all 0.3s ease;
}

/* ========================================
   Hover Effects
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c8952e;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1e3a5f;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero-anim {
        animation-duration: 0.6s;
    }
    
    .hero-image-anim {
        animation-duration: 0.7s;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    #volunteer,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: block;
        opacity: 1;
        transform: none;
    }
}
