/* Biến CSS */
:root {
    --primary-color: #0A2342;
    --secondary-color: #FFD700;
    --text-color: #333;
    --light-text-color: #f0f0f0;
    --bg-light: #f9f9f9;
    --bg-dark: #222;
}

/* Thiết lập chung */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

a:hover {
    color: var(--primary-color);
}

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

/* Header */
.site-header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header .logo {
    font-size: 2em;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.site-header .logo:hover {
    color: #fff;
}

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

.main-nav .nav-links li {
    margin-left: 25px;
}

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

.main-nav .nav-links 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 .nav-links a:hover::after,
.main-nav .nav-links a.active::after {
    width: 100%;
}

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

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

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

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

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

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

.site-footer .footer-col h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.site-footer .footer-col p,
.site-footer .footer-col ul li {
    margin-bottom: 10px;
}

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

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

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

.site-footer .footer-bottom p {
    margin: 0;
}

#backToTopBtn {
    display: none; /* Ẩn mặc định */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#backToTopBtn:hover {
    background-color: #fff;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
    }

    .main-nav {
        width: 100%;
        order: 3; /* Đặt menu bên dưới logo */
    }

    .main-nav .nav-links {
        flex-direction: column;
        background-color: var(--primary-color);
        position: absolute;
        top: 60px; /* Dưới header */
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .main-nav .nav-links.active {
        max-height: 300px; /* Chiều cao tối đa cho menu di động */
    }

    .main-nav .nav-links li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .main-nav .nav-links a {
        display: block;
        padding: 15px 20px;
        color: var(--light-text-color);
    }

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

    .main-nav .nav-links a::after {
        display: none; /* Tắt hiệu ứng gạch chân trên di động */
    }

    .hamburger-menu {
        display: block;
    }

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

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

    .site-footer .footer-col ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #backToTopBtn {
        padding: 8px 12px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}