/* =========================================================================
 * NGUOIDANVIET.COM V14.2 - SOFT RED MIX THEME & RESPONSIVE UI
 * Slogan: Người Dân Việt – Kết nối thông tin, gắn kết cộng đồng
 * ========================================================================= */
.ndv-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 1. Top Utility Bar */
.ndv-topbar {
    background: linear-gradient(90deg, #9f1239 0%, #be123c 50%, #e11d48 100%);
    color: #fff1f2;
    font-size: 12.5px;
    padding: 7px 0;
}
.ndv-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.ndv-topbar-left, .ndv-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ndv-google-news-pill {
    background: rgba(255, 255, 255, 0.16);
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.ndv-topbar a {
    color: #ffe4e6;
    font-weight: 500;
}
.ndv-topbar a:hover {
    color: #ffffff;
    text-decoration: underline;
}
.ndv-pill-link {
    background: #ffffff;
    color: #be123c !important;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 700 !important;
}

/* 2. Sticky Header & Collapsible Nav Drawer */
.ndv-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #fecdd3;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.06);
}
.ndv-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}
.ndv-logo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ndv-logo-main {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #be123c, #e11d48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
}
.ndv-logo-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ndv-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ndv-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ndv-icon-btn:hover {
    background: #ffe4e6;
    transform: translateY(-1px);
}
.ndv-lang-badge {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
}
.ndv-nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    border: none;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ndv-nav-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
}
.ndv-hamburger-icon {
    font-size: 16px;
    line-height: 1;
}

/* Collapsible Search & Category Menu Drawers (Hidden by default, shown on click) */
.ndv-collapsible-search,
.ndv-collapsible-nav {
    display: none;
    padding: 14px 0 16px;
    border-top: 1px dashed #fecdd3;
    animation: ndvSlideDown 0.22s ease-out;
}
.ndv-collapsible-search.is-open,
.ndv-collapsible-nav.is-open {
    display: block;
}
@keyframes ndvSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.ndv-search-drawer-form {
    display: flex;
    gap: 10px;
}
.ndv-search-drawer-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    background: #fffafa;
}
.ndv-search-drawer-form input:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}
.ndv-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
}
.ndv-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #881337;
}
.ndv-nav-item:hover,
.ndv-nav-item.is-home {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
}
.ndv-nav-drawer-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #fff1f2;
    font-size: 13px;
    font-weight: 600;
    color: #be123c;
}

/* 3. Breaking News Ticker */
.ndv-breaking-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    padding: 8px 16px;
    margin-top: 18px;
    font-size: 13.5px;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.04);
}
.ndv-ticker-label {
    background: #e11d48;
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* 4. Main 3-Column Editorial Grid */
.ndv-article-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 300px;
    gap: 24px;
    margin-top: 22px;
    align-items: start;
}
.ndv-patriotic-poster {
    background: linear-gradient(145deg, #e11d48 0%, #9f1239 100%);
    color: #ffffff;
    padding: 22px 18px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(190, 18, 60, 0.22);
}
.ndv-poster-star {
    font-size: 38px;
    color: #fde047;
    line-height: 1;
    margin-bottom: 8px;
}
.ndv-patriotic-poster h4 {
    margin: 6px 0 8px;
    font-size: 15px;
    letter-spacing: 0.3px;
}
.ndv-patriotic-poster p {
    font-size: 13px;
    opacity: 0.92;
    margin: 0 0 12px;
}
.ndv-poster-brand {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

/* Cards & Content Blocks */
.ndv-side-block,
.ndv-article-card,
.ndv-feed-card,
.ndv-hero-featured,
.ndv-auth-box {
    background: #ffffff;
    border: 1px solid #f5d0d6;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(159, 18, 57, 0.04);
    margin-bottom: 20px;
}
.ndv-hero-featured {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
    border-color: #fecdd3;
}
.ndv-hero-featured h2 {
    margin: 8px 0 10px;
    font-size: 24px;
    line-height: 1.35;
}
.ndv-feed-card h3 {
    margin: 6px 0 8px;
    font-size: 19px;
    line-height: 1.4;
}
.ndv-feed-card h3 a:hover,
.ndv-hero-featured h2 a:hover {
    color: #e11d48;
}
.ndv-feed-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 10px;
}
.ndv-side-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    color: #be123c;
    border-left: 4px solid #e11d48;
    padding-left: 10px;
    text-transform: uppercase;
}
.ndv-related-vertical-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ndv-related-vertical-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #f1e4e6;
    font-size: 14px;
    font-weight: 600;
}
.ndv-related-vertical-list li:last-child {
    border-bottom: none;
}
.ndv-related-vertical-list a:hover {
    color: #e11d48;
}

/* Most Viewed List */
.ndv-most-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ndv-mv-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #f1e4e6;
}
.ndv-mv-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ndv-mv-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff1f2;
    color: #e11d48;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ndv-mv-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.4;
}
.ndv-mv-info small {
    color: #64748b;
    font-size: 12px;
}

/* Article Detail Elements */
.ndv-breadcrumb {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}
.ndv-cat-label {
    display: inline-block;
    background: #fff1f2;
    color: #e11d48;
    font-weight: 800;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}
