/* Navbar styles */
.site-navbar {
    background-color: var(--primary-color);
    position: fixed;     /* lock it to the viewport */
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 9999;       /* highest layer */
}

.navbar-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    max-width: 1200px;
}

.site-logo {
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s, font-weight 0.3s;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--background-color);
    font-weight: bold;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .site-navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        width: 100%;
        overflow: visible;
    }

    .navbar-container {
        padding: 0 0.75rem;
    }

    .site-logo {
        font-size: 1.4rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        display: none;
        padding: 0;
        margin: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 9998;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 1rem;
        display: block;
        font-size: 1.1rem;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--background-color);
        font-weight: bold;
    }
}

/* Ensure body has proper padding for fixed navbar */
body {
    margin: 0;
    padding-top: 60px; /* same as navbar height */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-height: 100vh;
    position: relative;
}

/* Fix for mobile viewport */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        min-height: 100vh;
        overflow-x: hidden;
        position: relative;
        overflow-y: auto !important; /* Ensure vertical scrolling is allowed */
    }
    
    /* Ensure content doesn't get hidden behind navbar */
    .container, .container-custom, .container-fluid {
        padding-top: 10px;
    }
    
    /* Prevent body from being scrollable when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Ensure the page content is scrollable */
    html, body {
        height: 100%;
        overflow-x: hidden;
    }
    
    /* Force scrolling to be enabled on the main content */
    .container, .container-custom, .container-fluid, main, .main-content {
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }
}

/* Additional mobile fixes */
@media (max-width: 480px) {
    .navbar-container {
        padding: 0 0.5rem;
    }
    
    .site-logo {
        font-size: 1.2rem;
    }
    
    .nav-menu a {
        padding: 1.2rem 1rem;
        font-size: 1.2rem;
    }
}

/* Global mobile scrolling fix - highest priority */
@media (max-width: 768px) {
    /* Ensure the entire page is scrollable */
    html {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: 100% !important;
    }
    
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        padding-top: 60px !important;
    }
    
    /* Override any conflicting overflow settings */
    .banner-container,
    .bottom-banner-container,
    .top-banner-container {
        overflow: visible !important;
    }
    
    /* Ensure main content areas are scrollable */
    .container,
    .container-custom,
    .container-fluid,
    main,
    .main-content,
    .content-area {
        overflow: visible !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    
    /* Only prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Final override for any remaining conflicts */
@media (max-width: 768px) {
    /* Force scrolling to be enabled */
    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* Override any banner overflow settings */
    .banner-container,
    .bottom-banner-container,
    .top-banner-container,
    .marquee-container {
        overflow: visible !important;
    }
    
    /* Ensure all content containers allow scrolling */
    .container,
    .container-custom,
    .container-fluid,
    main,
    .main-content,
    .content-area,
    .row,
    .col-lg-10,
    .col-lg-1 {
        overflow: visible !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1005;
    justify-content: center;
    align-items: center;
}

.message-box {
    background-color: #222;
    color: white;
    border-radius: 5px;
    padding: 25px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    line-height: 1.5;
}

.message-box a {
    color: yellow;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
}

.message-box a:hover {
    text-decoration: underline;
}

.close-btn {
    margin-top: 20px;
    padding: 5px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.close-btn:hover {
    background-color: var(--primary-color);
}

.marquee-container {
    position: relative;
    width: 100%;
    background-color: var(--background-color);
    z-index: 9999;
    border-bottom: 1px solid var(--primary-color);
    border-top: 1px solid var(--primary-color);
    padding: 6px 0;
    margin-bottom: 10px;
    color: white;
}

marquee {
    display: block;
}

.message-text {
    margin: 15px 0;
} 
