/* =========================================
   Global Reset & Typography
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #111111;
    color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

/* Global Link Styling */
a, a:visited {
    color: #ffffff;
}

a:hover {
    color: #8a643d; /* Adds a nice gold hover effect so users know it's a link */
}

/* =========================================
   Header & Horizontal Navigation
   ========================================= */
/* Mobile Menu Toggle Button (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none; 
    background: transparent;
    border: none;
    color: #8a643d; /* Gold accent color */
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 15px;
    text-align: center;
    width: 100%;
    border-bottom: 1px solid #222;
    letter-spacing: 2px;
}   
   
   
.header-banner {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 3px solid #8a643d;
}

.main-nav {
    background-color: #0a0a0a;
    border-top: 1px solid #222222;
    border-bottom: 1px solid #222222;
    position: relative;
    z-index: 1000;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-list > li {
    position: relative;
}

/* THE CORRECTED SINGLE BLOCK */
.nav-list a {
    display: block;
    padding: 1rem 0.8rem; 
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.8rem; 
    text-transform: uppercase;
    letter-spacing: 0.5px; 
    transition: all 0.2s ease-in-out;
    white-space: nowrap; 
}

.nav-list > li > a:hover {
    color: #ffffff;
    background-color: #1a1a1a;
    box-shadow: inset 0 -3px 0 #8a643d;
}

/* =========================================
   Dropdown Menu Styling
   ========================================= */
.nav-dropdown {
    display: none; /* Hides the menu by default */
    position: absolute; /* Makes it float over the content */
    top: 100%;
    left: 0;
    background-color: #1a1a1a;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    list-style: none; /* Removes the white bullet circles */
    padding: 0; /* Removes default list indent */
    margin: 0;
}

/* Show the dropdown when the parent list item is hovered */
.nav-list li:hover .nav-dropdown {
    display: block;
}

/* Style the individual sub-links */
.nav-dropdown li {
    width: 100%;
    margin: 0;
}

.nav-dropdown li a {
    padding: 0.75rem 1.25rem;
    text-transform: none; /* Easier to read than ALL CAPS for sub-menus */
    font-size: 0.95rem;
    border-bottom: 1px solid #2a2a2a;
    white-space: normal; /* Allows long sub-menu titles to wrap if needed */
}

.nav-dropdown li:last-child a {
    border-bottom: none;
}

/* Hover effect for sub-links */
.nav-dropdown li a:hover {
    background-color: #8a643d;
    color: #ffffff;
    padding-left: 1.5rem; /* Slight indent animation */
}

/* =========================================
   Main Grid Layout (Asymmetric)
   ========================================= */
.main-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 3rem;
}

.primary-content {
    display: flex;
    flex-direction: column;
}

/* =========================================
   Premium Action Cards
   ========================================= */
.portals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.portal-card {
    padding: 2.5rem 1.5rem;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
}

.portal-card h4 {
    font-size: 1.4rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.portal-card h6 {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.card-divider {
    width: 40px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0.75rem auto;
    transition: width 0.3s ease;
}

.portal-card:hover .card-divider { width: 80px; }

.councilblock { background: linear-gradient(135deg, #801414 0%, #520b0b 100%); }
.councilblock:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(128, 20, 20, 0.4); }

.foundationblock { background: linear-gradient(135deg, #8a643d 0%, #5c4125 100%); }
.foundationblock:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(138, 100, 61, 0.4); }

/* =========================================
   Dynamic Content Area
   ========================================= */
.dynamic-content-area {
    background-color: #1a1a1a;
    border-left: 4px solid #8a643d;
    padding: 2rem;
    border-radius: 0 8px 8px 0;
    color: #dddddd;
}

/* =========================================
   Legacy Sidebar
   ========================================= */
.legacy-sidebar {
    border-left: 1px solid #222222;
    padding-left: 1.5rem;
    text-align: center;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555555;
    margin-bottom: 1rem;
}

.wwii-link img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.wwii-link img:hover { opacity: 0.9; }

/* =========================================
   Footer
   ========================================= */
/* =========================================
   Footer
   ========================================= */
footer {
    position: relative; /* Anchors the flush-right icon */
    text-align: center;
    padding: 2rem;
    color: #666666;
    font-size: 0.85rem;
    border-top: 1px solid #222222;
    margin-top: 2rem;
}

/* Admin Login Icon */
.admin-login-link {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.2; /* Keeps it very subtle so it doesn't distract */
    transition: opacity 0.3s ease;
}

.admin-login-link:hover {
    opacity: 0.8; /* Lights up when hovered */
}

.admin-login-icon {
    width: 24px; /* Keeps the icon nicely sized */
    height: auto;
    display: block;
}

/* Mobile Fix for Footer */
@media (max-width: 600px) {
    .admin-login-link {
        position: static;
        display: inline-block;
        transform: none;
        margin-top: 1.5rem;
    }
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
    /* Main Layout Adjustments */
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .portals-grid {
        grid-template-columns: 1fr;
    }
    .legacy-sidebar {
        border-left: none;
        border-top: 1px solid #222222;
        padding-left: 0;
        padding-top: 2rem;
    }
    .wwii-link img {
        max-width: 120px;
    }

    /* Show the hamburger button on mobile */
    .mobile-menu-toggle {
        display: block; 
    }

    /* NEW: Mobile Navigation Stack (Hidden by default) */
    .nav-list {
        display: none; /* Hides the menu initially */
        flex-direction: column;
        width: 100%;
    }
    
    /* SHOW the menu when the JavaScript adds this class */
    .nav-list.show-menu {
        display: flex; 
    }

    .nav-list > li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #1a1a1a;
    }
    
    /* Make dropdowns flow naturally on mobile */
    .nav-dropdown {
        position: static; /* Removes the floating effect */
        width: 100%;
        box-shadow: none;
        background-color: #050505; /* Slightly darker to distinguish sub-menu */
    }
    
    /* Ensure tap-to-open works smoothly on mobile */
    .nav-list li:hover .nav-dropdown,
    .nav-list li:focus-within .nav-dropdown,
    .nav-list li:active .nav-dropdown {
        display: block;
    }
}
}