﻿:root {
    --thapmuoi-blue: #0b3d91;
    --thapmuoi-blue-dark: #062c6f;
    --thapmuoi-blue-light: #1a5bbf;
    --thapmuoi-red: #e63946;
    --thapmuoi-red-dark: #c62828;
    --thapmuoi-gold: #FFD700;
    --thapmuoi-gold-light: #FFC107;
    --thapmuoi-white: #ffffff;
    --thapmuoi-gray-light: #f8f9fa;
    --thapmuoi-gray: #6c757d;
    --thapmuoi-text-dark: #333333;
    --thapmuoi-text-muted: #666666;
    --thapmuoi-border: rgba(11,61,145,0.1);
    --thapmuoi-shadow: rgba(0,0,0,0.1);
    --thapmuoi-shadow-hover: rgba(11,61,145,0.2);
    --thapmuoi-transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background: var(--thapmuoi-gray-light);
    color: var(--thapmuoi-text-dark);
    overflow-x: hidden;
}

.thapmuoi-header {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    line-height: 0;
}

.thapmuoi-banner {
    width: 100%;
}

    .thapmuoi-banner img {
        width: 100%;
        height: auto;
        display: block;
    }

.thapmuoi-nav {
    background: var(--thapmuoi-blue);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: var(--thapmuoi-transition);
    padding: 0;
}

    .thapmuoi-nav.scrolled {
        background: var(--thapmuoi-blue-dark);
        padding: 5px 0;
    }

    .thapmuoi-nav .container {
        position: relative;
    }

.thapmuoi-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--thapmuoi-white);
    color: var(--thapmuoi-white);
    font-size: 1.8rem;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: auto;
    margin-left: auto;
    transition: var(--thapmuoi-transition);
}

    .thapmuoi-menu-toggle:hover {
        background: var(--thapmuoi-white);
        color: var(--thapmuoi-blue);
        border-color: var(--thapmuoi-white);
        transform: scale(1.05);
    }

    .thapmuoi-menu-toggle i {
        font-size: 1.8rem;
        color: var(--thapmuoi-white);
    }

    .thapmuoi-menu-toggle:hover i {
        color: var(--thapmuoi-blue);
    }

.thapmuoi-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.thapmuoi-menu-item {
    position: relative;
}

.thapmuoi-menu-link {
    display: block;
    padding: 15px 20px;
    color: var(--thapmuoi-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--thapmuoi-transition);
    position: relative;
    overflow: hidden;
}

    .thapmuoi-menu-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: var(--thapmuoi-gold);
        transition: all 0.4s ease;
        transform: translateX(-50%);
    }

    .thapmuoi-menu-link:hover::after {
        width: 80%;
    }

.thapmuoi-menu-item.active > .thapmuoi-menu-link::after {
    width: 80%;
}

.thapmuoi-menu-link:hover {
    color: var(--thapmuoi-white);
    background: rgba(255,255,255,0.1);
}

.thapmuoi-menu-link i {
    margin-right: 8px;
    color: var(--thapmuoi-white);
    transition: var(--thapmuoi-transition);
}

.thapmuoi-menu-link:hover i,
.thapmuoi-menu-item.active > .thapmuoi-menu-link i {
    color: var(--thapmuoi-gold);
}

.thapmuoi-menu-dropdown {
    position: relative;
}

.thapmuoi-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 15px;
}

    .thapmuoi-dropdown-toggle i {
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }

.thapmuoi-menu-dropdown:hover > .thapmuoi-dropdown-toggle i {
    transform: rotate(180deg);
}

.thapmuoi-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--thapmuoi-blue);
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.thapmuoi-menu-dropdown:hover > .thapmuoi-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.thapmuoi-dropdown-menu li {
    position: relative;
}

    .thapmuoi-dropdown-menu li:hover > .thapmuoi-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(5px);
    }

.thapmuoi-dropdown-menu .thapmuoi-dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 5px;
}

.thapmuoi-dropdown-link {
    display: block;
    padding: 12px 20px;
    color: var(--thapmuoi-white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

    .thapmuoi-dropdown-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--thapmuoi-gold);
        transition: all 0.4s ease;
        transform: translateX(-50%);
        opacity: 0;
    }

    .thapmuoi-dropdown-link:hover::after {
        width: 80%;
        opacity: 1;
    }

