/* ===== TSQCB WEBSITE - MAIN CSS ===== */

:root {
    --primary-color: #b30812;
    --secondary-color: #1a1a2e;
    --light-bg: #f2f4f0;
    --border-color: #dee2e6;
    --brand-gold: #f0c53a;
    --brand-beige: #f4f1dd;
    --brand-brown: #6f2f12;
    --page-bg: #f2f4f0;
    --header-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background-color: var(--page-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color) !important;
}

/* Header */
.top-ribbon {
    background: #a71119;
    color: #ffe676;
    border-top: 3px solid #8f0408;
    border-bottom: 3px solid #d5a20f;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.86rem;
}

.ribbon-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0 10px;
}

.ribbon-slogan i {
    font-size: 0.7rem;
    margin: 0 0.2rem;
}

.ribbon-slogan {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ribbon-track {
    display: inline-block;
    will-change: transform;
    animation: ribbonSlideLTR 30s linear infinite;
}

.ribbon-message {
    display: inline-block;
    white-space: nowrap;
}

.ribbon-time {
    flex: 0 0 auto;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.mobile-menu-trigger {
    border: 0;
    background: transparent;
    color: #1f2a37;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus-visible {
    background: rgba(22, 34, 54, 0.08);
    outline: none;
}

.mobile-menu-trigger i {
    font-size: 1.25rem;
}

@keyframes ribbonSlideLTR {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(calc(-100% - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ribbon-track {
        animation: none;
    }
}

.site-header {
    position: relative;
    background: var(--header-bg);
    border-bottom: 2px solid #ddc58d;
    overflow: hidden;
}

.site-header::before,
.site-header::after {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    background: url('../images/header%20trong%20dong.png') center/contain no-repeat;
    opacity: 0.18;
    pointer-events: none;
}

.site-header::before {
    left: -170px;
    top: -85px;
}

.site-header::after {
    right: -170px;
    top: -60px;
}

.header-main {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.brand-logo {
    width: 86px;
    flex: 0 0 86px;
}

.header-logo {
    width: 100%;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.18));
}

.brand-text {
    min-width: 0;
}

.site-title {
    color: var(--brand-brown);
    font-weight: 800;
    font-size: 2.45rem;
    line-height: 1.12;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.site-subtitle {
    color: var(--brand-brown);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    margin-top: 0.35rem;
}

.header-contact {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    color: #a14f18;
    font-size: 1.06rem;
    font-weight: 600;
}

.contact-line i {
    color: #e54f7b;
    margin-right: 0.4rem;
}

.contact-line {
    color: inherit;
    text-decoration: none;
}

.contact-line:hover {
    color: #8c3f13 !important;
    text-decoration: underline;
}

.mode-btn {
    margin-top: 0.5rem;
    border: 1px solid #c3872e;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: #7b4d19;
    font-weight: 700;
    padding: 0.18rem 1.1rem;
}

.main-nav {
    background: #a30000 !important;
    border-top: 1px solid #83050a;
    border-bottom: 2px solid #83050a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.main-nav .container {
    padding-top: 0;
    padding-bottom: 0;
}

.main-nav .navbar-nav {
    gap: 0.1rem;
}

.main-nav .navbar-nav .nav-link {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.62rem 1.05rem;
    border-radius: 0;
    transition: background-color 0.25s ease;
}

.main-nav .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.main-nav .navbar-nav .nav-link.active {
    background: var(--brand-gold);
    color: #912410 !important;
}

.menu-caret {
    margin-left: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* ===== DROPDOWN MENU ===== */
.main-nav .dropdown-menu {
    background: #fff;
    border: none;
    border-top: 3px solid var(--brand-gold, #c3872e);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    min-width: 200px;
    padding: 0.25rem 0;
    margin-top: 0 !important;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.main-nav .dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.main-nav .dropdown-menu .dropdown-item {
    color: #222;
    font-weight: 600;
    font-size: 0.97rem;
    padding: 0.55rem 1.2rem;
    border-left: 3px solid transparent;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.main-nav .dropdown-menu .dropdown-item:hover,
.main-nav .dropdown-menu .dropdown-item:focus {
    background: #fdf3e0;
    color: #a5080f;
    border-left-color: var(--brand-gold, #c3872e);
}

.main-nav .dropdown-menu .dropdown-item.active {
    background: transparent;
    color: var(--brand-gold, #c3872e);
    border-left-color: var(--brand-gold, #c3872e);
}

/* Keep toggle arrow indicator instead of bootstrap caret default */
.main-nav .nav-link.dropdown-toggle::after {
    display: none;
}

@media (max-width: 991.98px) {
    .top-ribbon {
        display: none !important;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1055;
        background: #ffffff;
        border-bottom: 1px solid #dbe2ea;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    }

    .site-header::before,
    .site-header::after {
        display: none;
    }

    .header-main {
        min-height: 74px;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 0.75rem;
    }

    .brand-block {
        flex: 1;
        min-width: 0;
        gap: 0.65rem;
    }

    .brand-logo {
        width: 46px;
        flex: 0 0 46px;
    }

    .site-title {
        font-size: 1rem;
        line-height: 1.22;
        letter-spacing: 0.02em;
        white-space: normal;
        overflow-wrap: anywhere;
        color: #0f1f33;
    }

    .site-subtitle {
        display: none;
    }

    .main-nav {
        position: static !important;
        top: auto !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .main-nav .container {
        padding: 0 !important;
        min-height: 0;
    }

    .mobile-nav-legacy-toggler {
        display: none;
    }

    /* Fix stacking context: main-nav phải cao hơn backdrop (1050) */
    .main-nav {
        z-index: 1060 !important;
    }

    .main-nav .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #FAF3E0;
        z-index: 1060;
        overflow-y: auto;
        padding: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 8px 0 22px rgba(0, 0, 0, 0.18);
        display: flex;
        flex-direction: column;
    }

    .main-nav .navbar-collapse.show {
        transform: translateX(0);
    }

    .mobile-menu {
        width: 100%;
        background: #FAF3E0;
        min-height: 100%;
    }

    .mobile-menu__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #7B1414;
        padding: 14px 18px;
    }

    .mobile-menu__title {
        color: #FFD700;
        font-weight: 700;
        letter-spacing: 1px;
        font-size: 14px;
        text-transform: uppercase;
    }

    .mobile-menu__close {
        background: transparent;
        border: 0;
        color: #FFD700;
        font-size: 22px;
        line-height: 1;
        padding: 0;
        cursor: pointer;
    }

    .mobile-menu__search {
        margin: 12px 14px;
        border: 1.5px solid #9B2020;
        background: #FAF3E0;
        border-radius: 10px;
        padding: 9px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-menu__search-icon {
        color: #9B2020;
        font-size: 14px;
    }

    .mobile-menu__search input {
        border: 0;
        outline: none;
        width: 100%;
        background: transparent;
        color: #2A1A00;
        font-size: 14px;
    }

    .mobile-menu__search input::placeholder {
        color: #9B7A45;
    }

    .mobile-menu__list,
    .mobile-menu__submenu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-menu__entry {
        border-bottom: 1px solid #E8DFC8;
    }

    .mobile-menu__item {
        width: 100%;
        border: 0;
        background: transparent;
        color: #2A1A00;
        font-weight: 600;
        font-size: 14px;
        padding: 15px 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-decoration: none;
        cursor: pointer;
        text-align: left;
    }

    .mobile-menu__item:hover {
        background: #F5E6E6;
        color: #7B1414;
    }

    .mobile-menu__submenu-item:hover {
        background: #F5E6E6;
        color: #7B1414;
    }

    .mobile-menu__item--active {
        background: #7B1414;
        color: #FFFFFF !important;
        font-weight: 700;
    }

    .mobile-menu__item--active:hover {
        background: #7B1414;
        color: #FFFFFF !important;
    }

    .mobile-menu__arrow {
        color: #9B2020;
        font-size: 13px;
        transition: transform 0.28s ease;
        line-height: 1;
        flex-shrink: 0;
    }

    .mobile-menu__entry.is-open > .mobile-menu__toggle .mobile-menu__arrow {
        transform: rotate(180deg);
    }

    .mobile-menu__submenu {
        background: #F0E8D0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu__entry.is-open > .mobile-menu__submenu {
        max-height: 800px;
    }

    .mobile-menu__submenu-item {
        display: block;
        padding: 12px 18px 12px 32px;
        font-size: 13px;
        color: #2A1A00;
        font-weight: 500;
        text-decoration: none;
        border-top: 1px solid #E8DFC8;
        transition: background 0.18s, color 0.18s;
    }

    .mobile-menu__footer {
        padding: 14px 18px 20px;
        border-top: 2px solid #E8DFC8;
        margin-top: 4px;
    }

    .mobile-menu__contact {
        font-size: 12px;
        color: #3A2800;
        line-height: 1.7;
        margin-bottom: 4px;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.46);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.26s ease, visibility 0.26s ease;
    }

    body.nav-drawer-open .mobile-nav-backdrop {
        opacity: 1;
        visibility: visible;
    }
}

.nav-search {
    margin-left: 0.8rem;
    border: 1px solid #c3872e;
    border-radius: 10px;
    background: rgba(156, 17, 21, 0.88);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.7rem;
}

.nav-search i {
    color: #e9be45;
    font-size: 0.92rem;
}

.nav-search input {
    background: transparent;
    border: none;
    color: #ffe8a8;
    min-width: 130px;
    outline: none;
    font-weight: 600;
    font-size: 0.94rem;
}

.nav-search input::placeholder {
    color: #f6d789;
}

/* Dark mode */
body {
    transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark-mode {
    --page-bg: #0f1b24;
    --header-bg: #1a2a36;
    background: var(--page-bg);
    color: #dbe6f2;
}

body.dark-mode .top-ribbon {
    background: #6f080d;
    border-top-color: #550408;
    border-bottom-color: #9f7a0c;
}

body.dark-mode .site-header {
    background: var(--header-bg);
    border-bottom-color: #2f4150;
}

body.dark-mode .site-title,
body.dark-mode .site-subtitle {
    color: #f3d890;
}

body.dark-mode .header-contact {
    color: #c9d6e4;
}

body.dark-mode .contact-line i {
    color: #f39ab8;
}

body.dark-mode .contact-line:hover {
    color: #ffe4a6 !important;
}

body.dark-mode .main-nav {
    background: #8f0000 !important;
    border-top-color: #720006;
    border-bottom-color: #720006;
    box-shadow: 0 3px 10px rgba(84, 0, 0, 0.22);
}

body.dark-mode .main-nav .navbar-nav .nav-link {
    color: #ffffff;
}

body.dark-mode .main-nav .navbar-nav .nav-link.active {
    background: #d0a12e;
    color: #3e1606 !important;
}

body.dark-mode .nav-search {
    background: rgba(128, 8, 12, 0.94);
    border-color: #9b761f;
}

body.dark-mode .nav-search input {
    color: #f6dea1;
}

body.dark-mode .nav-search input::placeholder {
    color: #dcbe79;
}

body.dark-mode .mode-btn {
    background: rgba(15, 27, 36, 0.9);
    border-color: #d8b35e;
    color: #f3d890;
}

body.dark-mode .card {
    background: #ffffff;
    border: none;
    border-color: transparent;
    border-radius: 12px;
    color: #1f2a37;
    box-shadow: 0 6px 24px rgba(19, 35, 52, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-mode .card-header {
    background-color: var(--secondary-color);
}

body.dark-mode .list-group-item,
body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th {
    background-color: #ffffff;
    color: #1f2a37;
    border-color: #e3e8ee;
}

body.dark-mode .text-muted {
    color: #6c7888 !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: #ffffff;
    color: #1f2a37;
    border-color: #d5dde7;
}

body.dark-mode .form-control::placeholder {
    color: #7d8a9b;
}

.sidebar-category-link {
    color: #1f2a37;
    font-weight: 600;
}

.sidebar-category-link:hover {
    color: #a5080f !important;
}

.sidebar-video-title {
    color: #1f2a37;
}

body.dark-mode .sidebar-category-link {
    color: #1f2a37;
}

body.dark-mode .sidebar-category-link:hover {
    color: #a30000 !important;
}

body.dark-mode .sidebar-video-title {
    color: #1f2a37;
}

body.dark-mode .sidebar-video-title:hover {
    color: #a30000;
}

.home-news-title,
.home-news-title-small,
.news-card-title {
    color: #1f2a37;
}

.home-news-title-small:hover {
    color: #a5080f !important;
}

body.dark-mode .home-news-title,
body.dark-mode .home-news-title-small,
body.dark-mode .news-card-title {
    color: #1f2a37;
}

body.dark-mode .home-news-title-small:hover {
    color: #a30000 !important;
}

.sidebar-latest-item {
    padding: 0.42rem;
    border-radius: 8px;
    margin-bottom: 0.28rem;
}

.sidebar-latest-card {
    background: #f7f9fc;
    color: #1f2a37;
}

.sidebar-latest-card .card-header {
    color: #0b6ea8 !important;
}

.sidebar-latest-item:hover {
    background: rgba(15, 23, 42, 0.06);
}

.sidebar-latest-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-latest-title {
    color: #1f2a37;
}

.sidebar-latest-date {
    color: #2f6ea8;
}

body.dark-mode .sidebar-latest-card {
    background: #ffffff;
    color: #1f2a37;
    border: none;
    box-shadow: 0 6px 24px rgba(19, 35, 52, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-mode .sidebar-latest-card .card-header {
    color: #0b6ea8 !important;
}

body.dark-mode .sidebar-latest-item:hover {
    background: rgba(15, 23, 42, 0.06);
}

body.dark-mode .sidebar-latest-title {
    color: #1f2a37;
}

body.dark-mode .sidebar-latest-date {
    color: #2f6ea8;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(28, 38, 24, 0.05), 0 1px 3px rgba(0,0,0,0.02);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(21, 36, 52, 0.08), 0 2px 6px rgba(0,0,0,0.03);
}

.card-header {
    background-color: var(--secondary-color);
    color: #fff;
    font-weight: bold;
    border: none;
}

/* Sections */
.section-title {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Homepage hierarchy refresh */
.home-page {
    background: var(--page-bg);
    min-height: 100vh;
}

.home-page .container {
    padding-top: 24px;
    padding-bottom: 24px;
}

.home-page .section-title {
    position: relative;
    border-bottom: none;
    padding-bottom: 0.6rem;
    margin-bottom: 20px !important;
}

.home-page .section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 92px;
    height: 3px;
    border-radius: 99px;
    background: var(--primary-color);
}

.home-page .row.g-3 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

.home-page .col-lg-8 > section {
    margin-bottom: 20px !important;
}

.home-page .card,
.home-page .home-featured-card,
.home-page .home-category-featured-card,
.home-page .home-mini-item,
.home-page .home-category-mini,
.home-page .hero-carousel-container,
.home-page .gallery-item {
    background: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(28, 38, 24, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.home-page .card {
    border: none;
}

.home-page .card.border-danger,
.home-page .card.border-primary,
.home-page .card.border-success,
.home-page .card.border-warning,
.home-page .card.border-info,
.home-page .card[class*="border-"] {
    border-color: transparent !important;
    border-width: 0 !important;
}

.home-page .card .card-body:not(.p-0) {
    padding: 16px !important;
}

.home-page .card .card-footer {
    padding: 0 16px 16px;
}

.home-page .home-featured-card,
.home-page .home-category-featured-card {
    padding: 16px;
}

.home-page .home-mini-item,
.home-page .home-category-mini {
    padding: 16px;
    border-bottom: none !important;
    margin-bottom: 16px !important;
}

.home-page .home-mini-item:last-child,
.home-page .home-category-mini:last-child {
    margin-bottom: 0 !important;
}

.home-page .home-featured-card img,
.home-page .home-category-featured-card img {
    border-radius: 12px;
}

.home-page .home-mini-item img,
.home-page .home-category-mini img {
    border-radius: 8px !important;
}

.home-page .home-featured-card,
.home-page .home-category-featured-card,
.home-page .home-mini-item,
.home-page .home-category-mini {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-page .home-featured-card:hover,
.home-page .home-category-featured-card:hover,
.home-page .home-mini-item:hover,
.home-page .home-category-mini:hover,
.home-page .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(21, 36, 52, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.home-page .hero-carousel-container {
    box-shadow: 0 4px 20px rgba(28, 38, 24, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: none;
}

.home-page .home-video-block .card-header {
    position: relative;
    padding-bottom: 0.75rem;
}

.home-page .home-video-block .card-header::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0.35rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.45);
}

/* News listing page hierarchy */
.news-list-page {
    background: transparent;
    min-height: 100vh;
    padding: 1.25rem 0 2rem;
}

.news-page-title {
    margin-top: 0.45rem;
    margin-bottom: 1.35rem;
}

.news-article-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.news-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.news-article-thumb-wrap {
    position: relative;
    overflow: hidden;
    height: 190px;
    background: linear-gradient(135deg, #dce8f8 0%, #eaf1fb 45%, #f5f8fc 100%);
}

.news-article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-article-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #d7e3f4, #eef3fa);
    color: #355177;
    font-weight: 800;
    font-size: 2rem;
}

.news-article-card-body {
    padding: 1rem 1rem 0.8rem;
}

.news-article-card .card-footer {
    padding: 0.2rem 1rem 1rem;
}

body.dark-mode .news-list-page {
    background: var(--page-bg);
}

body.dark-mode .home-page {
    background: var(--page-bg);
}

body.dark-mode .news-article-card {
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(19, 35, 52, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.dark-mode .news-article-thumb-wrap,
body.dark-mode .news-article-thumb-placeholder {
    background: linear-gradient(135deg, #293544 0%, #1d2734 100%);
    color: #d4e3f8;
}

/* News Items */
.tin-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.tin-item:last-child {
    border-bottom: none;
}

.tin-item:hover {
    background-color: rgba(233, 69, 96, 0.02);
    padding-left: 0.5rem;
}

.tin-item img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.tin-item-content h6 {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.tin-item-date {
    color: #999;
    font-size: 0.85rem;
}

/* Article Detail */
.noi-dung-chitiet {
    line-height: 1.8;
    color: #444;
    text-align: justify;
    text-justify: inter-word;
    word-break: break-word;
}

.related-article-link {
    color: #1f2a37;
}

.related-article-link:hover {
    color: #a5080f !important;
}

.comment-subject {
    color: #666;
}

.noi-dung-chitiet img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 5px;
}

.noi-dung-chitiet p {
    margin-bottom: 1rem;
    text-align: justify;
}

.noi-dung-chitiet br {
    content: '';
}

.tom-tat {
    font-style: italic;
    color: #666;
    background-color: #f9f9f9;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    border-radius: 3px;
}

/* Comments */
.comment-item {
    background-color: #f9f9f9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
}

.comment-author {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.3rem;
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-text {
    margin-top: 0.5rem;
    color: #666;
}

body.dark-mode .noi-dung-chitiet {
    color: #dbe8f8;
}

body.dark-mode .noi-dung-chitiet p,
body.dark-mode .noi-dung-chitiet li,
body.dark-mode .noi-dung-chitiet span,
body.dark-mode .noi-dung-chitiet strong,
body.dark-mode .noi-dung-chitiet em,
body.dark-mode .noi-dung-chitiet h1,
body.dark-mode .noi-dung-chitiet h2,
body.dark-mode .noi-dung-chitiet h3,
body.dark-mode .noi-dung-chitiet h4,
body.dark-mode .noi-dung-chitiet h5,
body.dark-mode .noi-dung-chitiet h6,
body.dark-mode .noi-dung-chitiet blockquote {
    color: inherit !important;
}

body.dark-mode .noi-dung-chitiet a {
    color: #8ec8ff;
}

body.dark-mode .tom-tat {
    color: #d1deee;
    background-color: #1a2430;
}

body.dark-mode .related-article-link {
    color: #dbe8f8;
}

body.dark-mode .related-article-link:hover {
    color: #ffffff !important;
}

body.dark-mode .comment-item {
    background-color: #1a2430;
}

body.dark-mode .comment-author {
    color: #e4eefb;
}

body.dark-mode .comment-subject,
body.dark-mode .comment-text {
    color: #c8d7ea;
}

/* Forms */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}

/* Buttons */
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-danger:hover {
    background-color: #d63757;
    border-color: #d63757;
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Badges */
.badge-red {
    background-color: var(--primary-color);
    color: #fff;
}

/* Footer */
.site-footer-modern {
    position: relative;
    margin-top: 3rem;
    padding: 2rem 0 0;
    background: linear-gradient(180deg, #07142f 0%, #05112a 100%);
    color: #d9e6ff;
    border-top: 1px solid rgba(123, 169, 255, 0.2);
    line-height: 1.45;
}

.site-footer-modern .container {
    width: min(1620px, calc(100% - 200px));
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 1400px) {
    .site-footer-modern .container {
        width: calc(100% - 96px);
    }
}

@media (max-width: 992px) {
    .site-footer-modern .container {
        width: calc(100% - 36px);
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.2fr 1.2fr 1fr 1.1fr;
    gap: 0;
    border: 1px solid rgba(127, 159, 218, 0.22);
    border-top: none;
    border-left: none;
    border-right: none;
    align-items: start;
}

.footer-col {
    padding: 0.05rem 1.35rem 1.35rem;
    border-right: 1px solid rgba(127, 159, 218, 0.18);
}

.footer-col:last-child {
    border-right: none;
}

.footer-col h4 {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.26em;
    color: #3ec8ff;
    text-transform: uppercase;
    margin-bottom: 1.05rem;
    min-height: 1.2rem;
}

.footer-brand-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(135, 166, 230, 0.16);
    border: 1px solid rgba(139, 175, 248, 0.2);
    border-radius: 14px;
    padding: 0.72rem;
    margin-bottom: 1.15rem;
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-brand-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f2f7ff;
}

.footer-desc {
    font-size: 0.99rem;
    line-height: 1.7;
    color: #d5deec;
    margin-bottom: 1rem;
}

.footer-subtitle,
.footer-hotline-label,
.footer-social-label,
.footer-qr-label {
    color: #a8bad8;
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
}

.footer-links-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links-compact a {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    background: rgba(142, 168, 216, 0.2);
    color: #f2f6ff;
    text-decoration: none;
    padding: 0.33rem 0.68rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.99rem;
}

.footer-links-compact a:hover {
    background: rgba(77, 202, 255, 0.24);
    color: #ffffff !important;
    text-decoration: none;
}

.footer-info-card {
    background: rgba(142, 168, 216, 0.2);
    border: 1px solid rgba(141, 176, 252, 0.2);
    border-radius: 14px;
    padding: 0.95rem 1.05rem;
    margin-bottom: 1rem;
}

.footer-info-card p {
    margin-bottom: 0.62rem;
    font-size: 0.99rem;
    line-height: 1.6;
    color: #e6eeff;
}

.footer-info-card p:last-child {
    margin-bottom: 0;
}

.footer-info-card a {
    color: #e6eeff;
    text-decoration: none;
}

.footer-hotline {
    display: block;
    width: 100%;
    text-align: center;
    color: #f0f6ff;
    text-decoration: none;
    border: 1px solid rgba(185, 211, 255, 0.35);
    border-radius: 13px;
    padding: 0.62rem 1rem;
    background: rgba(9, 22, 56, 0.78);
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-hotline:hover {
    color: #ffffff !important;
    border-color: rgba(110, 216, 255, 0.7);
    text-decoration: none;
}

.footer-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-quick-nav a {
    display: flex;
    align-items: center;
    background: rgba(142, 168, 216, 0.2);
    border: 1px solid rgba(141, 176, 252, 0.2);
    color: #f0f5ff;
    font-size: 1.03rem;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none;
    border-radius: 14px;
    min-height: 45px;
    padding: 0.52rem 1rem;
}

.footer-quick-nav a:hover {
    background: rgba(77, 202, 255, 0.24);
    color: #ffffff !important;
    text-decoration: none;
}

.footer-map-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(141, 176, 252, 0.25);
    margin-bottom: 0.7rem;
}

.footer-map-wrap iframe {
    width: 100%;
    height: 188px;
    border: none;
    display: block;
}

.footer-socials {
    display: flex;
    gap: 0.65rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-socials a:nth-child(1) {
    background: #1d6eff;
}

.footer-socials a:nth-child(2) {
    background: #ff3737;
}

.footer-socials a:nth-child(3) {
    background: #52637b;
}

.footer-socials a:hover {
    transform: translateY(-2px);
    color: #fff !important;
}

.footer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.footer-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background: rgba(142, 168, 216, 0.2);
    border-radius: 10px;
    min-height: 42px;
    padding: 0.46rem 0.74rem;
    color: #dde8ff;
}

.footer-stat-row span {
    font-size: 0.98rem;
}

.footer-stat-row strong {
    color: #84d8ff;
    font-size: 1.95rem;
    line-height: 1;
}

.footer-qr-box {
    background: rgba(142, 168, 216, 0.16);
    border: 1px solid rgba(141, 176, 252, 0.2);
    border-radius: 14px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.62rem;
}

.footer-qr-box img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background: #fff;
    padding: 0.22rem;
}

.footer-qr-box p {
    margin: 0;
    color: #e7f0ff;
    font-size: 0.98rem;
    line-height: 1.4;
}

.footer-bottom-bar {
    border-top: 1px solid rgba(127, 159, 218, 0.22);
    margin-top: 0.1rem;
    padding: 1.05rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    color: #a8bad8;
    font-size: 0.99rem;
}

.footer-bottom-bar p {
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.72rem;
}

.footer-bottom-links a {
    color: #a8bad8;
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: #d9ecff !important;
    text-decoration: none;
}

.back-to-top {
    position: fixed;
    right: 28px;
    bottom: 40px;
    width: 52px;
    height: 52px;
    border: 1px solid #b28a45;
    background: #f4e2b5;
    color: #7a4e0f;
    border-radius: 999px;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1050;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #f8ebc9;
}

body.dark-mode .site-footer-modern {
    background: linear-gradient(180deg, #030d20 0%, #020a1a 100%);
}

@media (max-width: 1400px) {
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-col:nth-child(3) {
        border-right: none;
    }

    .footer-col:nth-child(4),
    .footer-col:nth-child(5) {
        border-top: 1px solid rgba(127, 159, 218, 0.18);
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-col {
        border-right: 1px solid rgba(127, 159, 218, 0.18);
        border-top: 1px solid rgba(127, 159, 218, 0.18);
        padding-top: 1rem;
    }

    .footer-col:nth-child(1),
    .footer-col:nth-child(2) {
        border-top: none;
    }

    .footer-col:nth-child(even) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .site-footer-modern {
        padding-top: 1.4rem;
    }

    .site-footer-modern .container {
        width: calc(100% - 16px);
        padding-left: 0;
        padding-right: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col {
        border-right: none;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .footer-col:first-child {
        border-top: none;
    }

    .footer-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 1.25rem;
    }

    .back-to-top {
        width: 46px;
        height: 46px;
        right: 24px;
    }
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item.active {
    color: #999;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Match album cards with news card proportions */
.gallery-grid:not(.gallery-grid-detail) {
    grid-template-columns: 1fr;
}

.gallery-grid:not(.gallery-grid-detail) .gallery-item img {
    height: 180px;
}

@media (min-width: 768px) {
    .gallery-grid:not(.gallery-grid-detail) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .gallery-grid:not(.gallery-grid-detail) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.page-link {
    border-color: var(--border-color);
    color: var(--primary-color);
}

.page-link:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: 4px;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #ffe6e6;
    color: #d63757;
}

.alert-success {
    background-color: #e6f7e6;
    color: #27ae60;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Hero Section */
.hero-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.hero-carousel-inner {
    min-height: 520px;
    background: #1a1a2e;
}

.hero-carousel-item {
    position: relative;
    min-height: 520px;
}

.hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26,26,46,0.75) 0%, rgba(26,26,46,0.4) 50%, rgba(26,26,46,0.2) 100%);
}

.hero-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-content {
    color: #fff;
    max-width: 650px;
    padding-left: 2rem;
    padding-right: 2rem;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-item.active .hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    word-wrap: break-word;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 1.8rem;
    max-width: 580px;
}

.hero-btn {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #e94560;
}

.hero-btn:hover {
    background: transparent;
    color: #e94560;
}

.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.hero-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.hero-indicators button.active {
    background: #e94560;
    width: 30px;
    border-radius: 5px;
}

body.dark-mode .hero-content {
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

body.dark-mode .hero-badge {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .hero-btn {
    background: #d63757;
    border-color: #d63757;
}

body.dark-mode .hero-btn:hover {
    background: transparent;
    color: #d63757;
}

@media (max-width: 768px) {
    .hero-carousel-inner {
        min-height: 320px;
    }

    .hero-carousel-item {
        min-height: 320px;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.6;
    }

    .hero-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-overlay {
        background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(26, 26, 46, 0.5) 100%);
    }
}

@media (max-width: 576px) {
    /* Đẩy nội dung vào 5% mỗi bên trên mobile */
    .container,
    .container-fluid {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }

    .hero-carousel-inner {
        min-height: 240px;
    }

    .hero-carousel-item {
        min-height: 240px;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
        line-height: 1.4;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.7rem;
        margin-bottom: 0.6rem;
    }

    .hero-description {
        font-size: 0.8rem;
        margin-bottom: 0.9rem;
        line-height: 1.4;
    }

    .hero-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.75rem;
    }

    .hero-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 2px;
    }

    .hero-indicators button.active {
        width: 24px;
    }
}

.carousel-inner {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.carousel-item img {
    height: 450px;
    object-fit: cover;
}

.hero-carousel-item .hero-banner-img {
    height: 100% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-trigger {
        width: 48px;
        height: 48px;
    }

    .header-main {
        min-height: 70px;
    }

    .brand-logo {
        width: 42px;
        flex-basis: 42px;
    }

    .site-title {
        font-size: 0.96rem;
        letter-spacing: 0.01em;
    }

    .site-subtitle {
        display: none;
    }

    .main-nav .navbar-nav .nav-link {
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 0.6rem 0.2rem;
    }

    .nav-search {
        margin: 0.7rem 0 0;
        width: 100%;
    }

    .nav-search input {
        width: 100%;
    }

    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.7);
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .carousel-item img {
        height: 250px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .gallery-item img {
        height: 100px;
    }

    .tin-item {
        flex-direction: column;
    }

    .tin-item img {
        width: 100%;
        height: 200px;
    }

    .container-fluid {
        padding: 0;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .header-main {
        min-height: 68px;
    }

    .brand-block {
        gap: 0.5rem;
        width: 100%;
    }

    .brand-logo {
        width: 40px;
        flex: 0 0 40px;
    }

    .site-title {
        font-size: 0.86rem;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .site-subtitle {
        font-size: 0.56rem;
        letter-spacing: 0.08em;
        white-space: normal;
    }

    .section-title h2 {
        font-size: 1rem;
    }

    .card-header {
        font-size: 0.95rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .topbar-item {
        display: block;
        margin-bottom: 0.3rem;
    }
}

/* Utilities */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.text-danger {
    color: var(--primary-color) !important;
}

.bg-danger {
    background-color: var(--primary-color) !important;
}
