.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    display: flex;
}

@import 'https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap';

header {
    font-family: open sans;
}

@media (min-width: 1201px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .container {
        max-width: 100%;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
    }
}

.mainPageHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.logo-img-size-index {
    max-width: 100%;
    height: 45px;
}

.mainPageHeader .switchButton {
    padding: 1em 0em 1em 1em;
    margin: 0;
    text-decoration: underline;
    min-height: 22px;
}

.mainPageHeader .switchButton:hover {
    cursor: pointer;
}

@media (max-width: 768px) {
    .mainPageHeader {
        display: inline-block;
        text-align: right;
    }

    .callendar-select-for-mobile {
        color: white;
        background-color: #0088cc;
        display: inline-flex;
        border-color: #0088cc;
        box-sizing: border-box;
        margin: 0 1.25rem 0 0;
        padding: .5rem 1.25rem;
        font-weight: bold;
        border-top-left-radius: .25rem;
        border-top-right-radius: .25rem;
    }

    option:checked {
        color: #0088cc;
        background-color: black;
    }
}

/* --- START: Added for Header Nav, Footer, and Static Pages --- */

/* Desktop Header Navigation */
.header-nav-desktop {
    margin-left: 20px;
    flex-grow: 1;
    /* FIX: This will center your header links */
    text-align: center;
}

.header-nav-desktop a {
    color: #004467;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    font-family: 'Open Sans', sans-serif;
}

.header-nav-desktop a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #f1f1f1;
    /* Matching the light gray from the site */
    border-top: 2px solid #004467;
    /* Matching the blue theme color */
    padding: 20px 0;
    margin-top: 20px;
    font-family: 'Open Sans', sans-serif;
    color: #555;
    width: 100%;
}

footer .container {
    /* FIX: This overrides the 'display: flex' and centers everything */
    display: block;
    text-align: center;
    max-width: 1140px;
    margin: 0 auto;
    /* Keep the container itself centered */
}

footer a {
    color: #004467;
    text-decoration: none;
    margin: 5px 15px;
    font-weight: bold;
    /* FIX: Make links display inline-block to be centered */
    display: inline-block;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin: 10px 0 0 0;
    font-size: 0.9em;
}

/* Static Page Content (About, Contact, Policy) */
.static-page-content {
    /* This style applies to the content on your new pages */
    width: 100%;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: #333;
    margin-left: 10px;
    /* Add some space next to the nav */
}

.static-page-content h2 {
    color: #004467;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.static-page-content h3 {
    color: #111;
    margin-top: 25px;
}

/* --- START: Mobile Menu Fixes --- */
/* Add styling for the new mobile links */
#page-nav ul li.mobile-nav-link {
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    list-style-type: none;
}

#page-nav ul li.mobile-nav-link a {
    display: block;
    padding: 12px 20px;
    text-align: left;
    color: #004467;
    font-weight: bold;
    text-decoration: none;
}

#page-nav ul li.mobile-nav-link a:hover {
    background-color: #ddd;
}

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
    .header-nav-desktop {
        display: none;
    }
}

/* --- END: Mobile Menu Fixes --- */


/* --- START: DARK MODE STYLES --- */
/* Apply dark mode styles when the class is present on the html or body element */
.dark-mode body {
    background-color: #121212;
    color: #e0e0e0;
}

/* Header and Footer Backgrounds */
.dark-mode header,
.dark-mode footer {
    background-color: #1a1a1a !important;
    /* Force override */
    border-top-color: #333;
    color: #e0e0e0;
}

/* Header Links */
.dark-mode .header-nav-desktop a {
    color: #a0cfff !important;
}

/* Footer Links */
.dark-mode footer a {
    color: #a0cfff !important;
}

/* Footer Text */
.dark-mode footer p {
    color: #aaa;
}

/* Switch Button Text */
.dark-mode .mainPageHeader .switchButton {
    color: #e0e0e0;
}

/* Static Content (About, Contact, Policy) */
.dark-mode .static-page-content {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e0e0e0;
}

.dark-mode .static-page-content h2,
.dark-mode .static-page-content h3 {
    color: #e0e0e0;
    border-bottom-color: #333;
}

/* Logo Inversion for Dark Mode */
.dark-mode .logo-img-size,
.dark-mode .logo-img-size-index {
    filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

/* Toggle Button Style */
.dark-mode-button {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    line-height: 28px;
    padding: 0;
    margin: 0 15px;
    transition: all 0.3s ease;
}

.dark-mode .dark-mode-button {
    background: #444;
    color: #fff;
    border-color: #666;
}

/* Mobile Nav Links */
.dark-mode #page-nav ul li.mobile-nav-link {
    background-color: #2a2a2a;
    border-bottom-color: #333;
}

.dark-mode #page-nav ul li.mobile-nav-link a {
    color: #8ab4f8;
}

.dark-mode #page-nav ul li.mobile-nav-link a:hover {
    background-color: #444;
}

/* Ensure global links in dark mode are visible if not caught by above */
.dark-mode a {
    color: #8ab4f8;
}

/* --- END: DARK MODE STYLES --- */