.ndv-article-title {
    font-size: 28px;
    line-height: 1.32;
    margin: 10px 0 14px;
    color: #0f172a;
}
.ndv-article-sapo {
    font-size: 16.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 18px;
}
.ndv-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #fffafa;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    margin: 16px 0;
}
.ndv-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ndv-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ndv-author-name {
    font-weight: 800;
    font-size: 15px;
    color: #0f172a;
}
.ndv-author-meta {
    font-size: 12.5px;
    color: #64748b;
}
.ndv-btn-follow,
.ndv-btn-tts-play,
.ndv-btn-primary {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.22);
}
.ndv-btn-follow:hover,
.ndv-btn-tts-play:hover,
.ndv-btn-primary:hover {
    opacity: 0.94;
}
.ndv-article-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 14px;
}
.ndv-tts-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 16px 0;
}
.ndv-tts-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ndv-tts-left small {
    display: block;
    color: #64748b;
    font-size: 12px;
}
.ndv-tts-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ndv-tts-lang {
    font-size: 12px;
    font-weight: 700;
    color: #be123c;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
}
.ndv-partner-banner-box {
    background: linear-gradient(90deg, #fff1f2, #ffe4e6);
    border: 1px dashed #fda4af;
    color: #9f1239;
    text-align: center;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    margin: 14px 0;
}
.ndv-quick-summary-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 10px;
    margin: 16px 0;
}
.ndv-qs-badge {
    font-weight: 800;
    font-size: 12px;
    color: #b45309;
    margin-bottom: 6px;
}
.ndv-article-body {
    font-size: 16.5px;
    line-height: 1.75;
    color: #1e293b;
}
.ndv-reaction-box {
    background: #fffafa;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    padding: 16px;
    margin: 22px 0;
}
.ndv-reaction-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 13px;
    margin-bottom: 12px;
}
.ndv-reaction-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.ndv-react-btn {
    background: #ffffff;
    border: 1px solid #fecdd3;
    padding: 10px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ndv-react-btn:hover {
    background: #fff1f2;
    border-color: #e11d48;
    color: #e11d48;
}
.ndv-share-tags-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
}
.ndv-tag-chip {
    display: inline-block;
    background: #fff1f2;
    color: #be123c;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    margin: 3px 4px 3px 0;
}
.ndv-share-btns {
    display: flex;
    gap: 8px;
}
.ndv-share-btns button {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

/* 5. ĐỐI TÁC CHÍNH THỨC & BÁO CHÍ (Auto-Marquee Right-to-Left) */
.ndv-partners-section {
    margin: 36px auto 24px;
}
.ndv-partners-card {
    background: #ffffff;
    border: 1px solid #fecdd3;
    border-radius: 20px;
    padding: 26px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(190, 18, 60, 0.06);
    overflow: hidden;
}
.ndv-partners-heading {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.ndv-marquee-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.ndv-marquee-track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content;
    animation: ndvMarqueeRightToLeft var(--marquee-duration, 18s) linear infinite;
}
.ndv-marquee-track:hover {
    animation-play-state: paused;
}
@keyframes ndvMarqueeRightToLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.ndv-partner-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffafa;
    border: 1px solid #ffe4e6;
    border-radius: 14px;
    padding: 10px 22px;
    height: 74px;
    min-width: 190px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.ndv-partner-slide:hover {
    transform: translateY(-2px);
    border-color: #e11d48;
}
.ndv-partner-slide img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

/* 6. Footer & Newsletter (Clean Layout, Zero Overlap with Floating Widgets) */
.ndv-footer {
    background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
    border-top: 2px solid #fecdd3;
    padding: 36px 0 110px;
    margin-top: 28px;
}
.ndv-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 28px;
    align-items: center;
}
.ndv-footer-logo {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    color: #be123c;
}
.ndv-footer-slogan {
    margin: 6px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #e11d48;
}
.ndv-footer-copy {
    margin: 0;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
}
.ndv-contact-line {
    font-size: 14px;
    margin-bottom: 8px;
    color: #1e293b;
}
.ndv-newsletter {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    max-width: 420px;
}
.ndv-newsletter input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #fda4af;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    outline: none;
}
.ndv-newsletter button {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    border: none;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

/* 7. Floating Zalo/Chat & Mobile Bottom Bar */
.ndv-floating-widgets {
    position: fixed;
    right: 16px;
    bottom: 92px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 990;
}
.ndv-float-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(190, 18, 60, 0.28);
}
.ndv-float-btn.zalo {
    background: #0284c7;
}
.ndv-float-btn.msg {
    background: #e11d48;
    font-size: 18px;
}
.ndv-mobile-bottom-nav {
    display: none;
}

/* Auth & Comment Forms */
.ndv-auth-box {
    max-width: 460px;
    margin: 36px auto;
}
.ndv-auth-box input,
.ndv-comments-section textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    margin: 6px 0 14px;
    font-size: 14px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .ndv-article-layout,
    .ndv-footer-grid {
        grid-template-columns: 1fr;
    }
    .ndv-reaction-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    .ndv-logo-main {
        font-size: 20px;
    }
    .ndv-logo-sub {
        font-size: 10.5px;
        max-width: 210px;
    }
    .ndv-footer {
        padding-bottom: 135px;
    }
    .ndv-newsletter {
        padding-right: 58px; /* Chừa khoảng trống bên phải để không bao giờ đụng nút Zalo/Chat */
    }
    .ndv-mobile-bottom-nav {
        position: fixed;
        bottom: 12px;
        left: 14px;
        right: 14px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        border: 1px solid #fecdd3;
        border-radius: 999px;
        display: flex;
        justify-content: space-around;
        padding: 9px 10px;
        box-shadow: 0 10px 28px rgba(159, 18, 57, 0.16);
        z-index: 995;
    }
    .ndv-mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 11.5px;
        font-weight: 700;
        color: #881337;
    }
}
