/**
 * Newspaper-Style Blog Page — BBC News inspired
 * Light theme, sharp edges, restrained colors
 * Prefix: .np-
 */

/* ===== VARIABLES ===== */
:root {
    --np-bg: #f7f7f8;
    --np-surface: #ffffff;
    --np-surface-2: #f0f1f3;
    --np-surface-3: #e5e7eb;
    --np-border: rgba(0,0,0,0.08);
    --np-border-hover: rgba(0,0,0,0.18);
    --np-text: #1a1a1a;
    --np-text-dim: #555;
    --np-text-muted: #888;
    --np-accent: #b8902a;
    --np-accent-hover: #a07c1e;
    --np-accent-dim: rgba(184,144,42,0.1);
    --np-red: #e74c3c;
    --np-transition: 0.25s ease;
    --np-gap: 24px;
    --np-container: 1280px;
    --np-section-gap: 48px;
    --np-accent-border: 3px solid var(--np-accent);
}

/* ===== PAGE BASE ===== */
.np-page {
    background: var(--np-bg);
    color: var(--np-text);
    min-height: 100vh;
    padding-top: var(--header-height);
}

.np-container {
    max-width: var(--np-container);
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== TICKER BAR ===== */
.np-ticker {
    background: var(--np-surface);
    border-bottom: 1px solid var(--np-border);
    overflow: hidden;
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
}

.np-ticker-label {
    flex-shrink: 0;
    background: var(--np-red);
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
    position: relative;
}

.np-ticker-label::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    border-style: solid;
    border-width: 22px 8px 22px 0;
    border-color: transparent transparent transparent var(--np-red);
}

.np-ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin-left: 12px;
}

.np-ticker-items {
    display: flex;
    gap: 48px;
    animation: np-ticker-scroll 30s linear infinite;
    white-space: nowrap;
    padding-right: 48px;
}

.np-ticker:hover .np-ticker-items {
    animation-play-state: paused;
}

.np-ticker-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--np-text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--np-transition);
}

.np-ticker-item:hover {
    color: var(--np-accent);
}

.np-ticker-dot {
    width: 5px;
    height: 5px;
    background: var(--np-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes np-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== FEATURED HERO (1 big + 4 small) ===== */
.np-featured {
    padding: 32px 0 var(--np-section-gap);
}

.np-featured-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.np-featured-main {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 1;
}

.np-featured-main .np-feat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.np-featured-main:hover .np-feat-img {
    opacity: 0.92;
}

.np-featured-main .np-feat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px;
    text-decoration: none;
    color: #fff;
}

.np-feat-badge {
    display: inline-block;
    background: var(--np-accent);
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.np-feat-title {
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-feat-excerpt {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.np-feat-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.np-feat-meta time {
    color: rgba(255,255,255,0.5);
}

.np-feat-reading {
    display: flex;
    align-items: center;
    gap: 4px;
}

.np-feat-reading svg {
    width: 13px;
    height: 13px;
    opacity: 0.6;
}

/* Featured sub-cards (small 4) — horizontal layout on PC */
.np-featured-subs {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.np-featured-sub {
    display: flex;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    height: 140px;
}

.np-featured-sub .np-feat-img {
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    flex-shrink: 0;
    transition: opacity 0.4s ease;
}

.np-featured-sub:hover .np-feat-img {
    opacity: 0.92;
}

.np-featured-sub .np-feat-overlay {
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 24px;
    text-decoration: none;
    color: #fff;
    flex: 1;
    min-width: 0;
}

.np-featured-sub .np-feat-badge {
    font-size: 10px;
    padding: 3px 8px;
    margin-bottom: 8px;
}

.np-featured-sub .np-feat-title {
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1.4;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}

.np-featured-sub .np-feat-meta {
    font-size: 11px;
}

/* No-image placeholder */
.np-feat-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d5d5d5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-feat-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.2;
}

.np-featured-sub .np-feat-placeholder {
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    height: 100%;
}

.np-featured-sub .np-feat-placeholder svg {
    width: 32px;
    height: 32px;
}

/* ===== TRENDING NOW (BBC "Most Read" style list) ===== */
.np-trending {
    padding: 0 0 var(--np-section-gap);
}

.np-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--np-text);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--np-border);
}

.np-section-title::before {
    display: none;
}

.np-section-title-link {
    margin-left: auto;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--np-accent);
    text-decoration: none;
    transition: opacity var(--np-transition);
}

.np-section-title-link:hover {
    opacity: 0.7;
}

.np-trending-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 720px;
}

.np-trending-card {
    position: relative;
    text-decoration: none;
    color: var(--np-text);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--np-border);
    transition: none;
}

.np-trending-card:last-child {
    border-bottom: none;
}

