﻿
.go-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: #1c2580;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    transform: translateY(10px);
    z-index: 9999;
}

.go-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

    .go-top-btn:hover {
        background: #0d73df;
    }


.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .bd-placeholder-img-lg {
        font-size: 3.5rem;
    }
}

.b-example-divider {
    width: 100%;
    height: 3rem;
    background-color: #0000001a;
    border: solid rgba(0, 0, 0, 0.15);
    border-width: 1px 0;
    box-shadow: inset 0 0.5em 1.5em #0000001a, inset 0 0.125em 0.5em #00000026;
}

.b-example-vr {
    flex-shrink: 0;
    width: 1.5rem;
    height: 100vh;
}

.bi {
    vertical-align: -0.125em;
    fill: currentColor;
}

.nav-scroller {
    position: relative;
    z-index: 2;
    height: 2.75rem;
    overflow-y: hidden;
}

    .nav-scroller .nav {
        display: flex;
        flex-wrap: nowrap;
        padding-bottom: 1rem;
        margin-top: -1px;
        overflow-x: auto;
        text-align: center;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

.btn-bd-primary {
    --bd-violet-bg: #712cf9;
    --bd-violet-rgb: 112.520718, 44.062154, 249.437846;
    --bs-btn-font-weight: 600;
    --bs-btn-color: var(--bs-white);
    --bs-btn-bg: var(--bd-violet-bg);
    --bs-btn-border-color: var(--bd-violet-bg);
    --bs-btn-hover-color: var(--bs-white);
    --bs-btn-hover-bg: #6528e0;
    --bs-btn-hover-border-color: #6528e0;
    --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
    --bs-btn-active-color: var(--bs-btn-hover-color);
    --bs-btn-active-bg: #5a23c8;
    --bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
    z-index: 1500;
}

    .bd-mode-toggle .bi {
        width: 1em;
        height: 1em;
    }

    .bd-mode-toggle .dropdown-menu .active .bi {
        display: block !important;
    }

.sticky-menu {
    position: relative;
    z-index: 1000;
    transition: box-shadow 0.2s;
}

    .sticky-menu.is-stuck {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: 0 2px 12px rgba(0,0,0,0.45);
    }

body.nav-stuck {
    padding-top: var(--nav-height, 70px);
}

/* Mobile off-canvas sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

    .sidebar-overlay.active {
        display: block;
    }

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #212529;
    z-index: 1050;
    transition: left 0.3s ease;
    padding: 1rem 0;
    overflow-y: auto;
}

    .mobile-sidebar.open {
        left: 0;
    }

    .mobile-sidebar .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 1rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 0.5rem;
    }

        .mobile-sidebar .sidebar-header span {
            color: #fff;
            font-weight: 600;
            font-size: 1.1rem;
        }

    .mobile-sidebar .close-btn {
        background: none;
        border: none;
        color: #adb5bd;
        font-size: 1.5rem;
        cursor: pointer;
        line-height: 1;
    }

        .mobile-sidebar .close-btn:hover {
            color: #fff;
        }

    .mobile-sidebar .nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1.25rem;
        color: #adb5bd;
        text-decoration: none;
        font-size: 0.95rem;
    }

        .mobile-sidebar .nav-link:hover,
        .mobile-sidebar .nav-link.active {
            color: #fff;
            background: rgba(255,255,255,0.08);
        }

        .mobile-sidebar .nav-link svg {
            flex-shrink: 0;
        }

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
    }

    .desktop-nav-links {
        display: none !important;
    }
}

/* Sticky nav scrollable on desktop */
.desktop-nav-links {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .desktop-nav-links::-webkit-scrollbar {
        display: none;
    }

    .desktop-nav-links > li {
        flex-shrink: 0;
    }

    /* Icon on top, label below */
    .desktop-nav-links .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 10px;
        font-size: 0.72rem;
        line-height: 1.2;
        white-space: nowrap;
        color: rgba(255,255,255,.75);
    }

        .desktop-nav-links .nav-link svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .desktop-nav-links .nav-link:hover {
            color: #fff !important;
            background: rgba(255,255,255,.12);
            border-radius: 6px;
        }

/* Mega menu */
.mega-menu-wrapper {
    position: static;
}

    .mega-menu-wrapper:hover .mega-menu,
    .mega-menu-wrapper:focus-within .mega-menu {
        display: block;
    }

.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #0d1b4b 0%, #0a1535 100%);
    border-top: 3px solid #42a5f5;
    z-index: 999;
    padding: 1.5rem 2rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

    .mega-menu .mega-col h6 {
        color: #64b5f6;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 0.75rem;
        font-weight: 700;
        border-bottom: 1px solid rgba(100,181,246,.2);
        padding-bottom: 4px;
    }

    .mega-menu .mega-col a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: rgba(255,255,255,.65);
        text-decoration: none;
        font-size: 0.85rem;
        padding: 0.28rem 0;
        transition: color 0.15s, padding-left 0.15s;
    }

        .mega-menu .mega-col a:hover {
            color: #fff;
            padding-left: 4px;
        }

        .mega-menu .mega-col a svg {
            flex-shrink: 0;
        }

