/* ==========================================================================
   MRPL.CITY — Modern Portal Stylesheet & Design System
   Features:
   - Light & Dark Themes (Automatic OS sync + manual toggle)
   - Onest Typography & Scaled Readability
   - Clean Editorial Hierarchy (No unnecessary vertical bars on headings)
   - Strictly Icon-free Highlighted Callouts
   - Mobile-First Architecture (Hero -> Newsfeed -> Publications)
   ========================================================================== */

/* 1. CSS VARIABLES & THEMES */
:root {
    /* Brand Palette */
    --brand-navy: #004E7D;
    --brand-navy-dark: #003657;
    --brand-yellow: #FAB613;
    --brand-yellow-hover: #E5A305;
    --brand-blue-accent: #229ED9;
    --brand-blue-subtle: rgba(34, 158, 217, 0.08);

    /* Light Theme (Default) */
    --bg-page: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #F1F5F9;
    --text-main: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --border-subtle: #F1F5F9;
    --header-bg: #FFFFFF;
    --header-border: #E2E8F0;

    /* Shadows & Radii */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* Dark Theme via attribute or media query */
[data-theme="dark"] {
    --bg-page: #0B0F19;
    --bg-card: #131B2E;
    --bg-card-subtle: #1C263D;
    --text-main: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    --border-color: #243352;
    --border-subtle: #19243C;
    --header-bg: #0D1424;
    --header-border: #1E293B;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-page: #0B0F19;
        --bg-card: #131B2E;
        --bg-card-subtle: #1C263D;
        --text-main: #F8FAFC;
        --text-secondary: #CBD5E1;
        --text-muted: #94A3B8;
        --text-light: #64748B;
        --border-color: #243352;
        --border-subtle: #19243C;
        --header-bg: #0D1424;
        --header-border: #1E293B;
        --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.6);
    }
}

/* 2. BASE & RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 3. SITE HEADER */
header.site-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Brand Logo: mrpl • city */
.brand-logo {
    display: inline-flex;
    align-items: center;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-main);
    user-select: none;
    line-height: 1;
}

.brand-logo .dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    background-color: var(--brand-yellow);
    border-radius: 50%;
    margin: 0 4px;
    position: relative;
    top: -1px;
    box-shadow: 0 2px 6px rgba(250, 182, 19, 0.4);
}

.brand-logo:hover .dot {
    transform: scale(1.15);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Header Navigation (Uppercase, no search, no archive) */
nav.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav.main-nav a {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 2px;
    transition: color 0.15s ease;
}

nav.main-nav a:hover {
    color: var(--brand-blue-accent);
}

nav.main-nav a.active {
    color: var(--text-main);
}

nav.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--brand-yellow);
    border-radius: 3px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-main);
    background-color: var(--bg-card);
    transition: all 0.2s ease;
}

.btn-theme-toggle:hover {
    border-color: var(--brand-yellow);
    transform: scale(1.05);
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #229ED9;
    color: #FFFFFF !important;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(34, 158, 217, 0.3);
    transition: all 0.2s ease;
}

.btn-telegram:hover {
    background-color: #1B8DC4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 158, 217, 0.4);
}

.btn-telegram svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-burger {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px;
    color: var(--text-main);
    cursor: pointer;
}

/* 4. MAIN LAYOUT & PORTAL GRID */
.main-layout {
    padding: 24px 0 60px;
}

.grid-portal {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    align-items: start;
}

/* Newsfeed Column (Flush bottom bound via JS/CSS) */
.newsfeed-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.newsfeed-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    padding: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.newsfeed-day-divider {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background-color: var(--bg-card-subtle);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 8px 0 6px;
    display: inline-block;
    flex-shrink: 0;
}

.newsfeed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.newsfeed-list::-webkit-scrollbar {
    width: 4px;
}
.newsfeed-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.newsfeed-item {
    position: relative;
    padding: 10px 0 10px 14px;
    border-left: 2px solid var(--border-color);
    transition: border-color 0.15s ease;
}

.newsfeed-item:hover {
    border-left-color: var(--brand-yellow);
}

.newsfeed-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    display: block;
    margin-bottom: 3px;
}

.newsfeed-item:hover .newsfeed-time {
    color: var(--brand-blue-accent);
}

.newsfeed-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.38;
    display: block;
}

.newsfeed-link:hover {
    color: var(--text-main);
}

.newsfeed-item.is-hot {
    border-left-color: #EF4444;
}

.newsfeed-item.is-hot .newsfeed-time {
    color: #EF4444;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.newsfeed-bottom-action {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.btn-all-news {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-card-subtle);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s ease;
}

.btn-all-news:hover {
    background-color: var(--border-color);
    color: var(--brand-blue-accent);
}

/* Editorial Column (Right side) */
.editorial-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Hero Story Card */
.hero-story-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-story-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.hero-image-wrap {
    position: relative;
    background-color: #CBD5E1;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-story-card:hover .hero-image-wrap img {
    transform: scale(1.03);
}

.category-pill {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: var(--brand-yellow);
    color: #111827;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.hero-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.hero-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.32;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-lead {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.read-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--brand-blue-accent);
}

/* 3 Sub-stories Grid */
.sub-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.story-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.story-image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #CBD5E1;
}

.story-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image-wrap img {
    transform: scale(1.04);
}

.story-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.story-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-blue-accent);
    margin-bottom: 6px;
    display: block;
}

.story-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 10px;
}

.story-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* 5. PUBLICATIONS & STORIES SECTION (Placed after newsfeed on mobile!) */
.publications-section {
    margin-top: 40px;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-main);
}

