/* General Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding-top: 80px; /* Default for desktop, adjusted for fixed header */
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0056b3; /* Primary color */
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    min-height: 60px; /* Ensure content adaptation */
    display: flex;
    flex-direction: column; /* Stacks elements on mobile, adjust for desktop */
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    min-height: 60px;
}

.logo {
    font-family: 'Impact', 'Arial Black', sans-serif; /* Creative, strong font */
    font-size: 2.2em; /* Larger for prominence */
    font-weight: bold;
    color: #ffd700; /* Auxiliary color, bright and contrasting */
    text-decoration: none;
    text-shadow: 3px 3px 5px rgba(0,0,0,0.4); /* Floating effect */
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #ffe033;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001; /* Above other header elements */
    padding: 0;
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffd700;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu .bar:nth-child(1) { top: 0; }
.hamburger-menu .bar:nth-child(2) { top: 11px; }
.hamburger-menu .bar:nth-child(3) { top: 22px; }

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

/* Main Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffd700;
    border-radius: 5px;
}

/* Header Buttons */
.header-buttons {
    display: flex; /* Always flex for styling */
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background-color: #004085; /* Slightly darker shade for button area */
    justify-content: flex-end; /* Align right on desktop */
    z-index: 999; /* Lower than active nav, but above general content */
}

.btn {
    padding: 10px 20px;
    border-radius: 25px; /* Rounded buttons */
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Soft shadow */
    text-align: center;
    white-space: nowrap;
}

.btn-register {
    background-color: #ffd700; /* Auxiliary color, very prominent */
    color: #0056b3; /* Primary color for text */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.btn-register:hover {
    background-color: #ffe566;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.btn-login {
    background-color: #28a745; /* Green for login, contrasting */
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.btn-login:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Footer Styles */
.site-footer {
    background-color: #222; /* Darker background */
    color: #ccc;
    padding: 40px 20px 20px;
    font-size: 0.9em;
    border-top: 5px solid #0056b3; /* Primary color accent */
}

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

.footer-section {
    flex: 1;
    min-width: 200px; /* Adjust for smaller screens */
    margin: 20px;
}

.footer-title {
    color: #ffd700; /* Auxiliary color for titles */
    font-size: 1.2em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 5px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #0056b3;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.8;
}

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

.footer-nav li a {
    color: #ccc;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-nav li a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* Responsive Design */
@media (min-width: 769px) {
    .site-header {
        flex-direction: row; /* Desktop: horizontal layout */
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    .header-top {
        padding: 0; /* No extra padding here as header has it */
        min-height: auto;
    }

    .hamburger-menu {
        display: none; /* Hide hamburger on desktop */
    }

    .logo {
        margin-right: 30px; /* Space between logo and nav */
    }

    .empty-space {
        display: none; /* Not needed on desktop */
    }

    .main-nav {
        flex-grow: 1; /* Allows nav to take available space */
        display: flex !important; /* Ensure nav is visible on desktop */
        justify-content: center; /* Center nav items */
    }

    .main-nav ul {
        flex-wrap: nowrap;
    }

    .header-buttons {
        padding: 0;
        background-color: transparent; /* No specific background for buttons on desktop */
        z-index: auto; /* Reset z-index */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 120px; /* More space for stacked header on mobile */
    }

    .site-header {
        min-height: 100px; /* Accommodate stacked elements */
    }

    .header-top {
        justify-content: space-between;
        padding: 10px 15px;
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        order: -1; /* Place it at the beginning */
    }

    .logo {
        flex: 1; /* Allows logo to take remaining space */
        text-align: center; /* Center the logo */
        margin: 0;
        font-size: 2em;
    }

    .empty-space {
        display: block; /* Create balancing space */
        width: 30px; /* Match hamburger width for centering */
    }

    .main-nav {
        display: none; /* Hide by default */
        position: absolute;
        top: 100%; /* Position below header-top and header-buttons */
        left: 0;
        width: 100%;
        background-color: #004085; /* Darker blue for dropdown */
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        z-index: 1001; /* Ensure it's above other content and buttons */
        overflow-y: auto; /* For long menus */
        max-height: calc(100vh - 100px); /* Max height to fit viewport */
    }

    .main-nav.active {
        display: block; /* Show when active */
    }

    .main-nav ul {
        flex-direction: column; /* Stack menu items vertically */
        padding: 10px 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: #fff;
    }

    .main-nav a:hover,
    .main-nav a.active {
        background-color: rgba(255,255,255,0.1);
        color: #ffd700;
        border-radius: 0;
    }

    .header-buttons {
        justify-content: center; /* Center buttons below logo */
        gap: 10px;
        background-color: #004085; /* Solid background for button area */
        z-index: 999; /* Below hamburger menu dropdown */
        padding: 10px 15px;
        width: 100%; /* Take full width */
    }

    .btn {
        flex: 1; /* Allow buttons to grow and fill space */
        max-width: 150px; /* Limit button width */
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .footer-section {
        flex-basis: 100%; /* Stack footer sections on mobile */
        margin: 15px 0;
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-nav li a {
        padding: 3px 0;
    }
}
