/* ==========================================================================
   VIỆT NAM HẠNH PHÚC — CATEGORY PAGE STYLESHEET (category.css)
   Inspired by NYT Business Section Layout + Dribbble Aesthetics
   Fully responsive with Light & Dark Theme inheritance
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CATEGORY HERO HEADER & TOPICS BAR
   -------------------------------------------------------------------------- */

.cat-page-wrapper {
    padding: 24px 0;
    background-color: var(--bg-primary);
    min-height: 100vh;
    position: relative;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* Category Breadcrumbs */
.cat-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

    .cat-breadcrumb a {
        color: var(--text-secondary);
        font-weight: 500;
        transition: color 0.2s ease;
    }

        .cat-breadcrumb a:hover {
            color: var(--brand-accent);
        }

.cat-breadcrumb-sep {
    opacity: 0.45;
    font-size: 0.75rem;
}

.cat-breadcrumb-current {
    color: var(--brand-accent);
    font-weight: 600;
}

/* Category Hero Header Banner */
.cat-header-banner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .cat-header-banner::before {
        content: "";
        position: absolute;
        top: -50px;
        right: -50px;
        width: 220px;
        height: 220px;
        background: radial-gradient(circle, rgba(234, 76, 137, 0.16) 0%, rgba(108, 92, 231, 0.08) 60%, transparent 80%);
        border-radius: 50%;
        pointer-events: none;
        filter: blur(30px);
    }

.cat-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.cat-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(234, 76, 137, 0.1);
    color: var(--brand-accent);
    border: 1px solid rgba(234, 76, 137, 0.25);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cat-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-accent);
    box-shadow: 0 0 10px var(--brand-accent);
    animation: catPulse 2s infinite ease-in-out;
}

@keyframes catPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }
}

.cat-stats-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cat-stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .cat-stats-item svg {
        width: 15px;
        height: 15px;
        stroke: var(--brand-accent);
    }

.cat-header-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    /*margin-bottom: 14px;*/
    letter-spacing: -0.02em;
}

.cat-header-desc {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   2. SECTION CATEGORY FEATURED NEWS GRID (3-Column Layout from Reference)
   -------------------------------------------------------------------------- */

.cat-featured-section {
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cat-featured-3col-grid {
    display: grid;
    grid-template-columns: 1fr 1.9fr 1.1fr;
    gap: 16px;
    align-items: stretch;
}

/* ==========================================
   CỘT 1 (LEFT COLUMN): 2 bài viết dạng cột dọc
   ========================================== */
.cat-feat-left-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cat-feat-vcard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-feat-vcard-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary-alt);
    position: relative;
}

.cat-feat-vcard-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-feat-vcard:hover .cat-feat-vcard-thumb {
    transform: scale(1.05);
}

.cat-feat-vcard-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.2s ease;
}

    .cat-feat-vcard-title a {
        color: inherit;
        text-decoration: none;
    }

.cat-feat-vcard:hover .cat-feat-vcard-title a {
    color: var(--brand-accent);
}

.cat-feat-divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
    margin: 2px 0;
}

/* ==========================================
   CỘT 2 (CENTER COLUMN): Bài tiêu điểm chính nổi bật lớn nhất
   ========================================== */
.cat-feat-center-col {
    display: flex;
    flex-direction: column;
}

.cat-feat-lead-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cat-feat-lead-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg-secondary-alt);
}

.cat-feat-lead-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-feat-lead-card:hover .cat-feat-lead-thumb {
    transform: scale(1.04);
}

.cat-feat-lead-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(234, 76, 137, 0.12);
    color: var(--brand-accent);
    border: 1px solid rgba(234, 76, 137, 0.28);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    width: fit-content;
}

    .cat-feat-lead-tag .cat-pulse-dot {
        width: 6px;
        height: 6px;
    }

.cat-feat-lead-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cat-feat-lead-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.015em;
    transition: color 0.2s ease;
}

    .cat-feat-lead-title a {
        color: inherit;
        text-decoration: none;
    }

.cat-feat-lead-card:hover .cat-feat-lead-title a {
    color: var(--brand-accent);
}

.cat-feat-lead-excerpt {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================
   CỘT 3 (RIGHT COLUMN): 4 bài viết dòng ngang
   ========================================== */
.cat-feat-right-col {
    display: flex;
    flex-direction: column;
}

.cat-feat-hcard {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.2s ease;
}

    .cat-feat-hcard:first-child {
        padding-top: 0;
    }

    .cat-feat-hcard:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .cat-feat-hcard:hover {
        transform: translateX(2px);
    }

.cat-feat-hcard-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.42;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.2s ease;
}

    .cat-feat-hcard-title a {
        color: inherit;
        text-decoration: none;
    }

.cat-feat-hcard:hover .cat-feat-hcard-title a {
    color: var(--brand-accent);
}

