/* ==========================================================================
   INVAMAX KNOWLEDGE / RESOURCES HUB CSS - BRAND UI GUIDELINE V1.1
   ========================================================================== */
@import url('./invamax-tokens.css');
@import url('./invamax-components.css');

/* Base font guarantee */
* {
    font-family: var(--iv-font-family) !important;
}

html, body {
    background-color: var(--iv-light) !important;
    background: var(--iv-light) !important;
    color: var(--iv-text) !important;
    font-family: var(--iv-font-family) !important;
    overflow-x: hidden;
}

/* Sharp, bold Lucide SVG Icon Rendering */
svg.lucide,
i[data-lucide] svg,
.lucide {
    stroke-width: 2.2px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    shape-rendering: geometricPrecision;
}

/* Ensure navbar dark style remains intact */
.navbar {
    background: var(--iv-dark) !important;
    border-bottom: 1px solid rgba(221, 229, 225, 0.12) !important;
}

/* Page Container for below-hero content */
.res-page-wrap {
    padding: 28px 24px 70px;
    max-width: var(--iv-container-max);
    margin: 0 auto;
}

/* ==========================================================================
   HERO SECTION (Full screen bleed right edge & Light Theme)
   ========================================================================== */
.res-hero-section-full {
    position: relative;
    width: 100%;
    background: var(--iv-white);
    padding-top: 96px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--iv-border);
    overflow: hidden;
}

/* Background image reaching 100% to the right edge of viewport */
.res-hero-bg-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 55vw;
    min-width: 580px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.res-hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right top;
    opacity: 0.32;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 15%, rgba(0, 0, 0, 0.95) 55%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 15%, rgba(0, 0, 0, 0.95) 55%, black 100%);
}

.res-hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.res-hero-container {
    max-width: var(--iv-container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.res-hero-grid {
    position: relative;
    z-index: 2;
    display: block;
}
.res-hero-left {
    display: flex;
    flex-direction: column;
}
.res-hero-eyebrow {
    font-size: var(--iv-text-caption-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--iv-orange);
    margin-bottom: 6px;
    display: inline-block;
}
.res-hero-title {
    font-size: var(--iv-text-h1-size);
    font-weight: var(--iv-text-h1-weight);
    line-height: var(--iv-text-h1-line-height);
    color: var(--iv-text) !important;
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}
.res-hero-title span {
    color: var(--iv-orange);
    font-weight: var(--iv-text-h1-weight);
}
.res-hero-subtitle {
    font-size: var(--iv-text-body-size);
    font-weight: var(--iv-text-body-weight);
    color: var(--iv-muted);
    margin-bottom: 16px;
    max-width: 800px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Combined Action Bar: Filter Pills + Search Bar on the Same Row across container */
.res-hero-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: nowrap;
    width: 100%;
}

/* Category Filter Pills (Light Theme) */
.res-filter-pills-light {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin: 0;
}
.res-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 15px;
    height: 38px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid var(--iv-border);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
    white-space: nowrap;
}
.res-pill-btn:hover {
    color: var(--iv-orange);
    border-color: var(--iv-orange);
}
.res-pill-btn.active {
    background: var(--iv-orange);
    color: #ffffff;
    border-color: var(--iv-orange);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3);
}
.res-pill-btn i {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
}
.res-pill-btn svg {
    stroke-width: 2.2px !important;
}

/* Search Bar on Same Row with Buttons */
.res-search-wrap-light {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--iv-border);
    border-radius: 50px;
    padding: 3px 4px 3px 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    width: 260px;
    max-width: 100%;
    height: 38px;
    margin-bottom: 0;
    box-sizing: border-box;
}
.res-search-wrap-light i {
    color: var(--iv-muted);
    width: 15px;
    height: 15px;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.res-search-wrap-light i svg {
    stroke: var(--iv-muted) !important;
    stroke-width: 2.2px !important;
    width: 15px !important;
    height: 15px !important;
}
.res-search-wrap-light input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.84rem;
    color: var(--iv-text);
}
.res-search-wrap-light input::placeholder {
    color: var(--iv-muted);
    font-size: 0.82rem;
}
.res-search-submit-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--iv-orange);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(255, 105, 0, 0.35);
    flex-shrink: 0;
}
.res-search-submit-btn:hover {
    background: var(--iv-color-orange-hover);
    transform: scale(1.05);
}
.res-search-submit-btn svg {
    stroke: #ffffff !important;
    stroke-width: 2.5px !important;
    width: 13px !important;
    height: 13px !important;
}

