/* General Reset & Base Styles */
:root {
    --primary-color: #003366;
    --secondary-color: #FFCC00;
    --text-color: #333;
    --light-text-color: #f0f0f0;
    --button-bg-register: linear-gradient(to right, #FF5733, #FFC300); /* Orange to Gold */
    --button-bg-login: linear-gradient(to right, #33FF57, #00C3FF); /* Green to Light Blue */
    --button-bg-download: linear-gradient(to right, #8A2BE2, #FF1493); /* Blue Violet to Deep Pink */
    --button-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --button-hover-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f7f6;
}

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    min-height: 60px; /* Base min-height for desktop */
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    color: var(--light-text-color);
}

.site-header .logo {
    font-family: 'Arial Black', Gadget, sans-serif;
    font-size: 2.2em;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Desktop Layout */
.header-top-mobile, .header-buttons-mobile {
    display: none; /* Hidden by default on desktop */
}

/* Hide mobile nav by default on desktop */
.mobile-main-nav {
    display: none;
}

.header-desktop-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    min-height: 60px; /* Ensure content adaptation */
}

.header-desktop-content .logo {
    margin-right: 20px;
    text-align: left;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--light-text-color);
    font-weight: 600;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
}

.header-desktop-actions {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
    min-width: 120px;
    white-space: nowrap;
}

.btn-register {
    background: var(--button-bg-register);
}
.btn-login {
    background: var(--button-bg-login);
}
.btn-download {
    background: var(--button-bg-download);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--button-hover-shadow);
}

/* Hamburger Menu Icon */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1002; /* Above other header elements */
}

.hamburger-icon {
    position: relative;
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    left: 0;
}

.hamburger-icon::before {
    top: -10px;
}

.hamburger-icon::after {
    bottom: -10px;
}

.hamburger-menu.open .hamburger-icon {
    background-color: transparent;
}

.hamburger-menu.open .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger-menu.open .hamburger-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 40px 20px 20px;
    font-size: 0.95em;
    border-top: 5px solid var(--secondary-color);
}

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

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section .logo {
    font-size: 2em;
    margin-bottom: 15px;
    text-align: left;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2em;
    text-transform: uppercase;
}

.footer-section ul {
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.footer-section ul a:hover {
    color: var(--secondary-color);
}

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

.footer-contact a, .footer-phone a {
    color: var(--light-text-color);
    text-decoration: underline;
}

.footer-contact a:hover, .footer-phone a:hover {
    color: var(--secondary-color);
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    .site-header {
        min-height: auto;
    }

    .header-desktop-content {
        display: none; /* Hide desktop header on mobile */
    }
    /* Hide the desktop nav on mobile */
    .main-nav {
        display: none;
    }

    .header-top-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background-color: var(--primary-color);
        min-height: 50px;
        position: relative;
        z-index: 1001;
    }

    .header-top-mobile .logo {
        flex-grow: 1;
        text-align: center;
        margin: 0;
        font-size: 1.8em;
    }

    .mobile-top-spacer {
        width: 30px; /* Match hamburger width for centering effect */
    }

    .header-buttons-mobile {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 10px 15px;
        background-color: var(--primary-color);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        min-height: 60px;
        z-index: 1000; /* Lower than hamburger, but above page content */
    }

    .header-buttons-mobile .btn {
        padding: 8px 15px;
        font-size: 0.9em;
        min-width: unset;
    }

    .hamburger-menu {
        display: flex;
    }

    /* Mobile Nav Styles (applied to .mobile-main-nav) */
    .mobile-main-nav {
        display: block; /* Override default display: none */
        position: fixed;
        top: 0; /* Will be adjusted by JS based on header height */
        left: -100%; /* Off-screen by default */
        width: 70%;
        height: 100vh;
        background-color: var(--primary-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        transition: left 0.3s ease-in-out;
        z-index: 1001; /* Above header-buttons-mobile, below hamburger toggle */
        overflow-y: auto;
    }

    .mobile-main-nav.open {
        left: 0;
    }

    .mobile-main-nav ul {
        flex-direction: column;
        gap: 0;
    }

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

    .mobile-main-nav a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1em;
        color: var(--light-text-color);
    }

    .mobile-main-nav a::after {
        display: none; /* Remove underline effect for mobile menu */
    }

    .mobile-main-nav a:hover, .mobile-main-nav a.active {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--secondary-color);
    }

    /* Footer Mobile */
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
    }

    .footer-section .logo {
        text-align: center;
    }

    .footer-section h3 {
        margin-top: 20px;
    }
}