.thapmuoi-dropdown-menu li.active > .thapmuoi-dropdown-link::after {
    width: 80%;
    opacity: 1;
}

.thapmuoi-dropdown-link:hover {
    background: rgba(255,255,255,0.15);
    color: var(--thapmuoi-gold);
    padding-left: 25px;
}

.thapmuoi-dropdown-menu li.active > .thapmuoi-dropdown-link {
    background: rgba(255,255,255,0.15);
    color: var(--thapmuoi-gold);
    padding-left: 25px;
}

.thapmuoi-dropdown-link:hover i {
    color: var(--thapmuoi-gold);
}

.thapmuoi-dropdown-menu li.active > .thapmuoi-dropdown-link i {
    color: var(--thapmuoi-gold);
}

.thapmuoi-dropdown-link i {
    margin-right: 10px;
    color: var(--thapmuoi-gold);
    font-size: 1rem;
    transition: var(--thapmuoi-transition);
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-menu-link::after {
    width: 0;
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-menu-link i {
    color: var(--thapmuoi-white);
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-menu-link {
    background: transparent;
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-menu-link::after {
    width: 0;
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-menu-link i {
    color: var(--thapmuoi-white);
}

.thapmuoi-menu-item:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-menu-link {
    background: transparent;
}

/* KHÔNG cho phép active cha dropdown khi con được chọn */
.thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-dropdown-link::after {
    width: 0;
    opacity: 0;
}

.thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-dropdown-link {
    background: transparent;
    color: var(--thapmuoi-white);
}

    .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active) > .thapmuoi-dropdown-link i {
        color: var(--thapmuoi-gold);
    }

/* KHÔNG cho phép active ông dropdown khi cháu được chọn */
.thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-dropdown-link::after {
    width: 0;
    opacity: 0;
}

.thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-dropdown-link {
    background: transparent;
    color: var(--thapmuoi-white);
}

    .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li:has(> .thapmuoi-dropdown-menu li.active)) > .thapmuoi-dropdown-link i {
        color: var(--thapmuoi-gold);
    }

.thapmuoi-content {
    min-height: 500px;
    padding: 40px 0;
}

.thapmuoi-footer {
    background: var(--thapmuoi-blue-dark);
    color: var(--thapmuoi-white);
    margin-top: 50px;
    position: relative;
}

.thapmuoi-footer-top {
    padding: 50px 0 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.thapmuoi-footer-bottom {
    padding: 20px 0;
    background: #051b3a;
    font-size: 0.95rem;
}

.thapmuoi-footer-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--thapmuoi-white);
    margin-bottom: 15px;
}

.thapmuoi-footer-title {
    color: var(--thapmuoi-white);
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .thapmuoi-footer-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 50px;
        height: 2px;
        background: var(--thapmuoi-gold);
    }

.thapmuoi-footer-quote {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    font-style: italic;
}

.thapmuoi-footer-links {
    list-style: none;
    padding: 0;
}

    .thapmuoi-footer-links li {
        margin-bottom: 12px;
    }

    .thapmuoi-footer-links a {
        color: rgba(255,255,255,0.8);
        text-decoration: none;
        transition: var(--thapmuoi-transition);
        display: inline-block;
    }

        .thapmuoi-footer-links a:hover {
            color: var(--thapmuoi-gold);
            transform: translateX(5px);
        }

.thapmuoi-social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: var(--thapmuoi-white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: var(--thapmuoi-transition);
}

    .thapmuoi-social-link:hover {
        background: var(--thapmuoi-gold);
        color: var(--thapmuoi-blue-dark);
        transform: translateY(-5px) rotate(360deg);
    }

.thapmuoi-contact-info {
    list-style: none;
    padding: 0;
}

    .thapmuoi-contact-info li {
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .thapmuoi-contact-info i {
        color: var(--thapmuoi-gold);
        font-size: 1.2rem;
    }

.thapmuoi-developer {
    color: var(--thapmuoi-gold);
    font-weight: 500;
}

.thapmuoi-backtotop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--thapmuoi-blue);
    color: var(--thapmuoi-white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
}

    .thapmuoi-backtotop.show {
        display: flex;
        animation: bounceIn 0.5s ease;
    }

    .thapmuoi-backtotop:hover {
        background: var(--thapmuoi-red);
        color: var(--thapmuoi-white);
        transform: scale(1.1) rotate(360deg);
    }

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.thapmuoi-footer-login {
    color: var(--thapmuoi-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--thapmuoi-transition);
    padding: 0 5px;
}

    .thapmuoi-footer-login:hover {
        color: var(--thapmuoi-gold);
        text-decoration: none;
    }

@media (max-width: 992px) {
    .thapmuoi-header {
        height: auto;
    }
}

@media (max-width: 768px) {
    .thapmuoi-header {
        height: auto;
    }

    .thapmuoi-banner img {
        object-position: center 20%;
    }

    .thapmuoi-nav .container {
        padding: 10px 15px;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .thapmuoi-nav.scrolled .container {
        padding: 5px 15px;
    }

    .thapmuoi-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        padding: 0;
        border: 2px solid var(--thapmuoi-white);
        border-radius: 10px;
        background: transparent;
        color: var(--thapmuoi-white);
        margin: 0;
    }

        .thapmuoi-menu-toggle:hover {
            background: var(--thapmuoi-white);
            color: var(--thapmuoi-blue);
            border-color: var(--thapmuoi-white);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255,255,255,0.3);
        }

        .thapmuoi-menu-toggle i {
            font-size: 2rem;
            margin: 0;
            color: var(--thapmuoi-white);
        }

        .thapmuoi-menu-toggle:hover i {
            color: var(--thapmuoi-blue);
        }

    .thapmuoi-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        background: var(--thapmuoi-blue);
        border-radius: 12px;
        overflow-y: auto;
        max-height: calc(100vh - 80px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border: 1px solid var(--thapmuoi-white);
    }

        .thapmuoi-menu.show {
            display: flex;
            animation: slideDown 0.3s ease;
        }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .thapmuoi-menu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

        .thapmuoi-menu-item:last-child {
            border-bottom: none;
        }

    .thapmuoi-menu-link {
        padding: 15px 25px;
        text-align: left;
        font-size: 1.1rem;
        color: var(--thapmuoi-white);
    }

        .thapmuoi-menu-link::after {
            display: none;
        }

        .thapmuoi-menu-link:hover {
            background: rgba(255,255,255,0.1);
            padding-left: 30px;
        }

        .thapmuoi-menu-link i {
            margin-right: 15px;
            width: 25px;
            text-align: center;
            font-size: 1.2rem;
            color: var(--thapmuoi-white);
        }

        .thapmuoi-menu-link:hover i {
            color: var(--thapmuoi-gold);
        }

    .thapmuoi-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0 0 0 20px;
        margin-top: 5px;
        display: none;
    }

    .thapmuoi-menu-dropdown.open > .thapmuoi-dropdown-menu {
        display: block;
    }

    .thapmuoi-dropdown-link {
        color: var(--thapmuoi-white);
        padding: 10px 15px;
        font-size: 1rem;
    }

        .thapmuoi-dropdown-link::after {
            display: none;
        }

        .thapmuoi-dropdown-link:hover {
            background: rgba(255,255,255,0.15);
            color: var(--thapmuoi-gold);
            padding-left: 20px;
        }

        .thapmuoi-dropdown-link i {
            color: var(--thapmuoi-gold);
        }

    .thapmuoi-backtotop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .thapmuoi-header {
        height: auto;
    }

    .thapmuoi-nav .container {
        padding: 8px 12px;
    }

    .thapmuoi-menu-toggle {
        width: 45px;
        height: 45px;
    }

        .thapmuoi-menu-toggle i {
            font-size: 1.8rem;
        }

    .thapmuoi-menu-link {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .thapmuoi-footer-top .row > div {
        text-align: center;
    }

    .thapmuoi-footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .thapmuoi-contact-info li {
        justify-content: center;
    }
}
