/* =================== HEADER =================== */
.header {
    padding: 0.5vw 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
    backdrop-filter: blur(0.4167vw);
    box-shadow: 0 0.2083vw 0.7813vw rgba(0, 0, 0, 0.2);
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Shrunk state — toggled by JS on scroll > 60px */
.header--shrunk {
    padding: 0.2vw 0;
    background: rgba(30, 29, 38, 0.95);
    box-shadow: 0 0.3vw 1.5vw rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.8333vw);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 3%;
    width: 45%
}

.logo {
    width: 4.4271vw;
    height: 3.3854vw;
}

.logo img {
    width: 100%;
    height: auto;
}

.logo2 {
    width: 10.625vw;
    height: 1.7188vw
}

.logo2 img {
    width: 100%;
    height: auto;
}

.nav {
    width: 60%;
    padding-left: 8%;
}

.nav ul {
    display: flex;
    gap: 0.5208vw;
    justify-content: space-between;

}

.nav ul li {
    margin-bottom: 0
}

.nav ul li a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9vw;
    font-weight: 250;
    color: var(--color-white);

}

.nav ul li a.active {
    font-weight: 700;
    position: relative;
}

/* Thêm gạch dưới cho active link */
.nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -0.1042vw;
    left: 0;
    width: 100%;
    height: 0.1042vw;
    background-color: var(--color-gray);
}

/* Thêm hiệu ứng hover màu vàng cho thẻ a trong navigation */
.nav ul li a:hover {
    color: var(--color-yellow);
    transition: color 0.3s ease;
}

/* =================== LIST-LOGO =================== */
.list-logo {
    background: linear-gradient(to bottom, var(--color-darker) 20%, var(--color-dark-purple) 100%);
    padding: 2.6042vw 0;
    width: 100%;
    overflow-x: hidden;
}

.list-logo .container {
    max-width: 62.5vw;
    margin: 0 auto;
    padding: 0 1.0417vw;
}

.list-logo-container {
    display: flex;
    gap: 1.5625vw;
    justify-content: center;
    align-items: center;
}

.list-logo-container img {
    width: 7.6563vw;
    height: 5.8854vw;
    transition: transform 0.3s ease;
    max-width: 100%;
    object-fit: contain;
}

.list-logo-container img:hover {
    transform: scale(1.1);
    /* Phóng to nhẹ khi hover */
}

/* =================== FOOTER =================== */
.footer {
    background: var(--color-dark);
    color: var(--color-gray);
}


/* Footer Top Grid Layout */
.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Chia làm 4 cột đều nhau */
    gap: 2.0833vw;
    padding: 4.1667vw 2.0833vw;
    align-items: stretch;
}

/* Điều chỉnh footer-logo thành một cột */
.footer-top .footer-logo {
    display: flex;
    flex-direction: column;
    align-self: center;
}

.footer-top .footer-logo img {
    width: 10.4167vw;
    margin-bottom: 0.7813vw;
    align-self: center;

}

.footer-top .footer-logo p {

    color: #888;
    max-width: 100%;
    text-align: center;
    line-height: 1;
    padding-top: 0.7813vw;

}

/* Điều chỉnh footer-links và footer-column */
.footer-links {
    display: contents;
    /* Để các footer-column trở thành con trực tiếp của grid */
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-column :nth-child(4) {
    align-items: last baseline;
}

.footer-column .title-footer {
    list-style: none;
    margin-bottom: 1.0417vw;
    font-weight: 700;
    font-size: 0.9vw;
}

.footer-column ul {
    list-style: none;
    align-items: center;
    margin: 0;
    font-weight: 400;
}

.footer-column a {
    text-decoration: none;
    margin-bottom: 1.0417vw;
    font-weight: 700;
}

.footer-column ul li {
    margin-bottom: 1.0417vw;
}

.footer-column ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9vw;
}

.footer-column ul li a:hover {
    color: #fff;
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 3vw;
    margin-top: 0.5208vw;
    justify-content: flex-start;
}

.social-icons a img {
    width: 1.25vw;
    height: 1.25vw;
    transition: transform 0.3s ease;
}

.social-icons a:hover img {
    transform: scale(1.2);
}

/* Nếu muốn chỉ điều chỉnh cột Connect With Us, có thể sử dụng selector cụ thể hơn */
.footer-column:last-child {
    align-items: flex-start;
    padding-left: 0.5208vw;
}

/* =================== HAMBURGER MENU =================== */

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 4.5vw;
    height: 3vw;
    cursor: pointer;
    z-index: 100;
    margin-right: 2.0833vw;
}

.hamburger-menu .bar {
    height: 0.1563vw;
    width: 100%;
    background-color: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When active, transform to X */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(2.25vw) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-0.5729vw) rotate(-45deg);
}


/* =================== OVERLAY =================== */
.overlay {
    touch-action: pan-y;
    /* Cho phép vuốt dọc nhưng kiểm soát vuốt ngang */
}

