:root {
    --sgu-blue: #002b5b;
    --sgu-cyan: #17a2b8;
    --sgu-light-blue: #e8f4f8;
    --sgu-dark: #002b5b;
    --sgu-gold: #ffc107;
}
.text-primary {
    color: #002b5b !important;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f9;
    color: #333;
}

/* TOPBAR & HEADER */
.topbar {
    background-color: var(--sgu-dark);
    color: #e0e0e0;
    font-size: 0.85rem;
    padding: 6px 0;
}

    .topbar a {
        color: #e0e0e0;
        text-decoration: none;
    }

        .topbar a:hover {
            color: var(--sgu-gold);
        }

.header-main {
    background: #ffffff;
    border-bottom: 3px solid var(--sgu-blue);
    padding: 12px 0;
}

.sgu-logo {
    height: 75px;
    width: auto;
}

.header-title-main {
    color: var(--sgu-dark);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
}

.header-title-sub {
    color: var(--sgu-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* MENU ĐA CẤP HOVER */
.navbar-sgu {
    background-color: var(--sgu-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 0;
}

    .navbar-sgu .nav-link {
        color: #ffffff !important;
        font-weight: 600;
        padding: 14px 18px !important;
        text-transform: uppercase;
        font-size: 0.9rem;
        transition: background 0.2s;
    }

        .navbar-sgu .nav-link:hover, .navbar-sgu .nav-item.show > .nav-link {
            background-color: var(--sgu-dark);
            color: var(--sgu-gold) !important;
        }

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}

.dropdown-item {
    font-weight: 500;
    padding: 10px 20px;
    color: #333;
    font-size: 0.9rem;
}

    .dropdown-item:hover {
        background-color: var(--sgu-light-blue);
        color: var(--sgu-blue);
    }

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -1px;
        border-radius: 0 8px 8px 8px;
    }

/* XỬ LÝ HOVER MENU TRÊN DESKTOP */
@media (min-width: 992px) {
    .navbar-sgu .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeIn 0.2s ease-in-out;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        animation: fadeIn 0.2s ease-in-out;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BANNER SLIDESHOW CHỈ CÓ ẢNH */
.hero-banner-slider {
    max-height: 480px;
    overflow: hidden;
    background-color: #000;
}

    .hero-banner-slider .carousel-item img {
        width: 100%;
        height: 480px;
        object-fit: cover;
    }

@media (max-width: 768px) {
    .hero-banner-slider,
    .hero-banner-slider .carousel-item img {
        height: 250px;
    }
}

/* CỔNG LIÊN KẾT */
.quick-links {
    margin-top: -35px;
    position: relative;
    z-index: 10;
}

.link-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--sgu-dark);
    display: block;
    border-bottom: 4px solid var(--sgu-blue);
}

    .link-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.18);
        color: var(--sgu-blue);
        border-bottom-color: var(--sgu-gold);
    }

    .link-card i {
        font-size: 2.2rem;
        color: var(--sgu-blue);
        margin-bottom: 10px;
    }

/* TIN NỔI BẬT & SỰ KIỆN */
.featured-news-carousel {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    min-height: 380px;
}

    .featured-news-carousel .carousel-inner,
    .featured-news-carousel .carousel-item {
        height: 100%;
    }

    .featured-news-carousel img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }

.carousel-caption {
    background: rgba(0, 43, 91, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 18px;
    bottom: 20px;
    left: 5%;
    right: 5%;
    text-align: left;
}

.news-sidebar-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.news-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: #333;
    flex-grow: 1;
    margin-bottom: 10px;
}

    .news-sidebar-item:last-child {
        margin-bottom: 0;
    }

    .news-sidebar-item:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        color: var(--sgu-blue);
    }

    .news-sidebar-item img {
        width: 95px;
        height: 68px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

/* KHU VỰC TUYỂN SINH CHIA ĐÔI */
.admission-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    height: 100%;
    border-top: 5px solid var(--sgu-blue);
}

    .admission-box.postgraduate {
        border-top-color: var(--sgu-cyan);
    }

.admission-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
    text-decoration: none;
    color: #333;
    align-items: center;
}

    .admission-item:last-child {
        border-bottom: none;
    }

    .admission-item:hover h6 {
        color: var(--sgu-blue);
    }

.admission-date {
    background: var(--sgu-light-blue);
    color: var(--sgu-blue);
    padding: 18px 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 65px;
    font-weight: 700;
    line-height: 1.1;
}

    .admission-date span {
        display: block;
        font-size: 0.75rem;
        font-weight: 400;
        color: #666;
    }

/* THƯ VIỆN MEDIA HOẠT ĐỘNG POPUP */
.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    background: #fff;
    cursor: pointer;
}

    .media-card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    .media-card:hover img {
        transform: scale(1.08);
    }