/* Hero Right 3 Feature Cards (Compact Height & Shifted Upward) */
.res-hero-feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-self: flex-start;
    margin-top: 4px;
}
.res-feat-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--iv-border);
    border-radius: var(--iv-radius-card);
    padding: 16px 14px 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.res-feat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}
.res-feat-icon {
    width: 28px !important;
    height: 28px !important;
    color: var(--iv-orange) !important;
    margin-bottom: 8px;
    display: block;
    flex-shrink: 0;
}
.res-feat-icon svg,
svg.res-feat-icon {
    width: 28px !important;
    height: 28px !important;
    stroke: var(--iv-orange) !important;
    stroke-width: 2.2px !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    shape-rendering: geometricPrecision;
}
.res-feat-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--iv-text) !important;
    line-height: 1.3;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.res-feat-desc {
    font-size: 0.775rem;
    color: var(--iv-muted);
    line-height: 1.45;
    margin: 0;
}

/* ==========================================================================
   SECTION HEADER (LIGHT THEME)
   ========================================================================== */
.res-section {
    margin-bottom: 56px;
}
.res-sec-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.res-sec-title-wrap {
    position: relative;
    padding-left: 14px;
}
.res-sec-title-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--iv-orange);
    border-radius: 4px;
}
.res-sec-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--iv-text) !important;
    margin-bottom: 3px;
    line-height: 1.3;
}
.res-sec-desc {
    font-size: 0.88rem;
    color: var(--iv-muted);
    margin: 0;
}
.res-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--iv-orange);
    text-decoration: none;
    transition: all 0.2s ease;
}
.res-view-all:hover {
    color: var(--iv-color-orange-hover);
    transform: translateX(3px);
}
.res-view-all i {
    width: 14px;
    height: 14px;
}

/* 4-Column Grid */
.res-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transition: opacity 0.2s ease;
}

/* ==========================================================================
   PAGINATION (Phân trang: Trang số & Nút tiến / lùi - Góc dưới bên phải)
   ========================================================================== */
.res-pagination-container {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}
.res-pagination-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #ffffff;
    padding: 3px 6px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.res-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.res-page-btn i {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
}
.res-page-btn:hover:not(:disabled):not(.active) {
    background: #f1f5f9;
    color: var(--iv-orange);
    border-color: #e2e8f0;
}
.res-page-btn.active {
    background: var(--iv-orange);
    color: #ffffff !important;
    border-color: var(--iv-orange);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}
.res-page-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}
.res-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 24px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    user-select: none;
}



/* ==========================================================================
   SECTION 1: KHÁM PHÁ THEO CHỦ ĐỀ (Dark Cards on Light Background)
   ========================================================================== */
.topic-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 20px;
    text-decoration: none;
    background: var(--iv-dark);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}
.topic-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transition: transform 0.5s ease, opacity 0.3s ease;
    z-index: 1;
}
.topic-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 20, 16, 0.3) 0%, rgba(8, 20, 16, 0.95) 85%);
    z-index: 2;
}
.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2), 0 0 20px rgba(239, 109, 28, 0.25);
}
.topic-card:hover .topic-card-bg {
    transform: scale(1.08);
    opacity: 0.55;
}
.topic-content {
    position: relative;
    z-index: 3;
}
.topic-icon {
    width: 26px;
    height: 26px;
    color: var(--iv-orange);
    margin-bottom: 12px;
}
.topic-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 6px;
    line-height: 1.3;
}
.topic-desc {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.topic-circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.25s ease;
}
.topic-card:hover .topic-circle-btn {
    background: var(--iv-orange);
    border-color: var(--iv-orange);
    transform: translateX(4px);
}

/* ==========================================================================
   SECTION 2: BÀI VIẾT MỚI & TIÊU BIỂU (Light Cards)
   ========================================================================== */
.art-card-light {
    background: #ffffff;
    border: 1px solid var(--iv-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.art-card-light:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
    text-decoration: none;
    color: inherit;
}
.art-thumb-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--iv-border);
}
.art-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.art-card-light:hover .art-thumb-wrap img {
    transform: scale(1.06);
}
.art-tag-badge-solid {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--iv-orange);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.art-body-light {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.art-title-light {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--iv-text) !important;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}
.art-card-light:hover .art-title-light {
    color: var(--iv-orange) !important;
}
.art-excerpt-light {
    font-size: 0.8rem;
    color: var(--iv-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}
.art-meta-footer-light {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--iv-muted);
    padding-top: 12px;
    border-top: 1px solid var(--iv-color-surface-subtle);
    margin-top: auto;
}
.art-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.art-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.art-arrow-btn {
    color: var(--iv-orange);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}