.np-trending-card:hover {
    transform: none;
}

.np-trending-card:hover .np-trending-title {
    text-decoration: underline;
}

/* Hide image, keep rank visible */
.np-trending-thumb {
    position: static;
    aspect-ratio: auto;
    overflow: visible;
    width: auto;
    height: auto;
    flex-shrink: 0;
}

.np-trending-thumb img {
    display: none;
}

.np-trending-rank {
    position: static;
    width: 36px;
    height: 36px;
    background: transparent;
    color: var(--np-accent);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    z-index: auto;
}

.np-trending-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.np-trending-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--np-accent);
    letter-spacing: 0.5px;
}

.np-trending-title {
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-trending-meta {
    font-size: 11px;
    color: var(--np-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.np-trending-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

.np-trending-views svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

/* ===== MAIN + SIDEBAR LAYOUT ===== */
.np-content-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--np-section-gap);
    padding-bottom: 80px;
}

/* ===== CATEGORY BLOCKS ===== */
.np-catblock {
    margin-bottom: var(--np-section-gap);
}

.np-catblock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-top: 12px;
    padding-bottom: 0;
    border-top: var(--np-accent-border);
    border-bottom: none;
}

.np-catblock-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--np-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.np-catblock-title::before {
    display: none;
}

.np-catblock-more {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--np-accent);
    text-decoration: none;
    transition: opacity var(--np-transition);
}

.np-catblock-more:hover {
    opacity: 0.7;
}

/* Layout A: 1 big + 3 small (stacked) */
.np-catblock-grid-a {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--np-gap);
}

.np-catblock-big {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    aspect-ratio: 4 / 3;
}

.np-catblock-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.np-catblock-big:hover img {
    opacity: 0.92;
}

.np-catblock-big .np-cb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 45%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
}

.np-cb-badge {
    display: inline-block;
    background: var(--np-accent);
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.np-cb-title {
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.np-cb-excerpt {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.np-cb-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}

.np-catblock-smalls {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.np-catblock-small {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: var(--np-text);
    padding: 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--np-border);
    transition: none;
}

.np-catblock-small:last-child {
    border-bottom: none;
}

.np-catblock-small:hover {
    background: transparent;
}

.np-catblock-small:hover .np-catblock-small-title {
    text-decoration: underline;
}

.np-catblock-small-thumb {
    flex-shrink: 0;
    width: 120px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.np-catblock-small-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-catblock-small:hover .np-catblock-small-thumb img {
    transform: none;
}

.np-catblock-small-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.np-catblock-small-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-catblock-small-meta {
    font-size: 11px;
    color: var(--np-text-muted);
}

/* No-image for category cards */
.np-cb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d5d5d5);
}

.np-catblock-small .np-cb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layout B: 3 equal columns */
.np-catblock-grid-b {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--np-gap);
}

.np-catblock-equal {
    text-decoration: none;
    color: var(--np-text);
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    overflow: hidden;
    transition: border-color var(--np-transition);
}

.np-catblock-equal:hover {
    border-color: var(--np-border-hover);
}

.np-catblock-equal:hover .np-catblock-equal-title {
    text-decoration: underline;
}

.np-catblock-equal-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.np-catblock-equal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-catblock-equal:hover .np-catblock-equal-thumb img {
    transform: none;
}

.np-catblock-equal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.np-catblock-equal-title {
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-catblock-equal-excerpt {
    font-size: 13px;
    color: var(--np-text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-catblock-equal-meta {
    font-size: 11px;
    color: var(--np-text-muted);
    margin-top: auto;
}

/* ===== LATEST POSTS SECTION ===== */
.np-latest {
    margin-bottom: var(--np-section-gap);
}

.np-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--np-gap);
}

.np-latest-card {
    text-decoration: none;
    color: var(--np-text);
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    overflow: hidden;
    transition: border-color var(--np-transition);
}

.np-latest-card:hover {
    border-color: var(--np-border-hover);
}

.np-latest-card:hover .np-latest-title {
    text-decoration: underline;
}

.np-latest-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.np-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-latest-card:hover .np-latest-thumb img {
    transform: none;
}

.np-latest-thumb .np-cb-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    margin-bottom: 0;
}

