/* --- Base & Reset --- */
* {
    box-sizing: border-box;
}
body {
    /* Path to your images */
    background-image: url('/images/graffiti-bg-left.PNG'), url('/images/graffiti-bg-right.PNG');

    /* Position the first image left and the second image right */
    background-position: left center, right center;

    /* Prevent images from repeating */
    background-repeat: no-repeat, no-repeat;

    /* Fix the images so they don't move during scroll */
    background-attachment: fixed, fixed;

    /* Optional: Ensure they don't overlap your center content on small screens */
    background-size: contain, contain;
    
    padding: 0;
    background-color: #000000;
    font-family: system-ui, -apple-system, sans-serif;
    display: grid;
    margin-top: 20px;
    justify-content: center;
}

a {
    color:#6890b8;
    font-weight: 800;
    text-decoration: underline;
}

a:hover {
    color:#3d95ee;
    font-weight: 400;
    text-decoration: wavy;
}

a:visited {
    color:#eba64d;
    font-weight: 400;
    text-decoration: underline;
}

.legal-link a {
    text-decoration: none;
}

/* RepeaterSignal Header Box */
.rs-header-box {
    max-width: 1024px;
    display: flex;

}
.rs-header {
    max-width: 1024px;
    width: 100%;
    height: 100%;
}

/* --- Overall Layout Container --- */
.site-wrapper {
    width: 100%;
    max-width: 1024px;
    min-height: 100vh;
    background-color: #333;
    display: grid;
    /* 250px sidebar on left, remaining space on right */
    grid-template-columns: 250px 1fr;
    grid-template-rows: 1fr auto;
    position: relative;
    box-shadow: 0 0 15px rgba(196, 172, 95, 0.377);
}

/* --- Overlay header logo ---*/

.header-logo {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    display: block;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -165px;
    left: -110px;
    overflow: visible;
    z-index: 2;
}

/* --- Logo Rollover Images --- */
.header-logo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease-in-out;
}

.header-logo .logo-hover {
    opacity: 0; /* Hidden by default */
}

.header-logo:hover .logo-default {
    opacity: 0; /* Fade out default image on hover */
}

.header-logo:hover .logo-hover {
    opacity: 1; /* Fade in hover image on hover */
}


/* --- Hidden Checkbox for Mobile Menu (No JS needed) --- */
#mobile-menu-toggle {
    display: none;
}

/* --- Mobile 30px Bar (Hidden on Desktop) --- */
.mobile-nav-bar {
    display: none;
}

/* --- Sidebar --- */
.sidebar {
    grid-column: 1 / 2;
    grid-row: 1 / 2; /* Spans from top to above footer */
    background-color: #1e2c3b;
    color: #f8f9fa;
    width: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-logo-close {
    display: none; /* Logo hidden on desktop per requirements */
}

.sidebar-header {
    padding: 40px 20px 20px 20px;
    border-bottom: 1px solid #6890b8;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    color: #adb5bd;
    font-family: "Silkscreen", sans-serif;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.sidebar-nav a {
    display: block;
    padding: 10px 20px;
    color: #f8f9fa;
    text-decoration: none;
    border-bottom: 1px solid #6890b8;
    transition: background 0.2s;
}

.sidebar-nav a:hover {
    background-color: #4a6c91;
}

/* --- Main Content Area --- */
.main-wrapper {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevents stretching past 1024px */
    justify-content: center;
}

/* --- Header --- */
.main-header {
    display: flex;
    margin: 15px;
    max-height: 350px; /* Max height 350px */
    gap: 15px;
}


.header-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 350px; /* Constrain to logo height */
}

.top-nav {
    display: flex;
    gap: 10px;
}

.top-nav a {
    flex: 1;
}

.top-nav img {
    width: 100%;
    height: 80px; /* Fixed height for visual consistency */
    object-fit: cover;
    display: block;
    background-color: #ced4da;
}

.quick-info {
    flex-grow: 1;
    background-color: none;
    margin-top: 15px;
    padding: 10px;
    overflow-y: auto;
    line-height: 1.6;
    color: #f8f9fa;
    font-size: 1.0rem;
}

/* --- Article Area --- */
.content-area {
    flex-grow: 1;
    padding: 20px 0;
}

.article-container {
    margin: 0 20px 0 40px;
    max-height: 600px; /* Fixed height to enable scrolling demonstration */
    overflow-y: auto;
    background: #000000;
    padding: 20px;
    border: 1px solid #a5a5a5;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(69, 117, 161, 0.445);
    line-height: 1.6;
    color: #dddddd;
    font-size: 1.0rem;
}

.article-container h1 {
    margin-top: 0;
}

/* --- Footer --- */
.site-footer {
    grid-column: 1 / -1; /* Spans the full width of the 1024px container */
    grid-row: 2 / 3;
    margin: 20px;
    padding: 20px;
    background-color: #343a40;
    color: #f8f9fa;
    text-align: center;
    border-radius: 4px;
}

/* --- Responsive Mobile Layout (Below 768px) --- */
@media (max-width: 767px) {
    body {
        background-image: none;
    }
    .rs-header-box {
        max-width: 767px;
        width: 100%;
        display: flex;
        overflow: hidden;
    }
    .site-wrapper {
        /* Change layout to 30px bar + remaining width */
        grid-template-columns: 50px 1fr;
    }

    /* Display the 30px menu bar */
    .mobile-nav-bar {
        display: flex;
        grid-column: 1 / 2;
        background-color: #343a40;
        justify-content: center;
        margin-top: 35px;
        padding-top: 15px;
        position: relative;
        z-index: 0;
    }

    .menu-icon {
        color: white;
        font-size: 24px;
        cursor: pointer;
        user-select: none;
    }

    /* Slide-out Sidebar styling */
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px; /* Hidden off-screen by default */
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    }

    /* Trigger slide out when checkbox is checked */
    #mobile-menu-toggle:checked ~ .site-wrapper .sidebar {
        left: 0;
    }

    /* Show close logo on mobile */
    .sidebar-logo-close {
        display: block;
        padding: 15px;
        background-color: #1a1e21;
        text-align: center;
        cursor: pointer;
        border-bottom: 1px solid #495057;
    }

    .sidebar-logo-close img {
        max-width: 80%;
        height: auto;
        background: #ccc;
    }

    .main-wrapper {
        grid-column: 2 / 3;
        width: 100%;
    }

    /* Stack header elements */
    .main-header {
        flex-direction: column;
        max-height: none; /* Remove height constraint on mobile */
    }

    .header-logo {
      width: 180px;
      height: 180px;
      flex-shrink: 0;
      display: block;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: -145px;
      left: -120px;
      overflow: visible;
      z-index: 2;
    }

    .header-right {
        height: auto;
    }

    /* Adjust article margins so it doesn't break small screens */
    .article-container {
        margin: 0 15px; /* Reduced from 50px for mobile readability */
        max-width: none;
    }
}

/* --- Modal Styles --- */
#modal-overlay {
    display: none; /* Initial state before logic takes over */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

#modal-content {
    background: #1a1a1a;
    color: #fff;
    padding: 30px;
    border: 2px solid #444;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    font-family: sans-serif;
    line-height: 1.6;
}

#modal-content h2 {
    font-family: "Silkscreen", sans-serif;
    margin-top: 0;
    color: #ffaa00;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #fff;
}

body.modal-open {
    overflow: hidden;
}

