:root {
    --primary-color: #1A2B4C;
    --secondary-color: #F0B90B;
    --text-color: #ffffff;
    --dark-text-color: #333333;
    --light-bg: #f9f9f9;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--dark-text-color);
}

/* General Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    font-size: 15px;
}

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

.btn-primary:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

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

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

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

.btn-tertiary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Header Styles */
.site-header {
    background-color: var(--primary-color);
    padding: 15px 20px;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

.header-actions {
    display: flex;
    gap: 10px;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 40px 20px 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

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

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

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .main-nav ul {
        gap: 15px;
    }
    .header-actions {
        gap: 5px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap; /* Allow items to wrap to the next line */
        justify-content: space-between; /* Distribute items with space between them */
    }

    .logo {
        order: 2; /* Logo now second in order */
        flex-grow: 1; /* Allows logo to take available space for centering */
        text-align: center; /* Centers the logo text within its flex item */
    }

    .hamburger-menu {
        display: block;
        order: 1; /* Hamburger menu now first in order (leftmost) */
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* Adjust based on header height */
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        padding: 20px 0;
        z-index: 999;
        text-align: center;
    }

    .main-nav.active {
        display: flex;
    }

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

    .main-nav li {
        margin: 10px 0;
    }

    .main-nav li a {
        font-size: 18px;
        padding: 10px 0;
        display: block;
    }

    .header-actions {
        display: flex; /* Always display buttons on mobile */
        flex-direction: row; /* Arrange buttons side-by-side */
        order: 3; /* Place buttons after logo */
        width: 100%; /* Force buttons to a new line */
        justify-content: center; /* Center the buttons horizontally */
        margin-top: 20px; /* Space below the logo */
        gap: 10px; /* Maintain gap between buttons */
        
        /* Override old slide-out menu styles */
        position: static; 
        background-color: transparent; 
        padding-bottom: 0; 
        z-index: auto; 
    }

    .header-actions .btn-tertiary {
        display: none; /* Hide the 'Tải APP' button */
    }

    .header-actions .btn {
        width: auto; /* Allow buttons to size based on content */
        flex-grow: 0; /* Prevent buttons from growing */
        flex-shrink: 0; /* Prevent buttons from shrinking */
        padding: 10px 20px; /* Restore original button padding for mobile */
        font-size: 15px; /* Restore original button font size for mobile */
    }

    /* Removed this rule as header-actions is now always visible and positioned by flexbox */
    /* .main-nav.active + .header-actions.active { */
    /*     display: flex; */
    /*     top: calc(80px + var(--main-nav-height, 0px)); */
    /* } */

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3 {
        margin-top: 30px;
    }
    .footer-logo {
        margin-bottom: 10px;
    }
}