.np-latest-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.np-latest-title {
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-latest-excerpt {
    font-size: 13px;
    color: var(--np-text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-latest-meta {
    font-size: 11px;
    color: var(--np-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.np-latest-reading {
    display: flex;
    align-items: center;
    gap: 3px;
}

.np-latest-reading svg {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

.np-latest-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8, #d5d5d5);
}

/* Load More */
.np-load-more-wrap {
    text-align: center;
    padding-top: 32px;
}

.np-load-more {
    display: inline-block;
    padding: 12px 48px;
    background: transparent;
    border: 1px solid var(--np-text-dim);
    color: var(--np-text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--np-transition), color var(--np-transition);
}

.np-load-more:hover {
    background: var(--np-text);
    color: var(--np-surface);
    border-color: var(--np-text);
}

.np-load-more:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== SIDEBAR ===== */
.np-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--np-surface-3) transparent;
}

.np-sidebar::-webkit-scrollbar {
    width: 4px;
}

.np-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.np-sidebar::-webkit-scrollbar-thumb {
    background: var(--np-surface-3);
}

.np-widget {
    background: transparent;
    border: none;
    padding: 0 0 16px;
    margin-bottom: 16px;
}

.np-widget:last-child {
    margin-bottom: 0;
}

.np-widget-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--np-text);
    margin-bottom: 16px;
    padding: 0 0 0 12px;
    border-left: 3px solid var(--np-accent);
    display: block;
}

.np-widget-title::before {
    display: none;
}

/* Search widget */
.np-search-form {
    display: flex;
    background: var(--np-surface-2);
    border: 1px solid var(--np-border);
    overflow: hidden;
    transition: border-color var(--np-transition);
}

.np-search-form:focus-within {
    border-color: var(--np-accent);
}

.np-search-input {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    color: var(--np-text);
    font-size: 13px;
    outline: none;
}

.np-search-input::placeholder {
    color: var(--np-text-muted);
}

.np-search-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 12px 14px;
    color: var(--np-text-dim);
    cursor: pointer;
    transition: color var(--np-transition);
}

.np-search-btn:hover {
    color: var(--np-accent);
}

.np-search-btn svg {
    width: 16px;
    height: 16px;
}

/* Popular posts widget */
.np-popular-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.np-popular-item {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: var(--np-text);
    padding: 12px 0;
    border-bottom: 1px solid var(--np-border);
    transition: none;
}

.np-popular-item:last-child {
    border-bottom: none;
}

.np-popular-item:hover {
    opacity: 1;
}

.np-popular-item:hover .np-popular-post-title {
    text-decoration: underline;
}

.np-popular-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: transparent;
    color: var(--np-accent);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-popular-item:first-child .np-popular-rank {
    background: transparent;
    color: var(--np-accent);
}

.np-popular-thumb {
    flex-shrink: 0;
    width: 72px;
    aspect-ratio: 1;
    overflow: hidden;
}

.np-popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-popular-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.np-popular-post-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-popular-meta {
    font-size: 11px;
    color: var(--np-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.np-popular-views svg {
    width: 11px;
    height: 11px;
    opacity: 0.5;
    margin-right: 2px;
}

/* Categories widget */
.np-cat-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.np-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    text-decoration: none;
    color: var(--np-text-dim);
    font-size: 13px;
    border-bottom: 1px solid var(--np-border);
    transition: color var(--np-transition);
}

.np-cat-link:last-child {
    border-bottom: none;
}

.np-cat-link:hover {
    color: var(--np-text);
}

.np-cat-count {
    font-size: 11px;
    color: var(--np-text-muted);
    background: transparent;
    padding: 0;
}

/* Tag cloud widget */
.np-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.np-tag-chip {
    display: inline-block;
    padding: 4px 10px;
    background: var(--np-surface-2);
    border: 1px solid var(--np-border);
    font-size: 12px;
    color: var(--np-text-dim);
    text-decoration: none;
    transition: border-color var(--np-transition), color var(--np-transition), background var(--np-transition);
}

.np-tag-chip:hover {
    border-color: var(--np-accent);
    color: var(--np-accent);
    background: var(--np-accent-dim);
}

/* Archive widget */
.np-archive-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.np-archive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    text-decoration: none;
    color: var(--np-text-dim);
    font-size: 13px;
    border-bottom: 1px solid var(--np-border);
    transition: color var(--np-transition);
}

.np-archive-link:last-child {
    border-bottom: none;
}

.np-archive-link:hover {
    color: var(--np-text);
}

.np-archive-count {
    font-size: 11px;
    color: var(--np-text-muted);
}

/* CTA widget */
.np-cta-widget {
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-top: 3px solid var(--np-accent);
    border-radius: 0 0 6px 6px;
    padding: 28px 24px;
    text-align: center;
    margin-top: 8px;
}

