/* --- 1. CSS Variables --- */
:root {
    /* ... (variables are unchanged) ... */
    --color-primary: #1a472a;
    --color-secondary: #f6bc3f;
    --color-secondary-dark: #B5882A;
    --color-secondary-dark-fade: #9374328e;
    --color-green: #0c712f;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-text-dark: #333333;
    --color-text-light: rgba(255, 255, 255, 0.7);
    --color-text-white: #dcd086;
    --rgb-primary: 26, 71, 42;
    --rgb-secondary-dark: 181, 136, 42;
    --size-sidebar-width: 400px;
    --size-logo-width: 200px;
    --size-dropdown-width: 240px;
    --size-heading-divider: 50px;
    --padding-section-y: 4rem;
    --padding-sidebar-desktop: 2.5rem 3.5rem 2.5rem 2rem;
    --padding-sidebar-mobile: 1.5rem 1rem;
    --padding-main-menu: 1.25rem 0;
}


/* --- 2. Base & Layout --- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    /* Allow scrolling */
}

.container {
    /* width: 90%;
    max-width: 1200px; */
}

/* --- ADDED: 2.5 Countdown Banner --- */
.countdown-banner {
    background-color: var(--color-secondary-dark);
    color: var(--color-primary);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.countdown-text {
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.countdown-clock {
    display: flex;
    gap: 1rem;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    min-width: 50px;
    /* Ensures all boxes are same width */
    text-align: center;
}

.countdown-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.25rem;
}


/* --- 2.6 Floating Live Button --- */
.floating-live-link {
    position: fixed;
    top: 30px;
    /* Position below countdown banner */
    right: 20px;
    z-index: 999;
    /* On top of most content */
    width: 120px;
    border: 3px solid red;
    border-radius: 8px;
    overflow: hidden;
    /* Clips the video */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: #000;
    /* Fallback for video */
    text-decoration: none;
    transition: all 0.3s ease;
}

.hide {
    display: none;
}

.floating-live-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.floating-live-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Blinking "LIVE" text overlay */
.floating-live-link::after {
    content: 'LIVE';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: red;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    animation: blink-live 1.5s infinite;
    pointer-events: none;
    /* Make text non-clickable */
}

@keyframes blink-live {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}


/* --- 3. Sidebar Styling (Site-wide) --- */

.sidebar {
    width: var(--size-sidebar-width);
    height: 100%;
    color: var(--color-white);
    padding: var(--padding-sidebar-desktop);
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%);
    z-index: -1;
}

.sidebar-logo img {
    width: var(--size-logo-width);
    display: block;
    margin: 0 auto 3rem auto;
}

.sidebar-nav {
    list-style: none;
    width: 100%;
}

/* This rule now hides the nav on subpages for ALL screen sizes */
.sidebar.is-subpage .sidebar-nav {
    display: none;
}

.sidebar-nav>li {
    border-bottom: 2px solid var(--color-secondary-dark-fade);
}

.sidebar-nav>li:first-child {
    border-top: 2px solid var(--color-secondary-dark-fade);
}

.sidebar-nav a {
    display: block;
    padding: var(--padding-main-menu);
    text-decoration: none;
    color: var(--color-text-white);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    padding-left: 1rem;
    border-top: 5px solid var(--color-secondary-dark);
}

.sidebar-nav a:hover .sidebar-caret {
    transform: rotate(90deg);
}

/* --- ADDED: Style for the sidebar caret --- */
.sidebar-caret {
    transition: transform 0.3s ease;
    /* Hide on desktop by default */
}


/* --- 4. Fly-out Dropdown Styles (Site-wide) --- */

.sidebar-nav li.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 80%;
    width: var(--size-dropdown-width);
    background-color: var(--color-white);
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    z-index: 20;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--color-secondary-dark);
    border-bottom: 5px solid var(--color-secondary-dark);
    padding: 0.5rem 0;
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 2px solid var(--color-secondary-dark);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    font-weight: bold;
    border: inherit;
    opacity: 1;
}

/* Show dropdown on hover ONLY on desktop */
@media (min-width: 769px) {
    .sidebar {
        z-index: 10;
    }

    .sidebar-nav li.has-dropdown:hover>.dropdown-menu {
        display: block;
    }
}


/* --- 5. Footer (Site-wide) --- */

.site-footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    text-align: center;
    position: relative;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 0.3rem;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--color-white);
}


/* --- 6. Responsive Styles (Site-wide) --- */

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: var(--padding-sidebar-mobile);
        position: relative;
        background-color: var(--color-primary);
    }

    .sidebar::before {
        display: none;
    }

    .sidebar-logo img {
        width: 150px;
        margin: 0 auto 1.5rem auto;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /*
      This rule is now gone.
      The desktop rule '.sidebar.is-subpage .sidebar-nav { display: none; }'
      will now correctly hide the menu on mobile as well.
    */

    .sidebar-nav a {
        padding: 0.75rem 0.8rem;
        font-size: 0.8rem;
        text-align: center;
    }

    .sidebar-nav li {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .sidebar-nav li.has-dropdown {
        position: static;
    }

    .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        clip-path: none;
        border-top: none;
        border-bottom: none;
        padding: 0.5rem 0 0.5rem 0;
    }

    .sidebar-nav li.has-dropdown.menu-open>.dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 0.75rem 0;
        font-size: 0.8rem;
        color: var(--color-white);
        text-align: center;
        border-bottom: none;
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--color-white);
    }
}