﻿/* ===== Bootstrap Grid Override ===== */
.container,
.container-fluid,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
    --bs-gutter-x: 0.2rem !important;
}

/* ===== Google Translate Customization ===== */
/* Hide Google Translate banner */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

.skiptranslate {
    display: none !important;
}

#goog-gt-tt {
    display: none !important;
}

/* Hide default Google Translate element */
#google_translate_element {
    display: none;
}

/* ===== Language Switcher Styles ===== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .language-switcher a.lang-btn {
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        padding: 6px 10px;
        border-radius: 5px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
        font-size: 0.9rem;
        color: inherit;
    }

        .language-switcher a.lang-btn:hover {
            background-color: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }

        .language-switcher a.lang-btn.active {
            font-weight: bold;
            background-color: rgba(255,255,255,0.3);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

    /* CÁCH 1: Flag Icons CSS */
    .language-switcher .fi {
        width: 20px;
        height: 15px;
        border-radius: 2px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    /* CÁCH 2: Flag Images */
    .language-switcher .flag-img {
        width: 20px;
        height: 15px;
        border-radius: 2px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
        object-fit: cover;
    }

.lang-code {
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
}



/* Desktop: hiện cả cờ và code */
@media (min-width: 768px) {
    .language-switcher a.lang-btn {
        padding: 6px 12px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .language-switcher a.lang-btn {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

/* ===== Mobile Menu Toggle Button ===== */
.custom-toggler {
    border: 2px solid rgba(255,255,255,0.8);
    padding: 8px 12px;
    background: transparent;
    border-radius: 5px;
    position: relative;
}

.navbar-toggler-icon {
    width: 25px;
    height: 20px;
    position: relative;
    display: inline-block;
}

    .navbar-toggler-icon span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: white;
        border-radius: 3px;
        opacity: 1;
        left: 0;
        transition: .25s ease-in-out;
    }

        .navbar-toggler-icon span:nth-child(1) {
            top: 0px;
        }

        .navbar-toggler-icon span:nth-child(2) {
            top: 8px;
        }

        .navbar-toggler-icon span:nth-child(3) {
            top: 16px;
        }

/* Hamburger menu animation when active */
.custom-toggler.active .navbar-toggler-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.custom-toggler.active .navbar-toggler-icon span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.custom-toggler.active .navbar-toggler-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

.custom-toggler:focus {
    box-shadow: none;
}

/* ===== Dropdown Menu Improvements ===== */
.navbar-nav .dropdown-menu {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .navbar-nav .dropdown:hover .dropdown-menu,
    .navbar-nav .dropdown-menu.show {
        display: block;
        opacity: 1;
    }

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 0;
}

/* ===== Mobile Menu Responsive Styles ===== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255,255,255,0.98);
        padding: 20px;
        margin-top: 15px;
        border-radius: 5px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .navbar-nav .nav-link {
        color: #333 !important;
    }

        .navbar-nav .nav-link:hover {
            color: #007bff !important;
        }

    .navbar-nav .dropdown-menu {
        background: #f8f9fa;
    }

    .navbar-nav .dropdown-item {
        color: #333;
    }

        .navbar-nav .dropdown-item:hover {
            background: #e9ecef;
            color: #007bff;
        }
}

/* ===== Search Icon Button ===== */
.search-icon-btn {
    color: inherit;
    font-size: 1.2rem;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .search-icon-btn:hover {
        color: #007bff;
    }

    .search-icon-btn i {
        display: flex;
        align-items: center;
    }

/* Mobile: Search icon before menu button */
@media (max-width: 991.98px) {
    .search-icon-btn {
        order: 0;
    }

    .custom-toggler {
        order: 1;
    }
}

/* Desktop: Search icon after language switcher */
@media (min-width: 992px) {
    .search-icon-btn {
        order: 2;
    }
}

/* ===== Search Modal Styles ===== */
#searchModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

#searchModal .modal-header {
    padding: 1.5rem;
}

#searchModal .modal-title {
    font-weight: 600;
    color: #333;
}

#searchModal .modal-body {
    padding: 1.5rem;
}

#searchModal .form-control {
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 10px 0 0 10px;
    transition: border-color 0.3s ease;
}

    #searchModal .form-control:focus {
        border-color: #007bff;
        box-shadow: none;
    }

#searchModal .btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 0 10px 10px 0;
    font-weight: 500;
}

/* ===== General Styles ===== */
a {
    text-decoration: none;
}

.sidebar-date {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #4e73df, #1cc88a);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    text-align: center;
}


.chan-trang {
    background: white;
    padding: 60px 0 30px;
    border-top: 1px solid #e0e0e0;
}

.logo-chan-trang {
    margin-bottom: 20px;
}

.chu-logo {
    font-size: 42px;
    font-weight: bold;
    color: #e31e24;
    letter-spacing: 3px;
    line-height: 1;
    margin-bottom: 15px;
}

.chu-phu-logo {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.6;
}

.tieu-de-muc {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: 600;
}

.thong-tin-lien-he {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.muc-lien-he {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.bieu-tuong-lien-he {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

    .bieu-tuong-lien-he svg {
        width: 100%;
        height: 100%;
        fill: #e31e24;
    }

.muc-lien-he a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

    .muc-lien-he a:hover {
        color: #e31e24;
    }

.lien-ket-mang-xa-hoi {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.nut-mang-xa-hoi {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
}

    .nut-mang-xa-hoi svg {
        width: 20px;
        height: 20px;
        fill: #999;
        transition: fill 0.3s;
    }

    .nut-mang-xa-hoi:hover {
        background: #e31e24;
    }

        .nut-mang-xa-hoi:hover svg {
            fill: white;
        }

.phan-dang-ky {
    margin-top: 30px;
}

.tieu-de-dang-ky {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.o-nhap-email {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    transition: border-color 0.3s;
}

    .o-nhap-email:focus {
        outline: none;
        border-color: #e31e24;
    }

    .o-nhap-email::placeholder {
        color: #ccc;
    }

.cuoi-chan-trang {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.ban-quyen {
    font-size: 11px;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 767px) {
    .chan-trang {
        padding: 40px 0 20px;
    }

    .chu-logo {
        font-size: 36px;
    }

    .tieu-de-muc {
        margin-top: 30px;
    }
}

/* Mobile */
@media (max-width: 992px) {
    .top-header {
        background: #fff;
        color: #000;
    }
}

@media (max-width: 991.98px) {

    /* Cho phép xuống dòng */
    .header-actions {
        justify-content: flex-start;
    }

    /* Ngôn ngữ chiếm trọn 1 dòng */
    .mobile-full {
        width: 100%;
        order: 1;
        display: flex;
        gap: 8px;
    }

    /* Icon search + menu xuống dòng dưới */
    .mobile-icons {
        order: 2;
    }
}

@media (max-width: 991.98px) {
    .custom-toggler .navbar-toggler-icon span {
        background-color: #000;
    }
}

