/* Basic Reset & Body Styling */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 80px; /* To account for fixed header */
    background-color: #f4f4f4;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff; /* Solid white background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Suspended effect */
    z-index: 1000;
    min-height: 60px; /* Ensure content fits */
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
}

.header-top {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between; /* Default for mobile */
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #007bff; /* Primary color */
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
}

.hamburger-menu {
    display: flex; /* Visible on mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Ensure hamburger is above other elements */
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.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); }

.header-placeholder {
    display: none; /* Hidden on desktop */
}

.main-nav {
    display: none; /* Hidden by default on mobile */
    width: 100%;
    text-align: center;
    background-color: #fff; /* Solid background */
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
    position: absolute; /* Position relative to header-top for mobile dropdown */
    top: 100%; /* Position below header-top */
    left: 0;
    z-index: 999; /* Below hamburger, above buttons */
    padding-bottom: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.main-nav.active {
    max-height: 500px; /* Sufficient height to show all items */
}

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

.main-nav li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.main-nav a {
    font-size: 16px;
    color: #333;
    padding: 8px 15px;
    display: block;
    transition: color 0.3s, background-color 0.3s;
}

.main-nav a:hover {
    color: #007bff;
    background-color: #f0f0f0;
}

.main-nav a.active-link {
    color: #007bff;
    font-weight: bold;
}

.header-buttons-mobile {
    display: flex; /* Always visible on mobile */
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
    width: 100%;
    z-index: 1000; /* Buttons visible, but below hamburger menu */
    background-color: #ffffff; /* Solid background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* subtle shadow */
}

.header-actions-desktop {
    display: none; /* Hidden on mobile */
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px; /* Rounded corners */
    font-weight: bold;
    text-align: center;
    text-decoration: none; /* No underline */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Shadow effect */
    color: #ffffff; /* White text */
    white-space: nowrap; /* Prevent text wrapping */
}

.btn-register {
    background: linear-gradient(45deg, #007bff, #0056b3); /* Gradient primary */
    border: none;
}

.btn-register:hover {
    background: linear-gradient(45deg, #0056b3, #007bff);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.btn-login {
    background: linear-gradient(45deg, #ffc107, #e0a800); /* Gradient secondary */
    border: none;
}

.btn-login:hover {
    background: linear-gradient(45deg, #e0a800, #ffc107);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Desktop Layout */
@media (min-width: 769px) {
    .site-header {
        flex-direction: row; /* Row for desktop */
        justify-content: space-between;
        padding: 10px 40px;
        min-height: 70px;
    }

    .header-top {
        width: auto;
    }

    .hamburger-menu,
    .header-buttons-mobile {
        display: none; /* Hide hamburger and mobile buttons on desktop */
    }

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

    .main-nav {
        display: block; /* Show nav on desktop */
        position: static;
        top: auto;
        left: auto;
        box-shadow: none;
        background-color: transparent;
        max-height: none;
        overflow: visible;
        flex-grow: 1; /* Allow nav to take available space */
    }

    .main-nav ul {
        flex-direction: row;
        justify-content: flex-start;
        gap: 25px; /* Space between menu items */
    }

    .main-nav li {
        border-bottom: none;
        padding: 0;
    }

    .main-nav a {
        padding: 5px 0;
        color: #333;
        font-weight: 500;
        position: relative;
    }
    
    .main-nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background-color: #007bff;
        left: 0;
        bottom: -5px;
        transition: width 0.3s ease-in-out;
    }

    .main-nav a:hover::after,
    .main-nav a.active-link::after {
        width: 100%;
    }

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

/* Mobile Layout (Max 768px) */
@media (max-width: 768px) {
    .site-header {
        padding: 10px 15px;
    }

    .header-top {
        justify-content: space-between;
    }

    .hamburger-menu {
        margin-right: auto; /* Push hamburger to far left */
    }

    .logo {
        flex: 1; /* Allow logo to take remaining space */
        text-align: center; /* Center logo */
        margin: 0; /* Remove any default margin */
    }

    .header-placeholder {
        display: block; /* Create empty space on right */
        width: 30px; /* Match hamburger width for centering */
        height: 25px;
    }
}

/* Site Footer */
.site-footer {
    background-color: #333;
    color: #f4f4f4;
    padding: 40px 20px 20px;
    font-size: 14px;
    margin-top: 40px;
}

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

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

.footer-col h3 {
    color: #007bff; /* Primary color for headings */
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ffc107; /* Secondary color for accent */
    padding-bottom: 5px;
    display: inline-block;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffc107; /* Secondary color for footer logo */
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.footer-col p {
    margin-bottom: 10px;
    color: #bbb;
}

.footer-col a {
    color: #f4f4f4;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #007bff;
}

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

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

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

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
        max-width: 300px; /* Constrain width on small screens */
    }

    .footer-col h3 {
        margin: 15px auto;
    }

    .footer-logo {
        margin: 0 auto 15px;
    }
}