/* Apps mega menu — two-panel layout */
.apps-left-panel h6 {
    color: #64b5f6;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100,181,246,.2);
    padding-bottom: 4px;
}

.apps-left-panel a {
    display: block;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color 0.15s, padding-left 0.15s;
}

    .apps-left-panel a:hover {
        color: #fff;
        padding-left: 4px;
    }

.apps-right-panel h6 {
    color: #64b5f6;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(100,181,246,.2);
    padding-bottom: 4px;
}

.apps-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 90px;
    padding: 0.75rem 0.5rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(100,181,246,.15);
    border-radius: 10px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

    .apps-icon-card:hover {
        background: rgba(66,165,245,.2);
        border-color: #42a5f5;
        color: #fff;
    }

    .apps-icon-card svg {
        flex-shrink: 0;
    }

/* Search dropdown */
.nav-search-wrap {
    position: relative;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    background: linear-gradient(180deg,#0d1b4b,#0a1535);
    border: 1px solid rgba(100,181,246,.2);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.6);
    z-index: 1200;
    overflow: hidden;
}

    .search-dropdown.open {
        display: block;
    }

.search-dropdown-inner {
    padding: 14px;
}

.search-dropdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-dropdown-input {
    flex: 1;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(100,181,246,.25);
    border-radius: 6px;
    color: #fff;
    padding: 7px 12px;
    font-size: .85rem;
    outline: none;
    min-width: 0;
}

    .search-dropdown-input::placeholder {
        color: rgba(255,255,255,.35);
    }

    .search-dropdown-input:focus {
        border-color: #42a5f5;
        background: rgba(255,255,255,.12);
    }

.search-dropdown-btn {
    background: linear-gradient(135deg,#1565c0,#42a5f5);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity .15s;
}

    .search-dropdown-btn:hover {
        opacity: .85;
    }

.search-dropdown-select {
    flex: 1;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(100,181,246,.2);
    border-radius: 6px;
    color: rgba(255,255,255,.75);
    padding: 6px 10px;
    font-size: .78rem;
    outline: none;
    cursor: pointer;
    min-width: 0;
}

    .search-dropdown-select:focus {
        border-color: #42a5f5;
    }

    .search-dropdown-select option {
        background: #0d1b4b;
        color: #fff;
    }

.search-dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(100,181,246,.15);
}

.search-tag-label {
    font-size: .68rem;
    color: rgba(255,255,255,.4);
    white-space: nowrap;
}

.search-tag {
    font-size: .7rem;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.65);
    border: 1px solid rgba(100,181,246,.2);
    border-radius: 12px;
    padding: 2px 10px;
    text-decoration: none;
    transition: background .15s, color .15s;
}

    .search-tag:hover {
        background: #1565c0;
        color: #fff;
        border-color: #42a5f5;
    }

/* Right-side icon buttons */
.nav-icon-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.75);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    line-height: 1.2;
    transition: color 0.15s;
}

    .nav-icon-btn:hover {
        color: #fff;
    }

/* User dropdown */
.user-menu-wrapper {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: linear-gradient(180deg,#0d1b4b,#0a1535);
    border: 1px solid rgba(100,181,246,.2);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 12px 32px rgba(0,0,0,.55);
    z-index: 1100;
    overflow: hidden;
}

.user-menu-wrapper:hover .user-dropdown,
.user-menu-wrapper:focus-within .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}

    .user-dropdown a:hover {
        background: rgba(66,165,245,.15);
        color: #fff;
    }

