/* /assets/css/style.css
/* Prevent horizontal overflow globally */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-red: #d32f2f;
    --dark-grey: #212529;
    --light-grey: #f8f9fa;
    --nav-height: 100px;
    --nav-shrink: 70px;
}

body {
    transition: background-color 0.3s, color 0.3s;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-family: 'Bree Serif', serif;
}

.custom-bg-gradiant-dots {
    background-color: #ddd;
    background-image: radial-gradient(rgba(177, 148, 148, 0.15) 2px, transparent 0);
    background-size: 20px 20px;
}

.custom-bg-gradiant-grey {
    background: linear-gradient(180deg, #a3a3a3 0%, #cbcbcb 100%);
}

.fa-solid, .fas {
    min-width: 18px;
}

.facebook-header {
    text-align: left !important;
    margin-left: 30px;
}

/* Nav Styles */
#mainNav {
    /* background-color: rgba(255, 255, 255, 0.98); */
    transition: all 0.4s ease;
    padding-top: 0px;
    padding-bottom: 0px;
    border-bottom: 2px solid var(--primary-red);
}

#mainNav.scrolled {
    padding-top: 5px;
    padding-bottom: 5px;
    background-color: #fff;
}

#navLogo {
    height: 120px;
    transition: height 0.4s ease;
}

#mainNav.scrolled #navLogo {
    height: 50px;
}

.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

.sticky {
    transition: all 0.4s ease;
  position: -webkit-sticky; /* Support for Safari */
  position: sticky;
  top: 0;                   /* This is required for sticky to work */
  z-index: 1000;            /* Ensures it stays above other content */
}

.sticky-fb {
    transition: all 0.4s ease;
  position: -webkit-sticky; /* Support for Safari */
  position: sticky;
  top: 60px;                   /* This is required for sticky to work */
}

#sticky-alert.scrolled {
    padding-bottom: 0px !important;
}

/* --- Modern Red Underline Navigation (Arrow Fixed) --- */

.navbar-nav .nav-link {
    position: relative;
    padding-bottom: 8px; /* Extra space for the underline */
    margin: 0 1px;
    transition: color 0.3s ease;
}

.navbar-nav .dropdown-item {
    font-size: 0.9rem;
}

/* Use ::before for the Underline so it doesn't conflict with the arrow */
.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: #d32f2f;
    transition: width 0.3s ease-in-out;
}

/* Hover and Active states for the underline */
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 100%;
}

/* Maintain the Red color for the active link text */
.navbar-nav .nav-link.active {
    color: #d32f2f !important;
}

.dropdown-item:hover {
    background: #dc3545;
    color: #fff;
}

/* Adjust the Bootstrap Caret (Arrow) position to sit nicely above the line */
.navbar-toggler:focus {
    box-shadow: none; /* Cleaner mobile look */
}

.dropdown-menu[data-bs-popper] {
    top: 100%;
}

.fb-column {
    padding-left: 0;
}

/* --- Custom Mobile Menu Breakpoint (1563px) --- */

/* 1. Mobile State (0px to 1577px) */
@media (max-width: 1577px) {
    .navbar-expand-custom .navbar-toggler {
        display: block;
    }

    .navbar-expand-custom .navbar-collapse {
        display: none !important;
        flex-basis: 100%;
        flex-grow: 1;
        order: 3; /* Forces the menu to go BELOW the logo and buttons */
    }

    .navbar-expand-custom .navbar-collapse.show {
        display: block !important;
    }

    /* Keep logo on left (order 1) and buttons on right (order 2) */
    .navbar-brand { order: 1; }
    .custom-nav-order { 
        order: 2; 
        margin-left: auto; /* Pushes buttons to the right side of the logo */
    }

    .navbar-expand-custom .navbar-nav {
        flex-direction: column;
        padding: 20px 0;
    }

    .navbar-nav .nav-link {
        margin: 0 1px;
        display: inline-block;
        width: fit-content;
    }

    .navbar-expand-custom .dropdown-menu {
        position: static;
        float: none;
        background-color: transparent;
        border: none;
        padding-left: 20px;
        box-shadow: none !important;
    }

    #navLogo { height: 75px; }

    #darkModeToggle {
        margin-right: 5px !important;
    }
}

/* 2. Desktop State (1578px and above) */
@media (min-width: 1578px) {
    .navbar-expand-custom {
        flex-flow: row nowrap;
        justify-content: flex-start;
    }

    .navbar-expand-custom .navbar-nav {
        flex-direction: row;
        margin-left: auto !important;
    }

    .navbar-expand-custom .navbar-nav .nav-link {
        padding-right: 0.5rem !important;
        padding-left: 0.5rem !important;
    }

    .navbar-expand-custom .navbar-toggler {
        display: none;
    }

    .navbar-expand-custom .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        order: 2; /* Menu goes in middle */
    }

    .custom-nav-order {
        order: 3; /* Buttons go at the very end */
    }

    #nav-container {
        max-width: 1563px;
    }

    /* Ensure dropdowns float over content on desktop */
    .navbar-expand-custom .dropdown-menu {
        position: absolute !important;
        display: none;
    }
    
    .navbar-expand-custom .dropdown-menu.show {
        display: block !important;
    }
}

