html, body { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background-color: #f4f7f6; }
a { text-decoration: none; color: inherit; }

/* Main Content Padding (Crucial for fixed header) */
main { padding-top: 80px; } /* Default for desktop, adjusted in mobile media query */

/* Header Styles - Desktop First & Fixed */
.site-header { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    min-height: 80px; 
    background-color: #1A2B4C; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.15); 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    padding: 0 25px; 
    transition: all 0.3s ease;
}

.logo {
    color: #FFD700; 
    font-size: 28px; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-right: 30px; 
    display: block; /* Ensure logo is visible */
    padding: 10px 0;
}

.main-nav {
    flex: 1; 
    display: flex; 
    justify-content: flex-start; 
    align-items: center; 
    height: 100%; /* Ensure it aligns with header height */
}

.main-nav ul {
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-direction: row;
}

.main-nav ul li a {
    color: #fff; 
    padding: 10px 18px; 
    display: block; 
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px;
    font-weight: 500;
}

.main-nav ul li a:hover, .main-nav ul li a.active {
    background-color: rgba(255,215,0,0.2); 
    color: #FFD700;
}

.desktop-nav-buttons {
    display: flex; 
    gap: 15px; 
    margin-left: auto; /* Push buttons to the right */
}

/* Button Base Styles */
.btn {
    display: inline-block; 
    padding: 12px 25px; 
    border-radius: 30px; 
    font-weight: bold; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.btn-register {
    background-color: #FFD700; 
    color: #1A2B4C; 
    box-shadow: 0 5px 15px rgba(255,215,0,0.4);
}

.btn-register:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(255,215,0,0.5);
    background-color: #ffe84d;
}

.btn-login {
    background-color: #007bff; /* A vibrant blue */
    color: #fff; 
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

.btn-login:hover {
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(0,123,255,0.5);
    background-color: #0069d9;
}

/* Mobile Specific Elements (Hidden on Desktop) */
.mobile-controls, .hamburger-menu, .mobile-button-area, .mobile-menu-overlay { 
    display: none; 
}

/* Footer Styles */
.site-footer {
    background-color: #1A2B4C; 
    color: #f0f0f0; 
    padding: 40px 25px; 
    font-size: 14px;
}

.footer-container {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    max-width: 1200px; 
    margin: 0 auto; 
    gap: 30px;
}

.footer-column {
    flex: 1; 
    min-width: 250px; 
    margin-bottom: 20px;
}

.footer-column h3 {
    color: #FFD700; 
    font-size: 18px; 
    margin-bottom: 15px; 
    border-bottom: 2px solid rgba(255,215,0,0.3); 
    padding-bottom: 8px;
}

.footer-column p {
    margin: 0 0 10px 0;
}

.footer-column a {
    color: #f0f0f0; 
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #FFD700;
}

.footer-nav ul {
    list-style: none; 
    margin: 0; 
    padding: 0;
}

.footer-nav ul li {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center; 
    margin-top: 40px; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0; 
    color: #bbb;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    main { padding-top: 140px; } /* Adjust for header + mobile button area */

    .site-header {
        flex-wrap: wrap; 
        padding: 10px 15px; 
        min-height: auto; 
        justify-content: space-between;
    }

    .logo {
        flex-grow: 1; 
        text-align: center; 
        margin: 0; 
        order: 2; 
        font-size: 24px;
        padding: 5px 0;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column; 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 80%; 
        max-width: 300px; 
        height: 100%; 
        background-color: #1A2B4C; 
        padding-top: 80px; /* Space for logo/hamburger area */
        transform: translateX(-100%); 
        transition: transform 0.3s ease; 
        z-index: 1000; 
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        overflow-y: auto; /* Enable scrolling for long menus */
    }

    .main-nav.active {
        display: flex; /* CRITICAL: Ensure display is set when active */
        transform: translateX(0); 
    }

    .main-nav ul {
        flex-direction: column; 
        width: 100%;
    }

    .main-nav ul li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

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

    .main-nav ul li a {
        padding: 15px 20px; 
        text-align: left;
    }

    .desktop-nav-buttons {
        display: none; /* Hide desktop buttons on mobile */
    }

    .mobile-controls {
        display: flex; 
        align-items: center; 
        justify-content: space-between; 
        width: 100%; 
        order: 3; 
        margin-top: 10px; 
        z-index: 1001; /* Above mobile button area */
    }

    .hamburger-menu {
        display: flex; 
        flex-direction: column; 
        justify-content: space-around; 
        width: 30px; 
        height: 25px; 
        background: transparent; 
        border: none; 
        cursor: pointer; 
        padding: 0; 
        order: 1; 
        z-index: 1001; /* Ensure hamburger is clickable */
        position: relative; /* For active state animation */
    }

    .hamburger-menu span {
        display: block; 
        width: 100%; 
        height: 3px; 
        background-color: #FFD700; 
        border-radius: 3px; 
        transition: all 0.3s ease;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .mobile-button-area {
        display: flex; 
        gap: 10px; 
        order: 3; 
        z-index: 1000; /* Below hamburger menu */
        flex-grow: 1; /* Allow buttons to take space */
        justify-content: flex-end;
    }
    .mobile-button-area .btn {
        padding: 8px 15px; /* Smaller buttons on mobile */
        font-size: 14px;
    }

    .mobile-menu-overlay {
        display: none; 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        background-color: rgba(0,0,0,0.6); 
        z-index: 999; 
        transition: opacity 0.3s ease; 
        opacity: 0;
    }
    .mobile-menu-overlay.active {
        display: block; 
        opacity: 1;
    }

    .footer-container {
        flex-direction: column; 
        align-items: center;
    }

    .footer-column {
        min-width: unset; 
        width: 100%; 
        text-align: center;
    }

    .footer-column h3 {
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
    }

    .footer-nav ul {
        text-align: center;
    }

    .footer-nav ul li a {
        padding: 5px 0;
    }
    
    body.no-scroll {
        overflow: hidden;
    }
}