/* ==========================================================
   Nashamah News — public stylesheet
   RTL Arabic news portal. Colour tokens are injected from
   the admin settings as CSS variables on :root.
   ========================================================== */

:root {
    --c-primary:   #0670a4;
    --c-secondary: #0a4f75;
    --c-accent:    #c8102e;
    --c-breaking:  #cd090c;
    --c-topbar:    #111417;
    --w-container: 1180px;

    --ink:        #15181c;
    --ink-2:      #40474f;
    --ink-3:      #6b747d;
    --line:       #e2e6ea;
    --line-2:     #eef1f4;
    --surface:    #ffffff;
    --surface-2:  #f7f9fa;
    --page:       #f1f4f6;

    --r-sm: 4px;
    --r:    8px;
    --r-lg: 14px;

    --sh-1: 0 1px 2px rgba(16, 24, 40, .06);
    --sh-2: 0 2px 8px rgba(16, 24, 40, .08);
    --sh-3: 0 8px 24px rgba(16, 24, 40, .12);

    --font: "Cairo", "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--page);
    padding-bottom: 54px;          /* room for the fixed breaking bar */
    overflow-x: hidden;
    max-width: 100vw;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
svg { fill: currentColor; width: 1em; height: 1em; }

.wrap {
    width: 100%;
    max-width: var(--w-container);
    margin-inline: auto;
    padding-inline: 16px;
}

.skip-link {
    position: absolute; inset-inline-start: -9999px; top: 0; z-index: 999;
    background: var(--c-primary); color: #fff; padding: 10px 16px;
}
.skip-link:focus { inset-inline-start: 0; }

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.muted { color: var(--ink-3); }

/* ══════════════════════════ top bar ══════════════════════ */
.topbar {
    background: var(--c-topbar);
    color: #e8ebee;
    font-size: 13px;
}
.topbar-inner {
    display: flex; align-items: center; gap: 16px;
    min-height: 40px; flex-wrap: wrap;
}
.topbar-links { display: flex; gap: 2px; flex-wrap: wrap; }
.topbar-links a {
    padding: 6px 10px; border-radius: var(--r-sm);
    color: #d6dbe0; transition: background .15s, color .15s;
}
.topbar-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.topbar-date { color: #9aa3ac; margin-inline-start: auto; white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.social-mini { display: flex; gap: 4px; }
.social-mini a {
    display: grid; place-items: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255, 255, 255, .1); color: #d6dbe0;
    transition: background .15s, color .15s;
}
.social-mini a:hover { background: var(--c-primary); color: #fff; }
.social-mini svg { width: 14px; height: 14px; }

.topbar-search { display: flex; align-items: center; }
.topbar-search input {
    font-family: inherit; font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff; padding: 6px 12px;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    width: 170px; min-width: 0;
}
.topbar-search input::placeholder { color: #8d959d; }
.topbar-search input:focus { background: rgba(255, 255, 255, .16); outline: none; }
.topbar-search button {
    border: 0; background: var(--c-primary); color: #fff;
    padding: 7px 11px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
    display: grid; place-items: center;
}
.topbar-search button:hover { background: var(--c-secondary); }

/* ══════════════════════════ masthead ═════════════════════ */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding-block: 18px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    max-height: 88px; width: auto;
    max-width: min(460px, 68vw);
    object-fit: contain;
}
@media (max-width: 767px) { .brand-logo { max-height: 58px; } }
.brand-mark {
    display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 12px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    color: #fff; font-size: 30px; font-weight: 800; line-height: 1;
}
.brand-text strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.brand-text small { display: block; font-size: 12.5px; color: var(--ink-3); }

.masthead-banner { flex: 1 1 320px; max-width: 728px; }
.masthead-banner .ad-slot { margin: 0; }

/* ══════════════════════════ main nav ═════════════════════ */
.mainnav {
    background: var(--c-primary);
    position: sticky; top: 0; z-index: 90;
    box-shadow: var(--sh-2);
}
.mainnav-inner { display: flex; align-items: stretch; }

.nav-toggle {
    display: none; align-items: center; gap: 8px;
    background: transparent; border: 0; color: #fff;
    font-size: 15px; font-weight: 600; padding: 12px 4px;
}
.nav-toggle-bars { display: inline-grid; gap: 4px; }
.nav-toggle-bars i { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

.nav-list { display: flex; flex-wrap: wrap; }
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block; padding: 12px 14px;
    color: #eaf4fa; font-size: 14.5px; font-weight: 600;
    white-space: nowrap; transition: background .15s, color .15s;
}
.nav-list > li > a:hover { background: rgba(0, 0, 0, .18); color: #fff; }
.nav-list > li.is-active > a { background: rgba(0, 0, 0, .28); color: #fff; }
.nav-list > li.is-active::after {
    content: ""; position: absolute; inset-inline: 10px; bottom: 0;
    height: 3px; background: #fff; border-radius: 3px 3px 0 0;
}

/* ══════════════════════════ tickers ══════════════════════ */
.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker--obit { background: #2b3238; }
.ticker-inner { display: flex; align-items: stretch; gap: 0; min-height: 42px; max-width: 100%; }

.ticker-label {
    display: grid; place-items: center;
    padding-inline: 16px; font-size: 13.5px; font-weight: 700;
    background: var(--c-accent); color: #fff; white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
}
.ticker--news .ticker-label { background: var(--c-accent); }
.ticker--obit .ticker-label { background: #596570; }

.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.ticker-track {
    display: flex; align-items: center; gap: 14px;
    white-space: nowrap; width: max-content;
    animation: ticker-run var(--dur, 45s) linear infinite;
}
.ticker:hover .ticker-track, .ticker-track:focus-within { animation-play-state: paused; }
.ticker-track a { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.ticker-track a:hover { color: var(--c-accent); }
.ticker--obit .ticker-track a { color: #e6eaee; }
.ticker--obit .ticker-track a:hover { color: #fff; text-decoration: underline; }
.ticker-track .sep { color: var(--line); }
.ticker--obit .ticker-track .sep { color: #57626c; }

.ticker-all {
    display: grid; place-items: center; padding-inline: 14px;
    font-size: 13px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .12);
}
.ticker--obit .ticker-all:hover { background: rgba(255, 255, 255, .22); }

@keyframes ticker-run {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }   /* RTL: track is duplicated once */
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track, .breaking-track { animation: none; }
    .ticker-viewport, .breaking-viewport { overflow-x: auto; }
}

/* ══════════════════════════ layout ══════════════════════ */
.site-main { padding-block: 18px 32px; }
.home > * + * { margin-top: 26px; }

.layout-with-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}
.layout-side { display: grid; gap: 20px; position: sticky; top: 64px; }

/* ══════════════════════ section headings ════════════════ */
.section-head {
    --sec: var(--c-primary);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px;
    border-bottom: 2px solid var(--line);
}
.section-head h2 {
    position: relative;
    font-size: 17px; font-weight: 800;
    padding: 8px 0 10px;
    color: var(--ink);
}
.section-head h2::after {
    content: ""; position: absolute; inset-inline-start: 0; bottom: -2px;
    width: 100%; height: 3px; background: var(--sec); border-radius: 3px;
}
.section-head h2 a { color: inherit; }
.section-head h2 a:hover { color: var(--sec); }

.section-more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--ink-3);
    padding-bottom: 6px;
}
.section-more:hover { color: var(--sec); }
.section-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* ══════════════════════ featured slider ═════════════════ */
.featured {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 14px;
}
.featured-stage {
    position: relative; overflow: hidden;
    border-radius: var(--r-lg); background: #0e1418;
    aspect-ratio: 16 / 9;
}
.featured-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .45s ease;
}
.featured-slide.is-active { opacity: 1; visibility: visible; }
.featured-slide img { width: 100%; height: 100%; object-fit: cover; }

.featured-caption {
    position: absolute; inset-inline: 0; bottom: 0;
    padding: 46px 20px 18px;
    background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.72) 45%, transparent 100%);
    color: #fff;
}
.featured-caption h2 {
    font-size: clamp(17px, 2.1vw, 26px); font-weight: 800; line-height: 1.45;
    text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.featured-cat {
    display: inline-block; margin-bottom: 8px;
    background: var(--cat, var(--c-accent)); color: #fff;
    font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
}
.featured-caption time { display: block; margin-top: 8px; font-size: 12.5px; color: #c9d1d8; }

.featured-dots {
    position: absolute; inset-inline-end: 14px; bottom: 14px;
    display: none; gap: 6px;
}
.featured-dots button {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.45);
}
.featured-dots button[aria-selected="true"] { background: #fff; width: 22px; border-radius: 6px; }

.featured-list {
    display: grid; gap: 6px;
    grid-auto-rows: 1fr;        /* stretch the five items to match the stage */
    align-content: stretch;
}
.featured-list li { display: block; }
.featured-list button {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 100%;
    text-align: start; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); padding: 10px 12px;
    font-size: 14px; font-weight: 600; line-height: 1.55; color: var(--ink);
    transition: background .15s, border-color .15s, color .15s;
}
.featured-list button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.featured-list li.is-active button {
    background: var(--c-primary); border-color: var(--c-primary); color: #fff;
}
.fl-num {
    flex: 0 0 22px; display: grid; place-items: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--surface-2); color: var(--c-primary);
    font-size: 12px; font-weight: 800;
}
.featured-list li.is-active .fl-num { background: rgba(255,255,255,.22); color: #fff; }
.fl-title { flex: 1; }

/* ══════════════════════════ cards ═══════════════════════ */
.card-grid { display: grid; gap: 14px; }
.card-grid.cols-1 { grid-template-columns: 1fr; }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-1);
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--sh-3); transform: translateY(-2px); border-color: #cfd8de; }

.card-media { position: relative; display: block; background: var(--surface-2); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-play {
    position: absolute; inset: 0; margin: auto;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,.6); color: #fff;
    display: grid; place-items: center;
}
.card-play svg { width: 22px; height: 22px; }

.card-body { padding: 11px 13px 13px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.6; }
.card-title a:hover { color: var(--c-primary); }
.card-summary { margin: 7px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

.card-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 9px; font-size: 12px; color: var(--ink-3);
}
.card-cat {
    background: color-mix(in srgb, var(--cat) 12%, white);
    color: var(--cat); font-weight: 700;
    padding: 2px 9px; border-radius: 20px;
}
.card-cat:hover { background: var(--cat); color: #fff; }
.card-views { display: inline-flex; align-items: center; gap: 4px; }
.card-views svg { width: 13px; height: 13px; }

/* wide (row) card */
.card--wide { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.card--wide .card-media img { aspect-ratio: 4 / 3; height: 100%; }
.card--wide .card-body { padding: 13px 15px; align-self: center; }
.card--wide .card-title { font-size: 16.5px; }

.list-grid { gap: 14px; }

/* ═══════════════════ latest updates block ══════════════ */
.block--latest .latest-scroll {
    max-height: 330px; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 6px 14px;
    scrollbar-width: thin;
}
.headline-list > li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.headline-list > li:last-child { border-bottom: 0; }
.hl-thumb { flex: 0 0 82px; }
.hl-thumb img { width: 82px; height: 62px; object-fit: cover; border-radius: var(--r-sm); }
.hl-body { flex: 1; min-width: 0; }
.hl-body a { font-size: 14.5px; font-weight: 600; line-height: 1.65; }
.hl-body a:hover { color: var(--c-primary); }
.hl-body time { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink-3); }

ol.headline-list { counter-reset: hl; }
ol.headline-list > li { counter-increment: hl; }
ol.headline-list > li .hl-body::before {
    content: counter(hl);
    float: inline-start; margin-inline-end: 9px;
    width: 24px; height: 24px; border-radius: var(--r-sm);
    background: var(--c-primary); color: #fff;
    font-size: 13px; font-weight: 800;
    display: grid; place-items: center;
}

.block--mostread .headline-list {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); padding: 4px 14px;
}

/* ══════════════════════════ video ══════════════════════ */
.video-frame {
    position: relative; aspect-ratio: 16 / 9;
    background: #000; border-radius: var(--r); overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.video-caption { margin-top: 12px; font-size: 16px; font-weight: 700; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.video-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.video-card h2 { margin-top: 10px; font-size: 15.5px; }
.video-card p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }

/* ══════════════════════════ ads ════════════════════════ */
.ad-slot { margin-block: 4px; text-align: center; }
.ad-slot img { margin-inline: auto; border-radius: var(--r-sm); }
.ad-inner, .ad-article { margin-block: 18px; }
.ad-footer { margin-block: 20px; }

/* ══════════════════════ article page ═══════════════════ */
.breadcrumb {
    display: flex; gap: 7px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px;
}
.breadcrumb a:hover { color: var(--c-primary); }

.post {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(16px, 3vw, 30px);
    box-shadow: var(--sh-1);
}
.post-cat {
    display: inline-block; margin-bottom: 12px;
    background: var(--cat, var(--c-primary)); color: #fff;
    font-size: 12.5px; font-weight: 700; padding: 4px 13px; border-radius: 20px;
}
.post-title {
    font-size: clamp(21px, 3vw, 31px); font-weight: 800;
    line-height: 1.5; letter-spacing: -.3px;
}
.post-lead {
    margin: 12px 0 0; font-size: 16.5px; line-height: 1.85;
    color: var(--ink-2); font-weight: 600;
}
.post-meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-2);
    font-size: 13px; color: var(--ink-3);
}
.post-meta time, .post-views { display: inline-flex; align-items: center; gap: 5px; }
.post-meta svg { width: 14px; height: 14px; }
.post-writer { font-weight: 700; color: var(--c-primary); }