/* Fix for active underline position in the stacked mobile view */
@media (max-width: 1577px) {
    .navbar-nav .nav-link::before {
        bottom: 2px;
    }
}

@media (min-width: 1578px) {
    #nav-container {
        max-width: 1578px;
    }
}

@media (max-width: 1399px) {
    .facebook-header {
        text-align: center !important;
        margin-left: 0;
    }
}

@media (max-width: 991px) {
    .navbar-nav .nav-link {
        margin: 0 1px;
        display: inline-block;
    }
    .navbar-nav .nav-link::before {
        bottom: 5px; /* Adjust line position for mobile menu */
    }
}

@media (max-width: 976px) {
    .fb-column {
        padding-left: calc(var(--bs-gutter-x) * .5);
    }
}

/* Adjust the massive Display-1 heading for small mobile screens */
@media (max-width: 576px) {
    #hero_container {
        margin-top:100px;
    }
    #navLogo {
        height: 75px;
    }
    #mainNav.scrolled #navLogo {
        height: 50px;
    }
    .fb-col {
        margin-top: 0;
    }
    #cardColumn {
        margin-top: 24px;
    }
    #hero-logo {
        top: 0px !important;
        height: 170px !important;
    }
    #hero-text-1 {
        top: 0px !important;
    }
    #btnEmergencyInfo {
        margin-bottom: 40px;
    }
    .fs-3 {
        /* font-size: calc(1.275rem + .3vw) !important; */
        font-size: 1.25rem !important;
    }
    .fc-dayGridMonth-button, .fc-listWeek-button, .fc-timeGridWeek-button {
        display: none !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.home-hero {
    min-height: 75vh;
}

/* For non-home pages */
.sub-hero {
    height: 350px;
}

.fw-black {
    font-weight: 800;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.transition-all {
    transition: all 0.4s ease;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] .custom-bg-gradiant-dots {
    background-color: rgba(33, 37, 41, 0.98);
}
[data-bs-theme="dark"] #mainNav.scrolled {
    background-color: #1a1d20;
}
[data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] .fc .fc-list-sticky .fc-list-day > *, [data-bs-theme="dark"] .fc .fc-list-event:hover td {
    background-color: #2b3035 !important;
}
[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}
/* Fix for Dark Mode Toggle layout shift */
#darkModeToggle {
    width: 15px;            /* Fixed width prevents wrapping */
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;  /* Remove Bootstrap nav-link padding */
    text-decoration: none;
}

#themeIcon {
    width: 20px;            /* Ensures the icon itself has a centered, fixed footprint */
    text-align: center;
    font-size: 1.2rem;
}

/* Ensure the container doesn't have extra margins that change on shift */
.custom-nav-order {
    flex-shrink: 0;         /* Prevents the button container from being squished */
}

/* --- Community Resources Blocks --- */

.burn-safe-block {
    border-top: 5px solid #ffc107 !important; /* Warning Yellow line */
    transition: transform 0.3s ease;
}

.weekly-jack-block {
    border-top: 5px solid #d32f2f !important; /* Department Red line */
    transition: transform 0.3s ease;
}

.know-risks-block {
    border-top: 5px solid #fd7e14 !important; /* Safety Orange line */
    transition: transform 0.3s ease;
}

/* Hover effect for all cards in this section */
.burn-safe-block:hover, 
.weekly-jack-block:hover, 
.know-risks-block:hover {
    transform: translateY(-10px);
}

.weekly-jack-block .icon-circle {
    background: #fff;
    padding: 5px;
    border-radius: 50%;
    display: inline-block;
}

/* Style the external link in the burn block */
.burn-safe-block a:hover {
    color: #d32f2f !important;
    border-bottom-color: #d32f2f !important;
}

/* Dark mode adjustments for cards */
[data-bs-theme="dark"] .card.shadow-sm {
    background-color: #2b3035;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.5) !important;
}
[data-bs-theme="dark"] .bg-light {
    background-color: #1a1d20 !important;
}

/* --- Back to Top Button --- */
.btn-back-to-top {
    position: fixed;
    bottom: 90px;
    right: 10px;
    display: none; /* Hidden by default */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 2000;
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}

/* Ensure smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}
/* Force dropdowns to be visible when toggled */
.navbar-nav .dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure the nav containers don't clip the dropdowns */
#mainNav, 
.navbar-collapse, 
#nav-container {
    overflow: visible !important;
}

/* Ensure dropdowns sit on top of the hero section */
.dropdown-menu {
    z-index: 2000 !important;
}

.home-hero {
    position: relative;
    overflow: hidden; /* Clips the tall image */
    min-height: 75vh;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Taller than the section to allow movement */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 1;
    will-change: transform; /* Performance optimization */
}

/* --- Alert Section Styling --- */

