/* Base */
/* === HEADER GRADIENT === */
a{
    color: #333;
    text-decoration:none;
}
    a:hover {
        color: rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));
    }
.header-gradient {
    background: linear-gradient(90deg, #2196F3 0%, #7B3FF3 100%);
}

.logo-quochuy {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
/* Gạch dọc giữa logo và tiêu đề */
.divider {
    width: 1px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.6);
    margin-left: 4px;
    margin-right: 8px;
}

.header-title {
    line-height: 1.5;
}

    .header-title .small {
        font-size: 0.78rem;
        letter-spacing: 0.3px;
    }

/* === NAVBAR (trên nền gradient) === */
.navbar {
    background: transparent !important;
    padding: 0;
}

.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
    transition: all 0.2s;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: #fff !important;
        border-bottom: 2px solid #fff;
    }

/* Dropdown */
.dropdown-menu {
    background-color: #ffffff;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    font-size: 0.88rem;
    font-weight: 500;
}

    .dropdown-item:hover,
    .dropdown-item.active {
        background-color: #f2f6ff;
        color: #1464C0;
    }

/* Responsive */
@media (max-width: 1199.98px) {
    .logo-quochuy {
        width: 45px;
        height: 45px;
    }

    .divider {
        height: 35px;
    }

    .header-title {
        font-size: 0.9rem;
    }

    .navbar-nav .nav-link {
        font-size: 0.82rem;
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 991.98px) {
    .logo-quochuy {
        width: 40px;
        height: 40px;
    }

    .divider {
        height: 30px;
    }

    .header-title .small {
        font-size: 0.7rem;
    }

    .navbar-nav .nav-link {
        font-size: 0.95rem;
    }

    .offcanvas {
        width: 260px;
    }
}

@media (max-width: 767.98px) {
    .logo-quochuy {
        width: 36px;
        height: 36px;
    }

    .divider {
        height: 28px;
    }

    .header-title {
        font-size: 0.75rem;
    }

    .header-gradient .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}



/* Hero */
.hero {
    height: 72vh;
    min-height: 520px;
}

@media (max-width: 1399.98px) {
    .hero {
        height: 65vh;
        min-height: 450px;
    }
}

@media (max-width: 1199.98px) {
    .hero {
        height: 60vh;
        min-height: 420px;
    }
}

@media (max-width: 991.98px) {
    .hero {
        height: 55vh;
        min-height: 380px;
    }
}

@media (max-width: 767.98px) {
    .hero {
        height: 50vh;
        min-height: 320px;
    }
}

@media (max-width: 575.98px) {
    .hero {
        height: 45vh;
        min-height: 280px;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: url(/assets/img/sample.jpg) center center;
    background-size: cover;
}

    .hero-bg img {
        filter: brightness(0.85);
        opacity: 0;
    }

    .hero-bg .video-bg {
        position: absolute;
        top: 50%;
        left: 50%;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        transform: translate(-50%, -50%);
        object-fit: cover;
        object-position: center;
    }

    .hero-bg .fallback-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 1;
        filter: brightness(0.85);
    }

.hero-overlay {
    position: absolute;
    inset: 0;
    /*background: linear-gradient(90deg,rgba(0,0,0,0.45),rgba(0,0,0,0.1) 60%);*/
    color: #fff
}

.hero .hero-content h1 {
    line-height: 1.15
}

.hero .btn-outline-light {
    border-color: #fff;
    color: #fff
}

    .hero .btn-outline-light:hover {
        background: #fff;
        color: #111
    }

/* === FEATURED NEWS === */
.featured-news {
    background-color: #fff;
}

.news-highlight img {
    height: 420px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-highlight:hover img {
    transform: scale(1.03);
}

.highlight-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.75) 100%);
}


.news-thumb {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-item:hover h6 {
    color: #1464c0;
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .news-highlight img {
        height: 300px;
    }

    .news-thumb {
        width: 90px;
        height: 60px;
    }
}

@media (max-width: 767.98px) {
    .highlight-overlay {
        padding: 1rem;
    }

        .highlight-overlay h3 {
            font-size: 1rem;
        }

        .highlight-overlay p {
            font-size: 0.8rem;
        }
}

/* === CATEGORY SECTION === */
/* Loại bỏ rule cũ vì đã dùng .thumb-box và .thumb-img để control ảnh */
.category-block .card-news > img:not(.thumb-img) {
    height: 180px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
}

.category-block .card-news h6 {
    color: #1f2937;
}

.category-block .card-news a {
    transition: color 0.2s;
}

    .category-block .card-news a:hover {
        color: #0d6efd;
        text-decoration: none;
    }
.category-block .card-news .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* số dòng muốn hiển thị */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === TIÊU ĐỀ DANH MỤC (style giống Figma) === */
.section-heading {
    color: #2077F3;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 1.25rem;
}

    .section-heading::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #2077F3;
        border-radius: 2px;
    }

