/* ============================================================================
   Newsfeed redesign — modern live news-wire. Scoped under .nf-app.
   Accent is themed per tenant via --nf-accent (set on .nf-app in the layout).
   ========================================================================== */
.nf-app {
    --nf-accent: #0c257b;
    --nf-accent-dark: #081a5c;
    --nf-ink: #16181d;
    --nf-muted: #6b7280;
    --nf-line: #e7e9f0;
    --nf-bg: #f4f5f7;
    --nf-card: #ffffff;
    --nf-radius: 12px;
    font-family: 'Inter', 'proxima-nova', system-ui, sans-serif;
    color: var(--nf-ink);
    background: var(--nf-bg);
    -webkit-font-smoothing: antialiased;
}
.nf-app *, .nf-app *::before, .nf-app *::after { box-sizing: border-box; }
.nf-app a { color: inherit; text-decoration: none; }
.nf-app img { display: block; max-width: 100%; }

.nf-wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* ---- live ribbon ---- */
.nf-ribbon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--nf-accent) 0%, var(--nf-accent-dark) 100%);
    color: #fff; border-radius: var(--nf-radius); padding: 14px 18px; margin: 16px 0; }
.nf-ribbon .live { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.nf-ribbon .live i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 0 rgba(255,77,79,.7); animation: nfPulse 1.6s infinite; }
.nf-ribbon p { margin: 0; font-size: 14px; color: rgba(255,255,255,.92); }
.nf-ribbon .upd { margin-left: auto; font-size: 12px; color: rgba(255,255,255,.7); }
@keyframes nfPulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,79,.6); } 70% { box-shadow: 0 0 0 7px rgba(255,77,79,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); } }

/* ---- 3-column grid ---- */
.nf-grid { display: grid; grid-template-columns: 244px minmax(0,1fr) 320px; gap: 22px; align-items: start; padding-bottom: 50px; }
.nf-left, .nf-right { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 16px; }
.nf-center { min-width: 0; }
@media (max-width: 1080px) { .nf-grid { grid-template-columns: minmax(0,1fr) 300px; } .nf-left { display: none; } }
@media (max-width: 860px) { .nf-grid { grid-template-columns: 1fr; } .nf-right { display: none; } }

/* ---- panels (sidebars) ---- */
.nf-panel { background: var(--nf-card); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); overflow: hidden; }
.nf-panel-h { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--nf-muted); padding: 14px 16px 8px; }

