:root {
    --primary-color: #0A2239;
    --secondary-color: #FFD700;
    --text-light: #f4f4f4;
    --text-dark: #333;
    --button-hover-dark: #e0b800;
    --button-hover-light: #ffd92b;
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 60px; /* Default for desktop header height */
}

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

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-height: 60px;
    display: flex; /* Desktop: horizontal layout */
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-main-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* Vertical padding for the row */
}

.logo {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block; /* Ensure logo is visible */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-right: 30px; /* Space between logo and nav on desktop */
}

.main-nav {
    display: flex; /* Desktop: visible and horizontal */
    flex: 1; /* Take available space */
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease; /* For mobile slide animation */
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-light);
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 100%;
}

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

.mobile-nav-buttons,
.hamburger-btn,
.mobile-menu-overlay,
.mobile-spacer {
    display: none; /* Hidden by default for desktop */
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Remove underline for buttons */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--button-hover-dark);
    border-color: var(--button-hover-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--button-hover-light);
    border-color: var(--button-hover-light);
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: #007bff; /* A distinct color for 'Tải App' */
    color: var(--text-light);
    border: 2px solid #007bff;
}

.btn-tertiary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 40px 20px;
    text-align: center;
}

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

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

.footer-col h3 {
    color: var(--secondary-color);
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    display: inline-block;
}

.footer-col p,
.footer-col ul {
    font-size: 15px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    display: block;
    padding: 5px 0;
    color: var(--text-light);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    font-size: 14px;
}

/* Hamburger Menu Icon */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 1002; /* Higher than menu overlay */
}

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

.hamburger-btn.active .hamburger-icon:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-btn.active .hamburger-icon:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-icon:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    body {
        padding-top: 110px; /* Adjust for mobile header (60px top row + 50px buttons row) */
    }

    .site-header {
        flex-direction: column; /* Stack header elements vertically */
        align-items: center;
        padding: 0 15px;
        min-height: auto;
    }

    .header-main-row { /* Becomes the top bar: hamburger, logo, spacer */
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }

    .logo {
        font-size: 24px;
        flex-grow: 1; /* Allow logo to take space and center */
        text-align: center;
        margin-right: 0; /* Remove desktop margin */
    }

    .hamburger-btn {
        display: flex; /* Show hamburger button on mobile */
        order: -1; /* Place at the beginning */
    }

    .mobile-spacer {
        display: block; /* Show spacer to balance logo centering */
        width: 30px; /* Match hamburger width */
    }

    .main-nav {
        display: none; /* Hidden by default for mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 70%;
        max-width: 300px;
        height: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transform: translateX(-100%); /* Start off-screen */
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        z-index: 1001;
        overflow-y: auto;
    }

    .main-nav.active {
        display: flex; /* IMPORTANT: Must be flex/block to be visible */
        transform: translateX(0); /* Slide in */
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

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

    .nav-link {
        padding: 15px 0;
        width: 100%;
        font-size: 18px;
    }

    .nav-link::after {
        bottom: 5px;
    }

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

    .mobile-nav-buttons {
        display: flex; /* Show mobile buttons */
        width: 100%;
        justify-content: center;
        gap: 10px;
        padding-bottom: 10px;
        padding-top: 10px; /* Space from top row */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-buttons .btn {
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 20px;
    }

    .mobile-menu-overlay {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

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

    .footer-col h3 {
        border-bottom: none;
        padding-bottom: 0;
    }

    .footer-col ul {
        padding: 0;
    }
}