.post-image { margin: 18px 0 0; }
.post-image img { width: 100%; border-radius: var(--r); }
.post-image figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); text-align: center; }
.post-video { margin-top: 18px; }

.post-body { margin-top: 20px; font-size: 16.5px; line-height: 2.05; color: #22282e; }
.post-source {
    display: inline-block; margin-inline-end: 8px;
    font-weight: 800; color: var(--c-accent);
}
.post-source::after { content: " :"; }
.post-body p { margin: 0 0 1.15em; }
.post-body h2, .post-body h3 { margin: 1.4em 0 .6em; font-size: 20px; }
.post-body h3 { font-size: 18.5px; }
.post-body ul, .post-body ol { margin: 0 0 1.15em; padding-inline-start: 24px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: .45em; }
.post-body a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.post-body img { border-radius: var(--r); margin-block: 1em; }
.post-body blockquote {
    margin: 1.3em 0; padding: 12px 18px;
    border-inline-start: 4px solid var(--c-primary);
    background: var(--surface-2); border-radius: 0 var(--r) var(--r) 0;
    color: var(--ink-2); font-weight: 600;
}
.post-body iframe { max-width: 100%; border-radius: var(--r); }
.post-body table { width: 100%; border-collapse: collapse; margin-block: 1.2em; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.post-body th { background: var(--surface-2); }

.post-gallery { margin-top: 26px; }
.gallery-title { font-size: 17px; margin-bottom: 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery-item { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item span { display: block; padding: 7px 9px; font-size: 12.5px; color: var(--ink-2); }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.post-tags a {
    background: var(--surface-2); border: 1px solid var(--line);
    padding: 4px 12px; border-radius: 20px; font-size: 13px; color: var(--ink-2);
}
.post-tags a:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.post-share {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-2);
}
.share-label { font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.sh {
    border: 1px solid var(--line); background: var(--surface);
    padding: 6px 15px; border-radius: 20px;
    font-size: 13px; font-weight: 600; color: var(--ink-2);
    transition: background .15s, color .15s, border-color .15s;
}
.sh:hover { color: #fff; border-color: transparent; }
.sh-fb:hover { background: #1877f2; }
.sh-x:hover  { background: #000; }
.sh-wa:hover { background: #25d366; }
.sh-tg:hover { background: #229ed9; }
.sh-copy:hover { background: var(--c-primary); }
.sh-copy.is-done { background: #16a34a; color: #fff; border-color: transparent; }

.related-block { margin-top: 28px; }

/* ══════════════════════ listing pages ══════════════════ */
.page-title-bar {
    --sec: var(--c-primary);
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
    position: relative;
}
.page-title-bar::after {
    content: ""; position: absolute; inset-inline-start: 0; bottom: -2px;
    width: 90px; height: 3px; background: var(--sec); border-radius: 3px;
}
.page-title-bar h1 { font-size: clamp(20px, 2.6vw, 27px); font-weight: 800; }
.page-title-bar .count { font-size: 13px; color: var(--ink-3); }
.page-intro { color: var(--ink-2); margin-bottom: 16px; }

.empty-state {
    background: var(--surface); border: 1px dashed var(--line);
    border-radius: var(--r); padding: 40px 20px;
    text-align: center; color: var(--ink-3);
}

.pagination { margin-top: 24px; }
.pagination ul { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span {
    display: grid; place-items: center;
    min-width: 38px; height: 38px; padding-inline: 10px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600;
}
.pagination a:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pagination .is-current span { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pagination .gap span { border: 0; background: transparent; }

/* ═══════════════════════ static pages ══════════════════ */
.static-content {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: clamp(16px, 3vw, 30px);
    font-size: 16px; line-height: 2;
}
.static-content h3 { margin: 1.4em 0 .5em; font-size: 19px; }
.static-content a { color: var(--c-primary); text-decoration: underline; }

.site-form {
    margin-top: 20px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: clamp(16px, 3vw, 26px);
    display: grid; gap: 14px;
}
.site-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.site-form .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.site-form input, .site-form textarea, .site-form select {
    font-family: inherit; font-size: 15px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 10px 12px; background: var(--surface-2); color: var(--ink);
}
.site-form input:focus, .site-form textarea:focus {
    outline: none; border-color: var(--c-primary); background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 15%, transparent);
}
.site-form textarea { resize: vertical; }
.site-form span[aria-hidden] { color: var(--c-accent); }

.btn-primary, .btn-ghost {
    display: inline-grid; place-items: center;
    border: 1px solid transparent; border-radius: var(--r-sm);
    padding: 11px 26px; font-size: 15px; font-weight: 700;
    justify-self: start;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-secondary); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.form-success, .form-error {
    margin-top: 18px; padding: 14px 18px; border-radius: var(--r);
    font-weight: 600;
}
.form-success { background: #e8f8ef; border: 1px solid #b7e4c9; color: #14683c; }
.form-error   { background: #fdeceb; border: 1px solid #f6c4c1; color: #9b1c17; }

.search-page-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-page-form input {
    flex: 1; font-family: inherit; font-size: 15px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 11px 14px; background: var(--surface);
}
.search-page-form input:focus { outline: none; border-color: var(--c-primary); }
.search-page-form button {
    border: 0; background: var(--c-primary); color: #fff;
    padding: 11px 26px; border-radius: var(--r-sm); font-weight: 700;
}

/* ═══════════════════════ writer page ══════════════════ */
.writer-header {
    display: flex; gap: 18px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 20px; margin-bottom: 22px;
}
.writer-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; flex: 0 0 92px; }
.writer-photo--blank {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    color: #fff; font-size: 38px; font-weight: 800;
}
.writer-header h1 { font-size: 23px; }
.writer-title { margin: 4px 0 0; color: var(--c-primary); font-weight: 700; font-size: 14px; }
.writer-bio { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ═══════════════════════ widgets ══════════════════════ */
.widget {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); padding: 14px;
    box-shadow: var(--sh-1);
}
.widget .section-head { margin-bottom: 10px; }
.widget .section-head h2 { font-size: 15.5px; padding-block: 4px 8px; }
.widget-body > *:last-child { margin-bottom: 0; }
.widget .headline-list > li { padding: 9px 0; }
.widget .block--mostread .headline-list { border: 0; padding: 0; }

.fb-embed { width: 100%; height: 420px; border: 0; }

.wa-join {
    display: flex; align-items: center; gap: 10px;
    background: #25d366; color: #fff;
    padding: 12px 14px; border-radius: var(--r);
    font-weight: 700; font-size: 14.5px;
}
.wa-join:hover { background: #1da851; }
.wa-join svg { width: 22px; height: 22px; flex: 0 0 22px; }

.x-follow {
    display: block; text-align: center; background: #000; color: #fff;
    padding: 12px; border-radius: var(--r); font-weight: 700;
}

.newsletter-form p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.nl-row { display: flex; gap: 6px; }
.nl-row input {
    flex: 1; min-width: 0; font-family: inherit; font-size: 14px;
    border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px;
    background: var(--surface-2);
}
.nl-row button {
    border: 0; background: var(--c-primary); color: #fff;
    padding: 9px 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px;
}
.nl-msg { margin: 8px 0 0 !important; font-size: 13px; font-weight: 600; }
.nl-msg.is-ok  { color: #16803c; }
.nl-msg.is-err { color: #b42318; }

/* ═══════════════════════ footer ═══════════════════════ */
.site-footer { background: #14181c; color: #c3cad1; margin-top: 36px; }
.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 30px; padding-block: 38px 28px;
}
.footer-brand h2 { font-size: 21px; color: #fff; }
.footer-tagline { margin: 6px 0 0; color: var(--c-primary); font-weight: 700; font-size: 14px; }
.footer-about { margin: 12px 0 0; font-size: 14px; line-height: 1.9; color: #98a2ac; }

.footer-col h3 {
    font-size: 15px; color: #fff; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 1px solid #262c32;
}
.footer-links, .footer-contact { display: grid; gap: 8px; font-size: 14px; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-contact li { display: flex; gap: 8px; }
.footer-contact span { color: #6f7a84; min-width: 52px; }
.footer-contact a:hover { color: #fff; }

.footer-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.footer-social a {
    background: #1f252b; padding: 5px 13px; border-radius: 20px; font-size: 12.5px;
}
.footer-social a:hover { background: var(--c-primary); color: #fff; }

.footer-bottom {
    border-top: 1px solid #23282e; padding-block: 16px 20px;
    text-align: center; font-size: 13px; color: #7d878f;
}
.footer-note { margin: 0 0 6px; line-height: 1.9; }
.footer-copy { margin: 0; }

/* ═══════════════════ breaking news bar ════════════════ */
.breaking-bar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 95;
    display: flex; align-items: stretch;
    height: 46px; background: var(--c-breaking); color: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
}
.breaking-bar.is-hidden { display: none; }
.breaking-label {
    display: grid; place-items: center; padding-inline: 18px;
    background: rgba(0, 0, 0, .28);
    font-size: 14px; font-weight: 800; letter-spacing: .5px; white-space: nowrap;
}
.breaking-viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.breaking-track {
    display: flex; align-items: center; gap: 16px;
    white-space: nowrap; width: max-content;
    animation: ticker-run var(--dur, 45s) linear infinite;
}
.breaking-bar:hover .breaking-track { animation-play-state: paused; }
.breaking-track a { font-size: 15px; font-weight: 700; color: #fff; }
.breaking-track a:hover { text-decoration: underline; }
.breaking-track .sep { color: rgba(255, 255, 255, .5); }
.breaking-close {
    border: 0; background: rgba(0, 0, 0, .2); color: #fff;
    width: 42px; font-size: 22px; line-height: 1;
}
.breaking-close:hover { background: rgba(0, 0, 0, .38); }

/* ═══════════════════════ 404 ══════════════════════════ */
.error-page {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 60px 24px;
    text-align: center; box-shadow: var(--sh-1);
}
.error-page h1 { font-size: 78px; color: var(--c-primary); line-height: 1; }
.error-page h2 { margin: 10px 0 12px; font-size: 24px; }
.error-page p { color: var(--ink-3); max-width: 460px; margin-inline: auto; }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.error-actions .btn-primary, .error-actions .btn-ghost { justify-self: center; }

/* ══════════════════════ responsive ═══════════════════ */
@media (max-width: 1080px) {
    .layout-with-side { grid-template-columns: minmax(0, 1fr) 300px; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 900px) {
    .layout-with-side { grid-template-columns: 1fr; }
    .layout-side { position: static; }
    .featured { grid-template-columns: 1fr; }
    .featured-list { display: none; }
    .featured-dots { display: flex; }
    .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    body { font-size: 14.5px; }

    .topbar-inner { justify-content: space-between; row-gap: 6px; padding-block: 6px; }
    .topbar-links { order: 3; width: 100%; justify-content: center; font-size: 12.5px; }
    .topbar-date { margin-inline-start: 0; font-size: 12px; }
    .topbar-search input { width: 130px; }
    .social-mini { display: none; }

    .masthead-inner { justify-content: center; padding-block: 12px; }
    .masthead-banner { max-width: 100%; }

    .nav-toggle { display: flex; }
    .nav-list {
        display: none; position: absolute; inset-inline: 0; top: 100%;
        flex-direction: column; background: var(--c-primary);
        max-height: 70vh; overflow-y: auto;
        box-shadow: var(--sh-3); padding-bottom: 6px;
    }
    .nav-list.is-open { display: flex; }
    .nav-list > li > a { padding: 11px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
    .nav-list > li.is-active::after { display: none; }
    .mainnav-inner { position: relative; }

    .ticker-label { padding-inline: 12px; font-size: 12.5px; clip-path: none; }
    .ticker-all { display: none; }

    .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
    .card--wide { grid-template-columns: 120px minmax(0, 1fr); }
    .card--wide .card-title { font-size: 14.5px; }
    .card--wide .card-summary { display: none; }
    .card--wide .card-body { padding: 10px 12px; }

    .site-form .form-row { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; padding-block: 26px 18px; }

    .breaking-bar { height: 42px; }
    .breaking-label { padding-inline: 12px; font-size: 13px; }
    .breaking-track a { font-size: 14px; }
    body { padding-bottom: 46px; }

    .post-meta { gap: 10px; font-size: 12.5px; }
    .post-body { font-size: 16px; line-height: 1.95; }
}

@media (max-width: 420px) {
    .brand-mark { width: 44px; height: 44px; font-size: 25px; }
    .brand-text strong { font-size: 21px; }
    .card--wide { grid-template-columns: 1fr; }
    .card--wide .card-media img { aspect-ratio: 16 / 10; }
}

@media print {
    .topbar, .mainnav, .ticker, .breaking-bar, .layout-side, .ad-slot, .post-share, .site-footer { display: none !important; }
    body { background: #fff; padding: 0; }
    .post { border: 0; box-shadow: none; }
}

/* ══════════════════ YouTube channel section ═════════════════ */
.tube {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 14px;
}

.tube-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--r);
    overflow: hidden;
}
.tube-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.tube-facade {
    position: absolute; inset: 0;
    width: 100%; height: 100%; padding: 0;
    border: 0; background: #000; cursor: pointer;
    display: block;
}
.tube-facade img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease, opacity .25s;
}
.tube-facade:hover img { transform: scale(1.03); opacity: .88; }

.tube-play {
    position: absolute; inset: 0; margin: auto;
    width: 74px; height: 52px;
    display: grid; place-items: center;
    pointer-events: none;
}
.tube-play svg { width: 74px; height: 52px; }
.tube-play-bg { fill: #212121; opacity: .82; transition: fill .2s, opacity .2s; }
.tube-facade:hover .tube-play-bg { fill: #f00; opacity: 1; }

.tube-title {
    margin-top: 12px;
    font-size: clamp(16px, 1.7vw, 19px); font-weight: 700; line-height: 1.6;
}
.tube-meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin: 7px 0 0; font-size: 12.5px; color: var(--ink-3);
}
.tube-meta a {
    color: #c62828; font-weight: 700;
    margin-inline-start: auto;
}
.tube-meta a:hover { text-decoration: underline; }

.tube-list {
    display: grid; gap: 8px; align-content: start;
    max-height: 100%; overflow-y: auto;
}
.tube-list button {
    display: flex; gap: 10px; width: 100%; text-align: start;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--r); padding: 7px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.tube-list button:hover { border-color: #c62828; background: #fff; }
.tube-list li.is-active button { border-color: #c62828; background: #fff; }

.tl-thumb { position: relative; flex: 0 0 104px; }
.tl-thumb img { width: 104px; height: 60px; object-fit: cover; border-radius: var(--r-sm); }
.tl-badge {
    position: absolute; inset: 0; margin: auto;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(0, 0, 0, .62); color: #fff;
    display: grid; place-items: center;
}
.tl-badge svg { width: 13px; height: 13px; }

.tl-body { flex: 1; min-width: 0; display: grid; gap: 3px; align-content: center; }
.tl-title { font-size: 13.5px; font-weight: 600; line-height: 1.55; color: var(--ink); }
.tl-body small { font-size: 11.5px; color: var(--ink-3); }

@media (max-width: 900px) {
    .tube { grid-template-columns: 1fr; }
    .tube-list { max-height: none; }
}
@media (max-width: 767px) {
    .tube { padding: 10px; }
    .tube-play, .tube-play svg { width: 56px; height: 40px; }
    .tl-thumb, .tl-thumb img { flex-basis: 88px; width: 88px; height: 52px; }
}

/* ═══════════════════ popup advertisement ════════════════ */
.ad-popup {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(10, 14, 18, .62);
    display: grid; place-items: center; padding: 20px;
    animation: ad-pop-in .22s ease-out;
}
.ad-popup[hidden] { display: none; }
@keyframes ad-pop-in { from { opacity: 0; } to { opacity: 1; } }

.ad-popup-box {
    position: relative;
    max-width: min(560px, 94vw);
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-3);
    padding: 12px;
}
.ad-popup-box .ad-slot { margin: 0; }
.ad-popup-box img { border-radius: var(--r-sm); max-height: 72vh; width: auto; }

.ad-popup-close {
    position: absolute; top: -14px; inset-inline-end: -14px;
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid #fff; background: var(--c-accent); color: #fff;
    font-size: 21px; line-height: 1; cursor: pointer;
    box-shadow: var(--sh-2);
}
.ad-popup-close:hover { background: #a10d24; }

/* top-of-homepage slot */
.ad-home-top { margin-block: 0 4px; }

@media (max-width: 767px) {
    .ad-popup-close { top: -12px; inset-inline-end: -8px; width: 30px; height: 30px; font-size: 19px; }
}

/* ═══════════════════ visitor counter bar ════════════════ */
.visitor-bar {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px 28px;
    padding-block: 16px;
    border-top: 1px solid #23282e;
}
.vb-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: #9aa4ad;
}
.vb-label { color: #7d878f; }
.vb-num {
    font-size: 16px; font-weight: 800; color: #fff;
    font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.vb-online .vb-num { color: #4ade80; }
.vb-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
    animation: vb-pulse 2s infinite;
}
@keyframes vb-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); }
    70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .vb-dot { animation: none; } }
@media (max-width: 600px) {
    .visitor-bar { gap: 8px 18px; padding-block: 13px; }
    .vb-item { font-size: 12.5px; }
    .vb-num { font-size: 14.5px; }
}