/* country segmented switcher */
.nf-countries { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 12px; }
.nf-country { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: #2a2f3a; }
.nf-country .fl { font-size: 17px; }
.nf-country:hover { background: #f1f2f6; }
.nf-country.on { background: color-mix(in srgb, var(--nf-accent) 12%, #fff); color: var(--nf-accent); }
.nf-country.on .chk { margin-left: auto; }

/* nav links */
.nf-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px 12px; }
.nf-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: #2a2f3a; }
.nf-nav a:hover { background: #f1f2f6; }
.nf-nav a.on { background: color-mix(in srgb, var(--nf-accent) 12%, #fff); color: var(--nf-accent); }
.nf-nav .hot { margin-left: auto; background: #E31E24; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }

/* topic chips */
.nf-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 16px; }
.nf-chip { font-size: 12.5px; font-weight: 600; color: #44495a; background: #eef0f4; border-radius: 999px; padding: 6px 12px; transition: background .15s, color .15s; }
.nf-chip:hover { background: #e2e6ee; }
.nf-chip.on { background: var(--nf-accent); color: #fff; }

/* ---- feed shared bits ---- */
.nf-source { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nf-source img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #eef0f4; flex-shrink: 0; border: 1px solid var(--nf-line); }
.nf-source .meta { min-width: 0; line-height: 1.25; }
.nf-source .nm { font-weight: 700; font-size: 13px; color: var(--nf-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-source .sub { font-size: 11.5px; color: var(--nf-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nf-cc { font-weight: 700; color: var(--nf-accent); background: color-mix(in srgb, var(--nf-accent) 10%, #fff); border-radius: 999px; padding: 1px 7px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; }
.nf-dot { width: 5px; height: 5px; border-radius: 50%; background: #ff4d4f; display: inline-block; }

/* ---- hero (lead) card ---- */
.nf-hero { display: block; background: var(--nf-card); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); overflow: hidden; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.nf-hero .media { position: relative; aspect-ratio: 16/9; background: #e9ebf1; overflow: hidden; }
.nf-hero .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.nf-hero:hover .media img { transform: scale(1.03); }
.nf-hero .flag-tag { position: absolute; top: 12px; left: 12px; background: rgba(8,10,30,.78); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px); display: inline-flex; align-items: center; gap: 6px; }
.nf-hero .body { padding: 16px 18px 14px; }
.nf-hero h2 { font-family: 'proxima-nova', 'Inter', sans-serif; font-weight: 800; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.18; margin: 8px 0 8px; color: var(--nf-ink); }
.nf-hero p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #444b58;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- compact row card ---- */
.nf-list { display: flex; flex-direction: column; gap: 12px; }
.nf-item { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px; background: var(--nf-card); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); padding: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: box-shadow .2s, transform .2s; }
.nf-item:hover { box-shadow: 0 14px 30px -20px rgba(16,24,40,.5); transform: translateY(-1px); }
.nf-item .thumb { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: #e9ebf1; }
.nf-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.nf-item .main { min-width: 0; display: flex; flex-direction: column; }
.nf-item h3 { font-family: 'proxima-nova','Inter',sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; margin: 7px 0 5px; color: var(--nf-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nf-item p { margin: 0 0 8px; font-size: 13px; color: #5a6172; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 520px) { .nf-item { grid-template-columns: 104px minmax(0,1fr); gap: 11px; } .nf-item p { display: none; } }

/* youtube embeds in feed */
.nf-embed { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.nf-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- action bar (votes / comments / share / read) ---- */
.nf-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #f0f1f5; flex-wrap: wrap; }
.nf-hero .nf-actions { padding: 12px 0 0; }
.nf-vote { display: inline-flex; align-items: center; gap: 2px; background: #f3f4f7; border-radius: 999px; padding: 2px; }
.nf-vote button { border: none; background: none; cursor: pointer; width: 30px; height: 28px; border-radius: 999px; font-size: 14px; color: var(--nf-muted); display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.nf-vote button:hover { background: #e6e8ee; }
.nf-vote .up.on { color: #16a34a; background: #dcfce7; }
.nf-vote .down.on { color: #dc2626; background: #fee2e2; }
.nf-vote .score { font-size: 13px; font-weight: 800; min-width: 22px; text-align: center; color: var(--nf-ink); font-variant-numeric: tabular-nums; }
.nf-act { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--nf-line); background: #fff; color: #44495a; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.nf-act:hover { border-color: var(--nf-accent); color: var(--nf-accent); }
.nf-act .ic { font-size: 14px; line-height: 1; }
.nf-act.read { margin-left: auto; background: var(--nf-accent); border-color: var(--nf-accent); color: #fff; }
.nf-act.read:hover { filter: brightness(1.07); color: #fff; }
.nf-act.is-on { border-color: var(--nf-accent); color: var(--nf-accent); background: color-mix(in srgb, var(--nf-accent) 8%, #fff); }
@media (max-width: 520px) { .nf-act.read span.t { display: none; } }

/* ---- comments panel ---- */
.nf-comments { display: none; margin-top: 12px; border-top: 1px dashed var(--nf-line); padding-top: 12px; }
.nf-comments.open { display: block; }
.nf-comments .cbox { display: flex; gap: 8px; margin-bottom: 10px; }
.nf-comments textarea { flex: 1; border: 1.5px solid #dfe2ec; border-radius: 9px; padding: 9px 11px; font-size: 13.5px; font-family: inherit; resize: vertical; min-height: 40px; outline: none; }
.nf-comments textarea:focus { border-color: var(--nf-accent); }
.nf-comments .send { border: none; background: var(--nf-accent); color: #fff; border-radius: 9px; padding: 0 16px; font-weight: 700; font-size: 13px; cursor: pointer; }
.nf-comments .login-hint { font-size: 12.5px; color: var(--nf-muted); background: #f7f8fb; border: 1px solid var(--nf-line); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; }
.nf-comments .login-hint a { color: var(--nf-accent); font-weight: 700; }
.nf-clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nf-clist li { display: flex; gap: 9px; }
.nf-clist .av { width: 28px; height: 28px; border-radius: 50%; background: var(--nf-accent); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase; }
.nf-clist .bub { background: #f3f4f7; border-radius: 10px; padding: 8px 11px; min-width: 0; }
.nf-clist .bub .nm { font-weight: 700; font-size: 12.5px; }
.nf-clist .bub .tx { font-size: 13.5px; color: #2a2f3a; white-space: pre-wrap; word-wrap: break-word; margin-top: 1px; }
.nf-clist .bub .ago { font-size: 11px; color: var(--nf-muted); margin-top: 3px; }
.nf-cmore { margin-top: 10px; text-align: center; }
.nf-cmore button { background: none; border: none; color: var(--nf-accent); font-weight: 700; font-size: 13px; cursor: pointer; }
.nf-cempty { font-size: 13px; color: var(--nf-muted); padding: 6px 0; }

/* ---- trending rail ---- */
.nf-trend { list-style: none; margin: 0; padding: 6px 0; }
.nf-trend li { display: flex; gap: 11px; padding: 9px 14px; border-bottom: 1px solid #f3f4f7; }
.nf-trend li:last-child { border-bottom: none; }
.nf-trend .rk { font-family: 'proxima-nova','Inter',sans-serif; font-weight: 900; font-size: 18px; color: color-mix(in srgb, var(--nf-accent) 35%, #c2c6d4); width: 18px; flex-shrink: 0; }
.nf-trend .tx { min-width: 0; }
.nf-trend .tx p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--nf-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nf-trend .tx .mm { font-size: 11px; color: var(--nf-muted); margin-top: 3px; }
.nf-viewall { display: block; text-align: center; padding: 12px; font-weight: 700; font-size: 13px; color: var(--nf-accent); border-top: 1px solid var(--nf-line); }

/* ---- load more + skeletons + empty ---- */
.nf-more { text-align: center; padding: 22px 0 0; }
.nf-more button { background: #fff; border: 1px solid var(--nf-line); color: var(--nf-accent); font-weight: 700; font-size: 14px; padding: 12px 28px; border-radius: 999px; cursor: pointer; transition: box-shadow .15s; }
.nf-more button:hover { box-shadow: 0 8px 20px -10px rgba(16,24,40,.4); }
.nf-more button[disabled] { opacity: .6; pointer-events: none; }
.nf-empty { text-align: center; color: var(--nf-muted); background: var(--nf-card); border: 1px solid var(--nf-line); border-radius: var(--nf-radius); padding: 44px 20px; }
.nf-sk { background: linear-gradient(90deg,#eef0f4 25%,#e3e6ee 37%,#eef0f4 63%); background-size: 400% 100%; animation: nfShimmer 1.4s infinite; border-radius: 8px; }
@keyframes nfShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.nf-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #0A0D28; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9999; }
.nf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