.user-dropdown .dropdown-divider {
    border-top: 1px solid rgba(100,181,246,.15);
    margin: 0;
}

/* User avatar */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0d6efd;
}

/* Featured section */
.featured-section {
    --fnc-h: 320px;
}

    /* Slider */
    .featured-section .carousel,
    .featured-section .carousel-inner,
    .featured-section .carousel-item {
        height: var(--fnc-h);
    }

/* Portrait news cards */
.fnc-card {
    display: flex;
    flex-direction: column;
    height: var(--fnc-h);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: box-shadow 0.15s;
}

    .fnc-card:hover {
        box-shadow: 0 3px 14px rgba(0,0,0,0.13);
    }

.fnc-img {
    flex: 0 0 62%;
    overflow: hidden;
}

    .fnc-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s;
    }

.fnc-card:hover .fnc-img img {
    transform: scale(1.05);
}

.fnc-body {
    flex: 1 1 auto;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fnc-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #6c757d;
}

.fnc-text {
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Banner row */
.banner-img {
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    transition: opacity 0.2s;
}

.banner-item:hover .banner-img {
    opacity: 0.88;
}

.banner-links {
    font-size: 0.82rem;
    line-height: 2;
}

    .banner-links a {
        color: var(--bs-body-color);
        text-decoration: none;
        white-space: nowrap;
    }

        .banner-links a:hover {
            color: #0d6efd;
            text-decoration: underline;
        }

/* News ticker */
.news-ticker {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    overflow: hidden;
    height: 34px;
    font-size: 0.82rem;
}

[data-bs-theme="dark"] .news-ticker {
    background: #1a1d20;
    border-color: rgba(255,255,255,0.1);
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    background: #dc3545;
    color: #fff;
    padding: 0 14px;
    height: 100%;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ticker-track-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-item a {
    color: var(--bs-body-color);
    text-decoration: none;
    padding: 0 4px;
}

    .ticker-item a:hover {
        color: #dc3545;
        text-decoration: underline;
    }

.ticker-sep {
    color: #adb5bd;
    padding: 0 10px;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Social bar */
.social-bar-item {
    padding: 0 1rem;
    border-right: 1px solid var(--bs-border-color);
}

    .social-bar-item:last-child {
        border-right: none;
    }

.social-bar-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: #fff;
}

.facebook-icon {
    background: #1877f2;
}

.youtube-icon {
    background: #ff0000;
}

.twitter-icon {
    background: #000;
}

.instagram-icon {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.tiktok-icon {
    background: #010101;
}

.social-bar-text {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.social-bar-btn {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 3px 14px;
    border-radius: 3px;
}

/* News list items */
.news-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

    .news-list-item:last-child {
        border-bottom: none;
    }

    .news-list-item img {
        width: 100px;
        height: 70px;
        object-fit: cover;
        border-radius: 5px;
        flex-shrink: 0;
    }

.news-list-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-list-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #6c757d;
}

.news-list-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.news-list-item:hover .news-list-title {
    color: #0d6efd;
}

/* Ad banners */
.ad-banner-dark {
    background: #8b1a4a;
    color: #fff;
    border-radius: 8px;
    min-height: 160px;
    padding: 1rem;
}

.ad-banner-orange {
    background: #e67e22;
    color: #fff;
    border-radius: 8px;
    min-height: 160px;
    padding: 1rem;
}

.ad-banner-dark:hover {
    opacity: .92;
}

.ad-banner-orange:hover {
    opacity: .92;
}

/* 6-card news grid */
.news-grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    overflow: hidden;
    color: var(--bs-body-color);
    height: 100%;
    transition: box-shadow 0.15s;
}

    .news-grid-card:hover {
        box-shadow: 0 3px 14px rgba(0,0,0,0.12);
    }

.news-grid-img {
    overflow: hidden;
}

    .news-grid-img img {
        width: 100%;
        height: 130px;
        object-fit: cover;
        display: block;
        transition: transform 0.3s;
    }

.news-grid-card:hover .news-grid-img img {
    transform: scale(1.05);
}

.news-grid-body {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.news-grid-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #6c757d;
}

.news-grid-title {
    font-size: 0.78rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-grid-card:hover .news-grid-title {
    color: #0d6efd;
}

.banner-spacing {
    margin-top: 30px;
    margin-bottom: 30px;
}