.media-play-icon {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.media-card:hover .media-play-icon {
    transform: translate(-50%, -50%) scale(1.15);
    color: #ff0000;
}

/* MODAL MEDIA CUSTOM */
.modal-body-gallery {
    padding: 0;
    background: #000;
}

    .modal-body-gallery img {
        max-height: 80vh;
        object-fit: contain;
        margin: 0 auto;
    }

/* ĐỐI TÁC CHẠY SLIDE */
.partner-logo {
    transition: all 0.3s ease;
    max-height: 55px;
    object-fit: contain;
}

    .partner-logo:hover {
        filter: grayscale(0%);
        opacity: 1;
    }

/* FOOTER */
footer {
    background-color: var(--sgu-dark);
    color: #d0d7de;
    padding-top: 50px;
    padding-bottom: 20px;
}

    footer h5 {
        color: #ffffff;
        border-left: 4px solid var(--sgu-gold);
        padding-left: 10px;
        margin-bottom: 20px;
        font-weight: 700;
    }

.stat-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #0066ff; /* Thay bằng mã màu chủ đạo của bạn */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

    .back-to-top:hover {
        background-color: #0040a8;
        color: #ffffff;
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    }

    /* Hiện nút khi cuộn xuống */
    .back-to-top.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* Tối ưu kích thước trên màn hình di động */
@media (max-width: 767.98px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
.partner-scroll-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.partner-scroll-track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    animation: scrollPartners 20s linear infinite;
}

.partner-scroll-wrapper:hover .partner-scroll-track {
    animation-play-state: paused; /* Tạm dừng khi di chuột vào */
}

.partner-item {
    flex: 0 0 auto;
    width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo {
    max-height: 60px;
    width: auto;
    filter: grayscale(30%);
    transition: all 0.3s ease;
}

    .partner-logo:hover {
        filter: grayscale(0%);
        transform: scale(1.05);
    }

@keyframes scrollPartners {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* BREADCRUMB HEADER */
.page-header-banner {
    background: linear-gradient(135deg, var(--sgu-dark) 0%, var(--sgu-blue) 100%);
    color: #ffffff;
    padding: 25px 0;
    margin-bottom: 30px;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--sgu-gold);
}

/* ARTICLE DETAIL STYLES */
.article-category {
    display: inline-block;
    background: var(--sgu-light-blue);
    color: var(--sgu-blue);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--sgu-dark);
    margin-top: 12px;
}

.article-meta {
    font-size: 0.88rem;
    color: #6c757d;
    border-bottom: 1px solid #eef2f5;
    padding-bottom: 15px;
}

.article-sapo {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-body p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0 5px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-body figcaption {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    font-style: italic;
    margin-bottom: 20px;
}

.article-body blockquote {
    border-left: 4px solid var(--sgu-blue);
    padding: 15px 20px;
    background: var(--sgu-light-blue);
    font-style: italic;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    color: var(--sgu-dark);
}

/* SOCIAL SHARE BUTTONS */
.social-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

    .social-share-btn:hover {
        transform: scale(1.1);
        color: #fff;
    }

.btn-facebook {
    background-color: #1877f2;
}

.btn-zalo {
    background-color: #0068ff;
}

.btn-twitter {
    background-color: #1da1f2;
}

.btn-copy {
    background-color: #6c757d;
}

/* TAGS & AUTHOR BOX */
.article-tags .badge-tag {
    display: inline-block;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 15px;
    margin-right: 6px;
    margin-bottom: 6px;
    background-color: var(--sgu-light-blue);
    color: var(--sgu-blue);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

    .article-tags .badge-tag:hover {
        background-color: var(--sgu-blue);
        color: #fff;
    }

/* SIDEBAR WIDGETS */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    border: 1px solid #eef2f5;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sgu-dark);
    border-left: 4px solid var(--sgu-blue);
    padding-left: 10px;
    margin-bottom: 18px;
}

.recent-post-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #e9ecef;
    text-decoration: none;
    color: #333;
}

    .recent-post-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.recent-post-img {
    width: 85px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.recent-post-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-item:hover .recent-post-title {
    color: var(--sgu-blue);
}
.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f5;
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

.news-card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

    .news-card-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.news-card:hover .news-card-img-wrapper img {
    transform: scale(1.08);
}

.news-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .news-card-title a {
        color: #2c3e50;
        text-decoration: none;
        transition: color 0.2s;
    }

        .news-card-title a:hover {
            color: var(--sgu-blue);
        }

.news-card-excerpt {
    color: #6c757d;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.8rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* FEATURED POST (TIN NỔI BẬT ĐẦU TRANG) */
.featured-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    margin-bottom: 35px;
    border: 1px solid #eef2f5;
}

.featured-post-img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

/* SIDEBAR WIDGETS */
.sidebar-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    border: 1px solid #eef2f5;
}

.sidebar-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sgu-dark);
    border-left: 4px solid var(--sgu-blue);
    padding-left: 10px;
    margin-bottom: 18px;
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #e9ecef;
    text-decoration: none;
    color: #333;
}

    .sidebar-post-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .sidebar-post-item img {
        width: 80px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .sidebar-post-item h6 {
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.35;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .sidebar-post-item:hover h6 {
        color: var(--sgu-blue);
    }

/* TAG CLOUD */
.tag-cloud a {
    display: inline-block;
    background: var(--sgu-light-blue);
    color: var(--sgu-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin: 0 4px 8px 0;
    transition: all 0.2s;
}

    .tag-cloud a:hover {
        background: var(--sgu-blue);
        color: #ffffff;
    }
.page-header-banner {
    background: #ffffff;
    padding: 10px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

    .page-header-banner .breadcrumb {
        font-size: 0.95rem;
        font-weight: 500;
    }

    .page-header-banner .breadcrumb-item a {
        color: #64748b;
        text-decoration: none;
    }

        .page-header-banner .breadcrumb-item a:hover {
            color: #2563eb;
        }

        .page-header-banner .breadcrumb-item a i {
            color: #2563eb;
        }

    .page-header-banner .breadcrumb-item.active {
        color: #0f172a;
        font-weight: 600;
    }

    .page-header-banner .breadcrumb-item + .breadcrumb-item::before {
        color: #cbd5e1;
    }