.np-cta-widget .np-widget-title {
    justify-content: center;
    display: flex;
    border-left: none;
    padding-left: 0;
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.np-cta-text {
    font-size: 13px;
    color: var(--np-text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}

.np-cta-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.np-cta-btn {
    display: block;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity var(--np-transition);
}

.np-cta-btn:hover {
    opacity: 0.85;
}

.np-cta-btn--primary {
    background: var(--np-accent);
    color: #000;
}

.np-cta-btn--secondary {
    background: transparent;
    border: 1px solid var(--np-border-hover);
    color: var(--np-text);
}

/* ===== FILTER BAR (underline tabs) ===== */
.np-filter-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin-bottom: 24px;
    border-top: none;
    border-bottom: 2px solid var(--np-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.np-filter-bar::-webkit-scrollbar {
    display: none;
}

.np-filter-btn {
    flex-shrink: 0;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--np-text-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--np-transition), border-color var(--np-transition);
    white-space: nowrap;
    margin-bottom: -2px;
}

.np-filter-btn:hover {
    color: var(--np-text);
    border-bottom-color: var(--np-text-muted);
}

.np-filter-btn.active {
    background: transparent;
    border-bottom-color: var(--np-accent);
    color: var(--np-accent);
    font-weight: 600;
}

/* ===== FADE IN ANIMATIONS ===== */
.np-fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.np-fade-in.is-visible {
    opacity: 1;
    transform: none;
}

/* ===== LOADING STATE ===== */
.np-loading .np-latest-grid {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1199px) {
    .np-container {
        padding: 0 24px;
    }

    .np-featured-grid {
        gap: 2px;
    }

    .np-content-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .np-sidebar {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .np-widget {
        margin-bottom: 0;
    }

    .np-catblock-grid-b {
        grid-template-columns: repeat(3, 1fr);
    }

    .np-latest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .np-trending-grid {
        max-width: 100%;
    }
}

/* Tablet small */
@media (max-width: 900px) {
    .np-featured-grid {
        gap: 2px;
    }

    .np-featured-main {
        aspect-ratio: 16 / 9;
    }

    .np-featured-subs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }

    .np-featured-sub {
        display: block;
        height: auto;
        aspect-ratio: 16 / 10;
        position: relative;
    }

    .np-featured-sub .np-feat-img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        flex-shrink: initial;
    }

    .np-featured-sub .np-feat-placeholder {
        aspect-ratio: auto;
        flex-shrink: initial;
        width: 100%;
    }

    .np-featured-sub .np-feat-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
        justify-content: flex-end;
        flex: auto;
        min-width: auto;
        padding: 20px;
    }

    .np-catblock-grid-a {
        grid-template-columns: 1fr;
    }

    .np-catblock-big {
        aspect-ratio: 16 / 9;
    }

    .np-catblock-smalls {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .np-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .np-container {
        padding: 0 16px;
    }

    .np-ticker {
        height: 38px;
    }

    .np-ticker-label {
        font-size: 10px;
        padding: 0 12px;
        letter-spacing: 1.5px;
    }

    .np-ticker-item {
        font-size: 12px;
    }

    .np-featured {
        padding: 20px 0 32px;
    }

    .np-featured-subs {
        grid-template-columns: 1fr 1fr;
    }

    .np-featured-sub .np-feat-title {
        font-size: 13px;
    }

    .np-feat-excerpt {
        display: none;
    }

    .np-catblock-grid-a {
        grid-template-columns: 1fr;
    }

    .np-catblock-smalls {
        grid-template-columns: 1fr;
    }

    .np-catblock-grid-b {
        grid-template-columns: 1fr;
    }

    .np-latest-grid {
        grid-template-columns: 1fr;
    }

    .np-filter-bar {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .np-catblock-small-thumb {
        width: 90px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .np-featured-subs {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .np-featured-sub {
        aspect-ratio: 16 / 8;
    }

    .np-featured-sub:nth-child(n+3) {
        display: none;
    }
}

/* ===== OVERRIDES for old news-* classes (archive.php inside .np-page) ===== */

.np-page .news-page-inner {
    padding-top: 40px;
}

.np-page .news-filter-btn.active {
    background: var(--np-accent);
    border-color: var(--np-accent);
    color: #fff;
}

.np-page .news-filter-btn:hover {
    border-color: var(--np-accent);
    color: var(--np-accent);
}

.np-page .news-tag-btn.active {
    background: var(--np-accent);
    border-color: var(--np-accent);
    color: #fff;
}

.np-page .news-card-more {
    color: var(--np-accent);
}

.np-page .news-card-thumb-placeholder {
    background: linear-gradient(135deg, #e8e8e8, #d5d5d5);
}

.np-page .news-load-more {
    border-color: var(--np-accent);
    color: var(--np-accent);
}

.np-page .news-load-more:hover {
    background: var(--np-accent);
    color: #fff;
}

.np-page .news-pagination .current {
    background: var(--np-accent);
    border-color: var(--np-accent);
    color: #fff;
}

.np-page .news-sticky-badge {
    background: var(--np-red);
    color: #fff;
}