.cat-feat-hcard-thumb-wrap {
    width: 120px;
    flex-shrink: 0;
    
    
    
    
    a

{
    aspect-ratio: 16/10;
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

}

.cat-feat-hcard-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cat-feat-hcard:hover .cat-feat-hcard-thumb {
    transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   3. TWO-COLUMN MAIN BODY LAYOUT (Recent Stream vs Related News)
   -------------------------------------------------------------------------- */

.cat-body-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    align-items: start;
}

/* --------------------------------------------------------------------------
   LEFT COLUMN: CATEGORY RECENT NEWS STREAM
   -------------------------------------------------------------------------- */

.cat-stream-column {
    min-width: 0;
}


/* Stream Articles List (NYT Horizontal News Stream Format) */
.cat-stream-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.cat-stream-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth), border-color 0.25s ease;
}

    .cat-stream-card:hover {
        transform: translateY(-3px);
        border-color: var(--border-active);
        box-shadow: var(--card-shadow-hover);
    }

.cat-stream-body {
    display: flex;
    flex-direction: column;
}


.cat-stream-headline {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    transition: color 0.2s ease;
}

.cat-stream-card:hover .cat-stream-headline {
    color: var(--brand-accent);
}

.cat-stream-excerpt {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
    /* display: -webkit-box; */
    /* -webkit-line-clamp: 3; */
    /* -webkit-box-orient: vertical; */
    overflow: hidden;
}


.cat-stream-thumb-wrap {
    width: 220px;
    height: 145px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary-alt);
    flex-shrink: 0;
    position: relative;
    
    
    a

{
    display: block;
    width: 100%;
    height: 100%;
}

}

.cat-stream-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-stream-card:hover .cat-stream-thumb {
    transform: scale(1.05);
}

/* Stream Footer & Pagination */
.cat-stream-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
}

.cat-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 4px 18px rgba(234, 76, 137, 0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .cat-load-more-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 26px rgba(234, 76, 137, 0.45);
    }

    .cat-load-more-btn svg {
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;
    }

    .cat-load-more-btn:hover svg {
        transform: translateY(2px);
    }


/* --------------------------------------------------------------------------
   RIGHT COLUMN: RELATED CATEGORY NEWS & SIDEBAR WIDGETS
   -------------------------------------------------------------------------- */

.cat-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sidebar Widget Card Base */
.cat-widget-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.25s ease;
}

.cat-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.cat-widget-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .cat-widget-title svg {
        width: 17px;
        height: 17px;
        stroke: var(--brand-accent);
    }

.cat-widget-viewall {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-accent);
    transition: opacity 0.2s ease;
}

    .cat-widget-viewall:hover {
        opacity: 0.8;
        text-decoration: underline;
    }


/* Widget 2: Related Highlights from other categories */
.cat-rel-stories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cat-rel-story-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.2s ease;
}

    .cat-rel-story-item:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

.cat-rel-story-thumb {
    width: 33.33%;
    flex-shrink: 0;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    a

{
    display: block;
    aspect-ratio: 16/10;
    border-radius: 6px;
    overflow: hidden;
}

}

.cat-rel-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cat-rel-story-item:hover .cat-rel-story-thumb img {
    transform: scale(1.08);
}

.cat-rel-story-info {
    display: flex;
    flex-direction: column;
}

.cat-rel-story-cat {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cat-rel-story-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.42;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.cat-rel-story-item:hover .cat-rel-story-title {
    color: var(--brand-accent);
}

/* Widget 3: Most Read / Trending (01 - 05 Gradient Numbers) */
.cat-trending-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cat-trending-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

    .cat-trending-item:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

.cat-trending-rank {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    width: 32px;
}

.cat-trending-text {
    flex: 1;
}

.cat-trending-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.42;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.cat-trending-item:hover .cat-trending-title {
    color: var(--brand-accent);
}


/* Widget 4: Multimedia Spotlight */
.cat-mm-spotlight {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin-bottom: 14px;
    background: #000000;
}

    .cat-mm-spotlight img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.85;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }

    .cat-mm-spotlight:hover img {
        transform: scale(1.05);
        opacity: 0.95;
    }

.cat-mm-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.cat-mm-spotlight:hover .cat-mm-play-badge {
    transform: translate(-50%, -50%) scale(1.12);
}

.cat-mm-play-badge svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.cat-mm-spotlight-title {
    font-family: var(--font-display);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cat-mm-spotlight-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* --------------------------------------------------------------------------
   4. RESPONSIVE BREAKPOINTS (Mobile, Tablet, Desktop)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .cat-featured-3col-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .cat-feat-center-col {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 24px;
        order: -1;
    }

    .cat-feat-left-col {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 24px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .cat-feat-right-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .cat-feat-hcard {
        border-bottom: none;
        padding: 0;
    }

    .cat-body-section {
        grid-template-columns: 1fr 320px;
        gap: 28px;
    }
}

@media (max-width: 900px) {
    .cat-body-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cat-sidebar-column {
        position: static;
    }

    .cat-header-banner {
        padding: 28px 24px;
    }

    .cat-header-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .cat-featured-section {
        padding: 20px 16px;
    }

    .cat-feat-left-col {
        grid-template-columns: 1fr;
    }

    .cat-feat-right-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cat-feat-hcard {
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 14px;
    }

        .cat-feat-hcard:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

    .cat-feat-lead-title {
        font-size: 1.4rem;
    }

    .cat-feat-lead-excerpt {
        font-size: 0.88rem;
    }

    .cat-header-title {
        font-size: 1.85rem;
    }

    .cat-header-desc {
        font-size: 0.92rem;
    }

    .cat-stream-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    .cat-stream-thumb-wrap {
        width: 100%;
        height: 190px;
        order: -1;
        position: relative;
    }
}