.art-card-light:hover .art-arrow-btn {
    transform: translateX(3px);
}

/* ==========================================================================
   SECTION 3: TOOLKIT & TÀI LIỆU (Light Cards with Document Preview)
   ========================================================================== */
.tool-card-light {
    background: #ffffff;
    border: 1px solid var(--iv-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.tool-card-light:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
}
.tool-top-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.tool-format-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.fmt-xlsx { background: #e8f5e9; color: #166534; border: 1px solid #bbf7d0; }
.fmt-docx { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.fmt-pdf { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.tool-thumb-box {
    width: 64px;
    height: 76px;
    background: #f1f5f9;
    border: 1px solid var(--iv-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tool-thumb-box:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(239, 109, 28, 0.2);
}
.tool-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.tool-thumb-box:hover .tool-thumb-img {
    transform: scale(1.1);
}
.tool-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.tool-thumb-box:hover .tool-thumb-overlay {
    opacity: 1;
}

.tool-preview-box {
    width: 60px;
    height: 72px;
    background: #f8fafc;
    border: 1px solid var(--iv-border);
    border-radius: 6px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.doc-line {
    height: 3px;
    background: #cbd5e1;
    border-radius: 2px;
}
.doc-line.title {
    width: 70%;
    background: var(--iv-orange);
    height: 4px;
}
.doc-line.w-80 { width: 80%; }
.doc-line.w-60 { width: 60%; }
.doc-line.w-90 { width: 90%; }
.doc-line.w-50 { width: 50%; }

.tool-header-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.tool-title-light {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--iv-text) !important;
    line-height: 1.4;
    margin-bottom: 4px;
}
.tool-card-light:hover .tool-title-light {
    color: var(--iv-orange) !important;
}
.tool-desc-light {
    font-size: 0.8rem;
    color: var(--iv-muted);
    line-height: 1.45;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Action Buttons Container: Xem tài liệu + Tải xuống (Vừa vặn trên 1 dòng) */
.tool-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.tool-btn-preview {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.2;
}
.tool-btn-preview svg,
.tool-btn-preview i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #64748b;
    transition: color 0.2s ease;
}
.tool-btn-preview:hover {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.tool-btn-preview:hover svg,
.tool-btn-preview:hover i {
    color: #2563eb;
}

.tool-download-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--iv-orange);
    background: rgba(239, 109, 28, 0.08);
    border: 1px solid rgba(239, 109, 28, 0.2);
    border-radius: 6px;
    padding: 6px 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.2;
}
.tool-download-btn svg,
.tool-download-btn i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.tool-card-light:hover .tool-download-btn {
    background: var(--iv-orange);
    color: #ffffff !important;
    border-color: var(--iv-orange);
}

/* Modal xem trước tài liệu (Preview Modal) */
.doc-preview-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.doc-preview-modal-backdrop.show {
    display: flex;
    opacity: 1;
}
.doc-preview-modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 980px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { transform: scale(0.96) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.doc-preview-modal-header {
    padding: 14px 22px;
    background: #fafafa;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: nowrap;
}
.doc-preview-modal-header h3 {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--iv-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-preview-modal-header h3 span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-preview-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    margin-left: auto;
}
.doc-preview-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #475569;
    transition: all 0.2s;
    flex-shrink: 0;
    margin: 0 0 0 4px;
}
.doc-preview-modal-close:hover {
    background: #dc2626;
    color: #ffffff;
}
.doc-preview-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex-grow: 1;
}
.doc-preview-banner {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}
.doc-preview-banner img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.doc-preview-info h4 {
    font-size: 15.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.doc-preview-info p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 8px;
}
.doc-preview-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}
.doc-preview-iframe-wrap {
    width: 100%;
    height: 640px;
    max-height: 72vh;
    min-height: 520px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.doc-preview-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}
.preview-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.preview-indicator-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.preview-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.2;
    cursor: pointer;
}
.preview-tool-btn svg, .preview-tool-btn i {
    width: 13.5px;
    height: 13.5px;
}
.preview-tool-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}
.preview-tool-btn.primary {
    background: var(--iv-orange);
    color: #ffffff !important;
    border-color: var(--iv-orange);
}
.preview-tool-btn.primary:hover {
    background: #ea580c;
    border-color: #ea580c;
}
.doc-preview-iframe-wrap iframe {
    width: 100%;
    flex-grow: 1;
    height: 100%;
    border: none;
    background: #525659;
}
.doc-preview-modal-footer {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   SECTION 4: VIDEO HỌC NHANH (Light Cards)
   ========================================================================== */
.vid-card-light {
    background: #ffffff;
    border: 1px solid var(--iv-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    cursor: default;
}
.vid-card-light:hover {
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
}
.vid-thumb-wrap {
    position: relative;
    width: 100%;
    height: 155px;
    overflow: hidden;
    background: var(--iv-text);
}
.vid-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.vid-card-light:hover .vid-thumb-wrap img {
    transform: scale(1.06);
}
.vid-play-btn-circle {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.vid-card-light:hover .vid-play-btn-circle {
    background: var(--iv-orange);
    border-color: var(--iv-orange);
    transform: scale(1.1);
}
.vid-play-btn-circle i {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}
.vid-duration-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: monospace;
}
.vid-body-light {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.vid-title-light {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--iv-text) !important;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vid-card-light:hover .vid-title-light {
    color: var(--iv-orange) !important;
}
.vid-meta-footer-light {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--iv-muted);
    padding-top: 10px;
    border-top: 1px solid var(--iv-color-surface-subtle);
    margin-top: auto;
}
.vid-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1100px) {
    .res-hero-grid {
        grid-template-columns: 1fr;
    }
    .res-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .res-hero-section-full {
        padding-top: 68px;
        padding-bottom: 16px;
    }
    .res-hero-bg-wrap {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        opacity: 0.15;
    }
    .res-hero-eyebrow {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .res-hero-title {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
        margin-bottom: 6px;
    }
    .res-hero-subtitle {
        font-size: 0.85rem;
        line-height: 1.45;
        margin-bottom: 8px;
        white-space: normal;
    }
    .res-page-wrap {
        padding-top: 18px;
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 40px;
    }
    .res-sec-header {
        margin-bottom: 16px !important;
    }
    .res-sec-title {
        font-size: 1.25rem !important;
    }
    .res-sec-desc {
        font-size: 0.82rem !important;
    }
    .res-hero-feature-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .res-grid-4 {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .res-hero-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 10px;
    }
    .res-filter-pills-light {
        flex-wrap: wrap;
        gap: 6px;
    }
    .res-pill-btn {
        padding: 6px 12px;
        font-size: 11.5px;
    }
    .res-search-wrap-light {
        width: 100%;
        height: 38px;
        padding: 0 10px;
    }
    .res-search-wrap-light input {
        font-size: 12px;
    }
    .res-search-submit-btn {
        width: 28px;
        height: 28px;
    }
    /* Compact Cards on Mobile */
    .art-thumb-wrap {
        height: 125px;
    }
    .art-body-light {
        padding: 12px 14px 10px;
    }
    .art-title-light {
        min-height: 0;
        margin-bottom: 4px;
        font-size: 0.92rem;
        line-height: 1.35;
    }
    .art-excerpt-light {
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
        font-size: 0.78rem;
        line-height: 1.45;
    }
    .art-meta-footer-light {
        padding-top: 8px;
    }
    .topic-card {
        min-height: 135px;
        padding: 14px 14px;
    }
    .topic-icon {
        width: 22px;
        height: 22px;
        margin-bottom: 6px;
    }
    .topic-title {
        font-size: 1.02rem;
        margin-bottom: 4px;
    }
    .topic-desc {
        font-size: 0.76rem;
        margin-bottom: 8px;
    }
    .vid-card-light .vid-thumb-wrap {
        height: 130px;
    }
    .vid-body-light {
        padding: 10px 12px;
    }
    .vid-title-light {
        min-height: 0;
        margin-bottom: 6px;
        font-size: 0.88rem;
    }
    .vid-meta-footer-light {
        padding-top: 6px;
    }
    .res-pagination-container {
        margin-top: 12px;
        justify-content: flex-end;
    }
    .res-pagination-wrap {
        gap: 3px;
        padding: 2px 5px;
    }
    .res-page-btn {
        min-width: 22px;
        width: 22px;
        height: 22px;
        font-size: 10.5px;
    }
    .res-page-btn i {
        width: 11px;
        height: 11px;
    }
    .res-page-dots {
        min-width: 12px;
        height: 22px;
    }
}