/* =================== DROPDOWN MENU =================== */

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0.5208vw);
    background: linear-gradient(135deg, #201E27 0%, #2A2833 100%);
    min-width: 11.4583vw;
    border-radius: 0.7813vw;
    padding: 0.7813vw 0;
    margin-top: 0.7813vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0.5208vw 1.5625vw rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: 0.0521vw solid rgba(250, 222, 131, 0.1);
    display: flex;
    flex-direction: column;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.4167vw;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.4167vw solid transparent;
    border-right: 0.4167vw solid transparent;
    border-bottom: 0.4167vw solid #201E27;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.625vw 1.3021vw;
    color: var(--color-white);
    font-size: var(--text);
    font-weight: 300;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    text-align: left;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0.1563vw;
    background: var(--color-yellow);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-menu a:hover {
    background: rgba(250, 222, 131, 0.05);
    color: var(--color-yellow);
    padding-left: 1.5625vw;
}

.dropdown-menu a:hover::before {
    transform: scaleY(1);
}

.dropdown-toggle {
    position: relative;
    padding-right: 1.0417vw;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    right: 0.2604vw;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 0.2604vw solid transparent;
    border-right: 0.2604vw solid transparent;
    border-top: 0.2604vw solid var(--color-white);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::before {
    transform: translateY(-50%) rotate(180deg);
}

/* =================== RESPONSIVE =================== */
/* Drawer nav styles */
@media (max-width: 768px) {

    /* Header */
    .header {
        width: 100%;
    }

    .header .logo-container {
        padding: 1.7361vw 1.7361vw;
        /* 10px / 576 * 100 */
    }


    .logo {
        width: 10.4167vw;
        /* 60px / 576 * 100 */
        height: 7.8125vw;
        /* 45px / 576 * 100 */
    }

    .logo2 {
        width: 26.0417vw;
        /* 150px / 576 * 100 */
        height: auto;
    }

    /* Navigation */
    .hamburger-menu {
        display: flex;
        margin-right: 2.6042vw;
        /* 15px / 576 * 100 */
        order: 3;
    }

    .lang-switcher {
        order: 2;
        margin-left: 0;
    }

    .logo-container {
        order: 1;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 52.0833vw;
        /* 300px / 576 * 100 */
        height: 100vh;
        background-color: var(--color-hamburger);
        padding: 17.3611vw 6.9444vw 3.4722vw;
        /* 100px 40px 20px / 576 * 100 */
        transition: right 0.3s ease;
        z-index: 90;
        box-shadow: -0.8696vw 0 2.6042vw rgba(0, 0, 0, 0.3);
        /* -5px 0 15px / 576 * 100 */
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        gap: 3vw;
        /* 30px / 576 * 100 */
        margin-right: 20vw;
    }

    .nav ul li {
        width: 100%;
        text-align: left;
    }

    .nav ul li a {
        font-size: 3.125vw;
        /* 18px / 576 * 100 */
        display: block;
        padding: 2.0833vw 0;
        /* 12px / 576 * 100 */
    }

    .footer-column ul li a {
        font-size: 2.6vw;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
    }

    .overlay.active {
        display: block;
    }

    /* Footer */
    .footer-top {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "quick resources"
            "logo social";
        gap: 4.3403vw;
        /* 25px / 576 * 100 */
    }

    /* Gán grid area cho từng cột */
    .footer-column:nth-child(1) {
        grid-area: logo;
        /* Logo column - chuyển xuống vị trí thứ 3 */
    }

    .footer-column:nth-child(2) {
        grid-area: quick;
        /* Quick Links column */
    }

    .footer-column:nth-child(3) {
        grid-area: resources;
        /* Resources column */
    }

    .footer-column:last-child {
        grid-area: social;
        align-items: center;
        /* Social column */
    }

    .list-logo-container {
        gap: 0.8696vw;
        /* 5px / 576 * 100 */
    }

    .list-logo-container img {
        width: 13vw;
        /* 100px / 576 * 100 */
        height: auto;
        margin-left: 5px;
        margin-right: 5px;
    }

    .social-icons a img {
        width: 4vw;
        height: 4vw;
        transition: transform 0.3s ease;
    }

    .footer-top .footer-logo img {
        width: 17.3611vw;
    }

    .footer-top .footer-logo p {}

    /* Hiển thị trực tiếp dropdown menu khi ở mobile */
    .dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: relative;
        display: block;
        width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu li {
        margin: 0;
        padding: 0;
    }

    .dropdown-menu a {
        padding: 1.0417vw 2.0833vw;
        /* 6px 12px / 576 * 100 */
        font-size: 2.6042vw;
        /* 15px / 576 * 100 */
        color: rgba(255, 255, 255, 0.8);
        display: block;
    }

    .dropdown-menu a::before {
        display: none;
    }

    .dropdown-toggle::after {
        display: none;
    }

    .dropdown:hover .dropdown-menu {
        transform: none;
    }
}

/* =================== LANGUAGE SWITCHER =================== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 0;
}

.lang-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.lang-btn--active {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.lang-btn img {
    display: block;
    width: 24px;
    height: 16px;
    object-fit: cover;
}

/* =================== FOOTER POLICY BAR =================== */
.footer-policy-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 0 1.8rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.footer-policy-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem 1.2rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.footer-policy-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-policy-links a:hover {
    color: var(--color-yellow, #fade83);
}

.footer-policy-divider {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}