.section-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-blue-accent);
}

.section-link:hover {
    text-decoration: underline;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.feature-img-wrap {
    width: 200px;
    min-width: 200px;
    position: relative;
    background-color: #CBD5E1;
}

.feature-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 8px;
}

.feature-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 12px;
}

/* 6. INNER ARTICLE PAGE */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a:hover {
    color: var(--brand-blue-accent);
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
}

.article-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    padding: 36px 40px;
}

.article-category-badge {
    display: inline-block;
    background-color: var(--brand-yellow);
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 14px 0 16px;
    font-weight: 500;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}

.article-lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
}

.share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 28px;
}

.share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    background-color: var(--bg-card-subtle);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share:hover {
    border-color: var(--brand-blue-accent);
    color: var(--brand-blue-accent);
}

.btn-share.telegram {
    background-color: rgba(36, 161, 222, 0.08);
    border-color: rgba(36, 161, 222, 0.2);
    color: var(--brand-blue-accent);
}

.article-main-image-wrap {
    margin: 0 0 10px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--border-subtle);
    aspect-ratio: 16 / 9;
}

.article-main-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-caption {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Article Body Typography (Strictly NO vertical bars on headings, NO emojis in callouts) */
.article-body {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body strong {
    font-weight: 700;
    color: var(--text-main);
}

.article-body h2, .article-body h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 36px 0 14px;
    line-height: 1.35;
}

.article-body ul {
    margin: 0 0 20px 24px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Highlighted Callout Box (No vertical lines, no icons/emojis) */
.callout-box {
    background-color: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 28px 0;
}

.callout-box-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-blue-accent);
    margin-bottom: 8px;
}

.callout-box-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 !important;
}

/* Sidebar in Article */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    padding: 20px;
}

.widget-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.widget-item-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.widget-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-secondary);
}

.widget-item-title:hover {
    color: var(--brand-blue-accent);
}

/* Telegram CTA card */
.telegram-cta-card {
    background: linear-gradient(135deg, rgba(34, 158, 217, 0.12) 0%, rgba(34, 158, 217, 0.04) 100%);
    border: 1px solid rgba(34, 158, 217, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 36px 0;
}

/* Related News Block */
.related-section {
    margin-top: 50px;
    padding-top: 36px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-main);
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* 7. FOOTER */
footer.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 30px;
    margin-top: 60px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 36px;
    margin-bottom: 32px;
}

.footer-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--brand-blue-accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

/* 8. MOBILE DRAWER */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 200;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.25s ease;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 199;
    display: none;
}

.drawer-overlay.open {
    display: block;
}

.drawer-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 20px;
}

.drawer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drawer-nav a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
}

/* 8. CATEGORY & ARCHIVE LISTS */
.category-page {
    margin-top: 20px;
    margin-bottom: 60px;
}

.category-header-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px 36px;
    margin-bottom: 32px;
}

.category-badge-pill {
    display: inline-block;
    background-color: var(--bg-card-subtle);
    color: var(--brand-blue-accent);
    border: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.category-page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.category-page-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 800px;
    margin-bottom: 20px;
}

.category-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.category-chip {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background-color: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
}

.category-chip:hover {
    color: var(--brand-blue-accent);
    border-color: var(--brand-blue-accent);
}

.category-chip.active {
    background-color: var(--brand-yellow);
    color: #111827;
    border-color: var(--brand-yellow);
}

/* Category Grid */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Pagination */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
}

.pagination {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination li a, .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.pagination li a:hover {
    border-color: var(--brand-blue-accent);
    color: var(--brand-blue-accent);
}

.pagination li.active span {
    background-color: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: #111827;
}

.pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-card-subtle);
}

/* 9. RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
    .grid-portal {
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }
    .hero-story-card {
        grid-template-columns: 1fr;
    }
    .sub-stories-grid {
        grid-template-columns: 1fr 1fr;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
    .category-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .brand-logo {
        font-size: 26px;
    }
    .brand-logo .dot {
        width: 9px;
        height: 9px;
    }
    nav.main-nav {
        display: none;
    }
    .btn-burger {
        display: block;
    }
    .grid-portal {
        grid-template-columns: 1fr;
    }
    /* Mobile order: Hero -> Sub-stories -> Newsfeed -> Publications */
    .newsfeed-col {
        order: 2;
        height: auto !important;
    }
    .newsfeed-card {
        height: auto;
    }
    .newsfeed-list {
        overflow-y: visible;
        max-height: none;
    }
    .sub-stories-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-card {
        flex-direction: column;
    }
    .feature-img-wrap {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
    }
    .article-card {
        padding: 20px 16px;
        border-radius: var(--radius-md);
    }
    .article-title {
        font-size: 22px;
        line-height: 1.3;
    }
    .article-lead {
        font-size: 16px;
    }
    .article-body {
        font-size: 17px;
        line-height: 1.65;
    }
    .share-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .share-buttons {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .telegram-cta-card {
        flex-direction: column;
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .category-header-box {
        padding: 24px 18px;
    }
    .category-page-title {
        font-size: 24px;
    }
    .category-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 8px;
    }
    .btn-telegram span {
        display: none;
    }
    .btn-telegram {
        padding: 8px 10px;
    }
    .container {
        padding: 0 14px;
    }
    .hero-content {
        padding: 16px;
    }
    .hero-title {
        font-size: 18px;
    }
    .article-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    .pagination li a, .pagination li span {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
        padding: 0 6px;
    }
}
