body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    scroll-behavior: smooth;
}

/* Hide standard MyBB elements on the landing page */
#container > .menu, 
#footer,
.breadcrumb,
.upper,
.bottom-links {
    display: none;
}

#content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Main container for our landing page */
.landing-container {
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.unit-name {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* For mobile screens */
@media (max-width: 600px) {
    .unit-name {
        font-size: 14px;
    }
}

.menu-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.menu-icon {
    font-size: 24px;
    margin-right: 8px;
    cursor: pointer;
    color: #fff;
}

.menu-text {
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    padding-right: 10px;
}

/* Banner Section */
.banner-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#youtube-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Create CSS variables for consistent color scheme */
:root {
    --primary-blue: #0066a2;
    --primary-dark: #004e7c;
    --text-white: #ffffff;
    --text-light: #ecf0f1;
    --text-dark: #333333;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 50px 20px;
    background-color: #f5f5f5;
}

.nav-button {
    display: inline-block;
    padding: 15px 30px;
    margin: 10px;
    background: var(--primary-blue);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

/* Add higher specificity selector for nav button text */
.main-navigation a.nav-button {
    color: var(--text-white) !important;
}

.nav-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Side Menu */
.side-menu {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: var(--primary-blue);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.side-menu.active {
    right: 0;
}

.side-menu-header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-menu {
    font-size: 24px;
    color: var(--text-white);
    cursor: pointer;
    transition: color 0.3s;
}

.close-menu:hover {
    color: #bdc3c7;
}

.side-menu-content {
    padding: 20px 0;
}

.side-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu-items li {
    padding: 0;
    margin: 0;
}

.side-menu-items li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu-items li a:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* Content Sections */
.content-section {
    padding: 80px 20px;
    text-align: center;
    background-color: #fff;
}

.content-section.expanded {
    padding: 100px 20px;
}

.content-section.highlight {
    background-color: #f5f5f5;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.content-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.content-section p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Features section */
.features-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 40px auto 0;
}

.feature-box {
    flex: 0 0 300px;
    margin: 20px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.feature-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-box p {
    font-size: 14px;
    color: #666;
}

/* Improved Parallax Sections with Upward Shift */
.parallax-section {
    /* Maintain compact height */
    height: 300px;
    
    /* Changed background positioning to show more of the top portion */
    background-attachment: fixed;
    background-position: center 15%; /* Shifted up from center to 10% from top */
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    
    /* Add a base background color that matches your images */
    background-color: #222;
    
    /* Add extra scaling to ensure full coverage during scrolling */
    transform: translateZ(0);
    
    /* Ensure content stays inside the section */
    overflow: hidden;
    
    /* Add subtle transition for smoother scrolling effect */
    transition: background-position 0.1s ease-out;
}

/* Second parallax image positioned even higher */
.parallax-section.top-focus {
    background-position: center 10%; /* Show even more of the top portion */
}

.parallax-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
}

/* This adds a subtle visual effect to make the parallax section blend into the content */
.content-section + .parallax-section::after {
    content: "";
    position: absolute;
    top: -30px; /* Creates overlap with the section above */
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* For browsers that don't support fixed backgrounds */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        height: 250px;
        background-position: center 15%; /* Slightly different positioning for mobile */
    }
}

/* Custom Announcements and Upcoming Events Sections */
.portal_sections_container {
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.portal_section {
    flex: 1;
    min-width: 300px;
    margin: 0 10px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.portal_section_title {
    background: var(--primary-blue);
    color: var(--text-white);
    padding: 12px 15px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

.custom_announcements_container, .training_events_container {
    padding: 15px;
}

/* Reset all item styles first */
.custom_announcement_item, .training_event_item {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.custom_announcement_item:last-child, .training_event_item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Header styling for both sections */
.custom_announcement_title, .training_event_header {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 1px solid var(--primary-blue);
    padding-bottom: 5px;
    margin-bottom: 15px;
    height: 30px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom_announcement_title a, .training_event_header a {
    color: var(--primary-blue);
    text-decoration: none;
}

.custom_announcement_title a:hover, .training_event_header a:hover {
    text-decoration: underline;
}

/* Content area styling */
.custom_announcement_content, .training_event_content {
    display: flex;
    align-items: flex-start;
    min-height: 50px;
}

.forum_icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Fix for forum logo container */
.forum_logo {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Make sure all text is aligned consistently */
.training_event_meta, .custom_announcement_meta {
    flex: 1;
    font-size: 13px;
    color: #666;
    padding-top: 3px;
}

/* Style for dates in both sections */
.training_event_meta .date,
.announcements-list .date,
.custom_announcement_meta .date {
    font-size: 12px;
    color: #999;
    display: inline-block;
    margin-left: 5px;
}

.training_event_title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.training_event_title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.training_event_title a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.custom_announcement_avatar, .forum_logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    flex-shrink: 0;
}

.custom_announcement_avatar img, .forum_logo img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    display: block;
}

/* Add responsive adjustments to existing media query */
@media (max-width: 768px) {
    .portal_sections_container {
        flex-direction: column;
    }
    .portal_section {
        margin: 0 0 20px;
    }
    .parallax-section {
        background-attachment: scroll;
        height: 250px;
        background-position: center 15%; /* Slightly different positioning for mobile */
    }
}

/* Footer */
.site-footer {
    background-color: #1f2937;
    color: #fff;
    padding: 50px 0 0 0;
    margin-top: 30px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin: 0 15px 30px;
    position: relative;
}

/* Divider lines between sections */
.footer-section:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -15px;
    height: 100%;
    width: 1px;
    background-color: #374151;
}

/* Specific section adjustments for equal spacing */
.footer-section:first-child {
    padding-right: 30px;
}

.footer-section:nth-child(2) {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
}

.footer-section:last-child {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-section:last-child h3 {
    text-align: left;
    align-self: flex-start;
    margin-bottom: 15px;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
    text-align: left;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.footer-section p:last-child {
    margin-bottom: 0;
}

.footer-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section:first-child h3,
.footer-section:nth-child(2) h3 {
    text-align: center;
    width: 100%;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-blue);
}

.footer-section:first-child h3:after,
.footer-section:nth-child(2) h3:after {
    left: 50%;
    transform: translateX(-50%);
}

.footer-section:last-child h3:after {
    left: 0;
    transform: none;
}

.social-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.social-links a {
    color: #e2e8f0;
    text-decoration: none;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    justify-content: center;
    width: 150px;
}

.social-links a i {
    font-size: 20px;
    margin-right: 10px;
}

.social-links a:hover {
    color: var(--primary-blue);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 20px 0;
    text-align: center;
    margin-top: 20px;
}

.copyright {
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 40px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .footer-section:not(:last-child)::after {
        width: 80%;
        height: 1px;
        bottom: -20px;
        top: auto;
        right: 10%;
    }
    
    .footer-section:last-child {
        align-items: center;
    }
    
    .footer-section:last-child p {
        text-align: center;
        max-width: 80%;
    }
}

#op-time {
    font-weight: bold;
}

#local-time {
    font-style: italic;
    color: var(--primary-blue);
    font-size: 0.95em;
}