/* The pulsing ring behind the bullhorn */
.pulse-container {
    position: relative;
    display: inline-block;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-color: rgba(255, 193, 7, 0.4);
    border-radius: 50%;
    /* Total duration: 2s (pulse) + 5s (pause) = 7s */
    animation: alert-pulse 7s infinite; 
    z-index: 1;
}

@keyframes alert-pulse {
    /* The pulse happens in the first ~28% of the time (2s out of 7s) */
    0% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 1; 
    }
    28% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 0; 
    }
    /* From 28% to 100%, the ring stays invisible for the 5s pause */
    100% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 0; 
    }
}

/* The small flashing dot in the "Official Update" badge */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ffc107;
    border-radius: 50%;
    margin-right: 5px;
    animation: dot-blink 1s infinite;
}

@keyframes dot-blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Typography polish */
.font-monospace {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    line-height: 1.4;
}

/* --- Alert Close Button --- */
.btn-close-alert {
    position: absolute;
    top: -10px; /* Adjusted since it's now inside the container padding */
    right: 0px;
    background: #000;
    border: 2px solid #fff;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    z-index: 9999; /* Higher than everything else */
    transition: all 0.3s ease;
    pointer-events: auto !important; /* Forces the browser to recognize the click */
}

/* Updated Fade-out logic */
.alert-fade-out {
    opacity: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    border: none !important;
}

.btn-close-alert:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #ffc107; /* Warning yellow on hover */
    color: #ffc107;
    transform: rotate(90deg); /* Modern spinning effect */
}

/* --- Navigation Pattern & Polish --- */

/* Dark mode version of the pattern */
[data-bs-theme="dark"] #mainNav {
    /* Increased opacity from 0.03 to 0.12 for visibility in Dark Mode */
    background-color: #212529;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 0);
    border-bottom: 2px solid #444;
}

/* --- Colorful Nav Icons --- */
.navbar-nav .nav-link {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* --- Colorful Nav Icons --- */
.navbar-nav .nav-link {
    font-size: 0.9rem;
}

/* Specific Icon Colors for the Main Menu *
.nav-icon-home { color: #0d6efd; }      /* Blue *
.nav-icon-emerg { color: #d32f2f; }     /* Red *
.nav-icon-alert { color: #ffc107; }     /* Gold *
.nav-icon-events { color: #6610f2; }    /* Purple *
.nav-icon-resources { color: #198754; } /* Green *
.nav-icon-member { color: #0dcaf0; }    /* Cyan *
.nav-icon-news { color: #fd7e14; }      /* Orange *
.nav-icon-contact { color: #0d6efd; }   /* Blue /

.nav-icon-home { color: #000; }      /* Blue /
.nav-icon-emerg { color: #000; }     /* Red /
.nav-icon-alert { color: #000; }     /* Gold /
.nav-icon-events { color: #000; }    /* Purple /
.nav-icon-resources { color: #000; } /* Green /
.nav-icon-member { color: #000; }    /* Cyan /
.nav-icon-news { color: #000; }      /* Orange /
.nav-icon-contact { color: #000; }   /* Blue /

[data-bs-theme="dark"] .nav-icon-emerg,[data-bs-theme="dark"] .nav-icon-alert,[data-bs-theme="dark"] .nav-icon-events,[data-bs-theme="dark"] .nav-icon-resources,[data-bs-theme="dark"] .nav-icon-member,[data-bs-theme="dark"] .nav-icon-news,[data-bs-theme="dark"] .nav-icon-contact,[data-bs-theme="dark"] .nav-icon-home {
    color: #fff;
} */

/* --- Resources Dropdown Headers --- */
.dropdown-section-header {
    background-color: var(--primary-red);
    color: #ffffff;
    padding: 6px 15px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* Hover style for long wrapped links in the dropdown */
.dropdown-item.text-wrap {
    line-height: 1.3;
    white-space: normal;
}

/* Custom color utility for external links */
.text-orange { color: #fd7e14 !important; }

/* Desktop State adjustment for the larger dropdown */
@media (min-width: 1578px) {
    .navbar-expand-custom .dropdown-menu {
        padding-top: 0 !important;
        padding-bottom: 10px !important;
    }
}


/* --- Custom Draw Day Banner Styling --- */
.draw-day-banner {
    background-color: #ffc107; /* Matches the bright yellow background */
}

.draw-banner-image {
    max-height: 200px; /* Keeps image height reasonable */
    width: auto !important;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.draw-banner-image:hover {
    transform: scale(1.03);
}

.draw-banner-text-bg {
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

@media (max-width: 991px) {
    .draw-day-banner {
        background-color: #ffc107;
    }
    /* Stack columns vertically and center the image */
    .draw-banner-text-bg {
        border-radius: 0 0 15px 15px;
    }
    .draw-banner-image {
        max-height: 150px;
        border-radius: 10px 10px 0 0;
    }
    .draw-banner-text-bg {
        text-align: center !important;
    }
    .draw-banner-text-bg h2 {
        font-size: 2rem !important;
    }
    .draw-banner-text-bg h2 span {
        font-size: 3rem !important;
    }
}