/* ===================================
   Elks Lodge B.P.O.E. #1058 — Custom Styles
   =================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(20, 184, 166, 0.2);
    color: #0f172a;
}

/* Nav link hover underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2dd4bf, #5eead4);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

/* Service card entrance animation */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scroll-reveal base styles (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Back to top button */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-2px);
}

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

/* Image lazy loading fade-in */
img {
    transition: opacity 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

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

/* Print styles */
@media print {
    #navbar, #backToTop, #contactForm, #formSuccess {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-midnight-800, .bg-midnight-900 {
        background: #fff !important;
        color: #000 !important;
    }
}