/* === ẢNH ĐẠI DIỆN CỐ ĐỊNH TỶ LỆ === */
.thumb-box {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* Tỷ lệ 3:2 (h = 2/3 w) — có thể đổi 75% nếu muốn 4:3 */
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f7fa; /* màu nền nhẹ nếu ảnh lỗi */
}

.thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.thumb-box:hover .thumb-img {
    transform: scale(1.05);
}

/* === SPONSOR SECTION (đã tối ưu) === */
.sponsor-section {
    background-color: #f4f8ff;
    border-top: 2px solid #e0e7ff;
    border-bottom: 2px solid #e0e7ff;
}

.sponsor-item {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 10px;
}

    .sponsor-item img {
        max-width: 100%;
        max-height: 60px;
        object-fit: contain;
        filter: grayscale(0.2);
        transition: all 0.3s ease;
    }

    .sponsor-item:hover {
        background-color: #f9fbff;
        transform: translateY(-3px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

        .sponsor-item:hover img {
            filter: grayscale(0);
        }

@media (max-width: 767.98px) {
    .sponsor-item {
        height: 80px;
    }

        .sponsor-item img {
            max-height: 45px;
        }
}

/* === FOOTER === */
.site-footer {
    background-color: #1464c0;
    color: #fff;
    font-size: 0.9rem;
}

    .site-footer a {
        color: #fff;
        text-decoration: none;
    }

        .site-footer a:hover {
            text-decoration: underline;
        }

.footer-logo {
    width: 52px;
    height: auto;
    flex-shrink: 0;
}

.footer-links a {
    font-size: 0.9rem;
    margin: 0 4px;
    color: #fff;
}

.footer-social a {
    color: #fff;
    margin-left: 10px;
    font-size: 1.3rem;
    transition: color 0.3s;
}

    .footer-social a:hover {
        color: #ffd54f;
    }

.footer-divider {
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 767.98px) {
    .footer-links {
        text-align: center;
    }

    .footer-social {
        text-align: center;
    }
}
/* === FOOTER HEADER STYLE (logo + gạch + tiêu đề) === */
.footer-info {
    position: relative;
}

.footer-info .divider {
    width: 1px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.footer-title div:first-child {
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-title div:last-child {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 700;
}

/* === FOOTER META === */
.footer-meta p {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.footer-meta strong {
    color: #fff;
    font-weight: 600;
}

/* === FOOTER RIGHT COLUMN === */
.footer-right {
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

    .footer-links a {
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.9rem;
        text-decoration: underline;
        transition: color 0.2s;
    }

        .footer-links a:hover {
            color: #fff;
        }

/* --- Mạng xã hội --- */
.footer-social-block .fw-semibold {
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.footer-social .social-icon {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .footer-social .social-icon:hover {
        background-color: #fff;
        color: #1464c0;
        transform: translateY(-2px);
    }

/* Responsive */
@media (max-width: 767.98px) {
    .footer-right {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Sidebar */
.side-thumb {
    width: 80px;
    height: 55px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

    .side-thumb + div h6:hover {
        color: #0d6efd;
        text-decoration: underline;
    }

/* Giới hạn text hiển thị 2 dòng với ellipsis */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .side-thumb {
        width: 70px;
        height: 48px;
    }
}

@media (max-width: 767.98px) {
    .category-block .card-news > img:not(.thumb-img) {
        height: 100%;
    }
}

/* Additional responsive styles */
@media (max-width: 991.98px) {
    .hero .hero-content h1 {
        font-size: 2rem;
    }

    .site-header .main-nav {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-overlay {
        background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 60%);
    }

    .card-project .card-text {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.mt-auto img {
    max-width: 100%;
}

#offcanvasNav .offcanvas-body {
    background: url(/assets/img/sample.jpg) no-repeat center center #1464C0;
    background-repeat: no-repeat;
    background-size: cover;
}
.offcanvas-header {
    display: flex;
    align-items: center;
    padding: var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);
    background: #073eae;
    color: #ffffff;
    padding-left: 30px;
}

.btn-close {
    filter: none;
    opacity: 1;
    --bs-btn-close-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    font-size: 30px;
}

.two-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.three-line {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}