/*!
 * Newspaper theme for Botble CMS
 * A modern, reusable news & magazine design inspired by tagDiv Newspaper Pro.
 * Colors are driven by CSS variables so they can be themed per-project and support dark mode.
 */

:root {
    --np-primary: #1a1a1a;
    --np-primary-hover: #444444;
    --np-link: var(--np-text);          /* text-link base colour (mode aware) */
    --np-link-hover: #444444;            /* hover/active text accent (mode aware) */

    --np-bg: #f4f5f7;
    --np-surface: #ffffff;
    --np-surface-2: #f7f8fa;
    --np-text: #1a1a1a;
    --np-text-soft: #5b6168;
    --np-text-muted: #8a9099;
    --np-border: #e6e8eb;
    --np-heading-font: "Playfair Display", Georgia, "Times New Roman", serif;
    --np-body-font: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --np-radius: 6px;
    --np-shadow: 0 2px 14px rgba(20, 23, 28, 0.06);
    --np-shadow-lg: 0 12px 34px rgba(20, 23, 28, 0.14);
    --np-container: 1200px;
}

html[data-theme="dark"] {
    --np-bg: #121417;
    --np-surface: #1b1e22;
    --np-surface-2: #23272c;
    --np-text: #ecedef;
    --np-text-soft: #b4b9c0;
    --np-text-muted: #868c95;
    --np-border: #2c3137;
    --np-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
    --np-shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.55);
    --np-link-hover: #ffffff;            /* visible hover accent on dark backgrounds */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--np-bg);
    color: var(--np-text);
    font-family: var(--np-body-font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--np-link-hover); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--np-heading-font);
    color: var(--np-text);
    line-height: 1.2;
    margin: 0 0 .5em;
}

.container { max-width: var(--np-container); }

/* ============================ TOP BAR ============================ */
.np-topbar {
    background: var(--np-primary);
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}
html[data-theme="dark"] .np-topbar { background: #0c0e10; }
.np-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    gap: 18px;
}
.np-topbar__date { letter-spacing: .3px; text-transform: uppercase; font-size: 12px; }
.np-topbar__right { display: flex; align-items: center; gap: 18px; }
.np-topbar__account { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.np-topbar__account a { color: rgba(255, 255, 255, .8); display: inline-flex; align-items: center; gap: 6px; }
.np-topbar__account a:hover { color: #fff; }
.np-avatar { border-radius: 50%; }
.np-lang { color: rgba(255, 255, 255, .8); }

.np-social { list-style: none; display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; }
.np-social a { color: rgba(255, 255, 255, .72); font-size: 15px; }
.np-social a:hover { color: #fff; }

/* ============================ HEADER ============================ */
.np-header { background: var(--np-surface); border-bottom: 1px solid var(--np-border); }
.np-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
}
.np-logo { display: inline-flex; align-items: center; font-family: var(--np-heading-font); font-weight: 900; font-size: 30px; letter-spacing: -.5px; }
.np-logo img { max-height: 56px; width: auto; }
.np-header__ad { margin-left: auto; }
.np-header__ad:empty { display: none; }

/* ============================ NAV / MEGA MENU ============================ */
.np-nav {
    background: var(--np-primary);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--np-shadow);
}
html[data-theme="dark"] .np-nav { background: #0c0e10; }
.np-nav__inner { display: flex; align-items: center; gap: 12px; }
.np-nav__toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 12px 6px;
}
.np-nav__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.np-icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    width: 40px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.np-icon-btn:hover { color: #fff; }
.np-darkmode-toggle .np-icon-sun { display: none; }
html[data-theme="dark"] .np-darkmode-toggle .np-icon-sun { display: inline-flex; }
html[data-theme="dark"] .np-darkmode-toggle .np-icon-moon { display: none; }

.np-menu, .np-submenu { list-style: none; margin: 0; padding: 0; }
.np-menu { display: flex; flex-wrap: wrap; align-items: stretch; }
.np-menu > .np-menu__item { position: relative; }
.np-menu > .np-menu__item > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .88);
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 15px 16px;
    position: relative;
}
.np-menu > .np-menu__item > a::after {
    content: "";
    position: absolute;
    left: 16px; right: 16px; bottom: 0;
    height: 3px;
    background: var(--np-item-accent, #fff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.np-menu > .np-menu__item:hover > a,
.np-menu > .np-menu__item.active > a { color: #fff; }
.np-menu > .np-menu__item:hover > a::after,
.np-menu > .np-menu__item.active > a::after { transform: scaleX(1); }
.np-menu__caret { font-size: 13px; opacity: .8; }

/* dropdown / mega */
.np-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--np-surface);
    border-top: 3px solid var(--np-item-accent, var(--np-primary));
    box-shadow: var(--np-shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .18s ease;
    z-index: 30;
}
.np-menu__item:hover > .np-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.np-submenu .np-menu__item > a {
    display: block;
    padding: 9px 18px;
    color: var(--np-text-soft);
    font-size: 14px;
    font-weight: 500;
}
.np-submenu .np-menu__item > a:hover { color: var(--np-link-hover); background: var(--np-surface-2); }
.np-submenu .np-submenu { top: 0; left: 100%; }

/* ============================ BREAKING TICKER ============================ */
.np-breaking { background: var(--np-surface); border-bottom: 1px solid var(--np-border); }
.np-breaking__inner { display: flex; align-items: center; gap: 16px; padding: 9px 0; overflow: hidden; }
.np-breaking__label {
    flex-shrink: 0;
    background: var(--np-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 2px;
}
.np-breaking__ticker { flex: 1; overflow: hidden; }
.np-breaking__track {
    list-style: none;
    display: flex;
    gap: 44px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    animation: np-ticker 36s linear infinite;
}
.np-breaking__track:hover { animation-play-state: paused; }
.np-breaking__track a { font-size: 13.5px; color: var(--np-text-soft); }
.np-breaking__track a:hover { color: var(--np-link-hover); }
@keyframes np-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================ SEARCH OVERLAY ============================ */
.np-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 15, .94);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}
.np-search-overlay.is-open { opacity: 1; visibility: visible; }
.np-search-overlay__close {
    position: absolute;
    top: 26px; right: 32px;
    background: none; border: none;
    color: #fff; font-size: 40px; line-height: 1; cursor: pointer;
}
.np-search-overlay__box { width: 640px; max-width: 90vw; }
.np-search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, .5);
    color: #fff;
    font-family: var(--np-heading-font);
    font-size: 30px;
    padding: 12px 0;
    outline: none;
}
.np-search-input::placeholder { color: rgba(255, 255, 255, .4); }
.np-search-result { margin-top: 22px; max-height: 50vh; overflow-y: auto; color: #fff; }
.np-search-result__title { color: rgba(255, 255, 255, .6); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.np-search-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.np-search-list a { display: flex; align-items: center; gap: 12px; color: #fff; padding: 8px; border-radius: var(--np-radius); }
.np-search-list a:hover { background: rgba(255, 255, 255, .08); }
.np-search-list__thumb { width: 56px; height: 42px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.np-search-list__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================ CATEGORY BADGE + META ============================ */
.np-cat-badge {
    display: inline-block;
    background: var(--np-item-accent, var(--np-primary));
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
}
.np-cat-badge:hover { filter: brightness(1.1); }
.np-cat-badge--sm { font-size: 10px; padding: 3px 8px; margin-bottom: 7px; }
.np-cat-badge--float { position: absolute; top: 12px; left: 12px; margin: 0; z-index: 2; }

.np-card__meta, .np-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: var(--np-text-muted);
    font-size: 13px;
}
.np-meta__item { display: inline-flex; align-items: center; gap: 5px; }
.np-meta__item i, .np-meta__item svg { font-size: 14px; }

/* ============================ CARDS ============================ */
.np-card { position: relative; }
.np-card__thumb { position: relative; overflow: hidden; border-radius: var(--np-radius); background: var(--np-surface-2); }
.np-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.np-card:hover .np-card__thumb img { transform: scale(1.06); }
.np-card__overlay { position: absolute; inset: 0; z-index: 3; }
.np-card__title { font-size: 21px; font-weight: 800; margin: 0 0 8px; }
.np-card__title a:hover { color: var(--np-link-hover); }
.np-card__title--sm { font-size: 16px; font-weight: 700; }
.np-card__title--xs { font-size: 14px; font-weight: 600; line-height: 1.35; }
.np-card__excerpt { color: var(--np-text-soft); font-size: 14.5px; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-card__body { padding-top: 14px; }

/* hero / overlay style */
.np-card--hero .np-card__thumb { aspect-ratio: 16 / 10; }
.np-card--hero .np-card__body,
.np-card--overlay .np-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .05));
    z-index: 2;
    pointer-events: none;
}
.np-card--hero .np-card__body * ,
.np-card--overlay .np-card__body * { pointer-events: auto; }
.np-card--hero .np-card__title { color: #fff; font-size: 30px; }
.np-card--hero .np-card__title a, .np-card--overlay .np-card__title a { color: #fff; }
.np-card--hero .np-card__meta { color: rgba(255, 255, 255, .85); }
.np-card--overlay .np-card__thumb { aspect-ratio: 1 / 1; }
.np-card--overlay .np-card__body { padding: 14px; }
.np-card--overlay .np-card__title { color: #fff; }

/* grid / lead / compact */
.np-card--grid .np-card__thumb,
.np-card--lead .np-card__thumb,
.np-card--compact .np-card__thumb { aspect-ratio: 16 / 9; }
.np-card--grid, .np-card--lead, .np-card--compact {
    background: var(--np-surface);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    overflow: hidden;
    height: 100%;
    box-shadow: var(--np-shadow);
}
.np-card--grid .np-card__body,
.np-card--lead .np-card__body,
.np-card--compact .np-card__body { padding: 16px; }

/* row (list) */
.np-list { display: flex; flex-direction: column; gap: 18px; }
.np-card--row { display: flex; gap: 14px; align-items: flex-start; }
.np-card--row .np-card__thumb { width: 116px; height: 84px; flex-shrink: 0; }
.np-card--row .np-card__body { padding: 0; }
.np-card--row .np-card__title { margin-bottom: 5px; }

/* mini (sidebar widget) */
.np-card--mini { display: flex; gap: 12px; align-items: flex-start; }
.np-card--mini .np-card__thumb { width: 84px; height: 62px; flex-shrink: 0; }
.np-card--mini .np-card__body { padding: 0; }

/* ============================ SECTIONS / BLOCKS ============================ */
.np-main { display: block; }
.np-section { padding: 38px 0; }
.np-block--muted { background: var(--np-surface-2); }
.np-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--np-border);
    position: relative;
}
.np-block__title {
    position: relative;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin: 0;
    padding: 0 0 12px;
}
.np-block__title::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%;
    height: 3px;
    background: var(--np-item-accent, var(--np-primary));
}
.np-block__title--sm { font-size: 17px; padding-bottom: 9px; }
.np-block__more { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--np-text-muted); display: inline-flex; align-items: center; gap: 3px; }
.np-block__more:hover { color: var(--np-link-hover); }
.np-block__header--sm { margin-bottom: 16px; }

.np-mini-block { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); padding: 16px; height: 100%; box-shadow: var(--np-shadow); }
.np-linklist { list-style: none; margin: 14px 0 0; padding: 0; }
.np-linklist li { padding: 9px 0; border-top: 1px solid var(--np-border); font-size: 14px; font-weight: 600; }
.np-linklist li:first-child { border-top: none; }
.np-linklist a:hover { color: var(--np-link-hover); }

/* trending */
.np-trending { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.np-trending__item { display: flex; gap: 14px; align-items: flex-start; }
.np-trending__rank { font-family: var(--np-heading-font); font-size: 34px; font-weight: 900; line-height: 1; color: var(--np-border); flex-shrink: 0; }
.np-trending__thumb { flex-shrink: 0; width: 92px; height: 68px; border-radius: var(--np-radius); overflow: hidden; display: block; position: relative; }
.np-trending__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.np-trending__item:hover .np-trending__thumb img { transform: scale(1.06); }
.np-trending__body { flex: 1; min-width: 0; }
.np-trending--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 575.98px) { .np-trending--cols-2 { grid-template-columns: 1fr; } }

/* featured-categories-posts: the mini-block is the white container; the lead card inside
   must not carry its own box or stretch, otherwise the link list is pushed outside it. */
.np-mini-block .np-card--compact { height: auto; background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.np-mini-block .np-card--compact .np-card__thumb { border-radius: var(--np-radius); overflow: hidden; }
.np-mini-block .np-card--compact .np-card__body { padding: 12px 0 0; }

/* galleries */
.np-gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--np-radius); overflow: hidden; }
.np-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.np-gallery-item:hover img { transform: scale(1.06); }
.np-gallery-item__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); }

/* ============================ SIDEBAR & WIDGETS ============================ */
.np-sidebar { display: flex; flex-direction: column; gap: 26px; }
.np-widget { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); padding: 18px; box-shadow: var(--np-shadow); }
.np-widget__header { margin-bottom: 16px; border-bottom: 2px solid var(--np-border); position: relative; }
.np-widget__title { font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding-bottom: 10px; margin: 0; position: relative; }
.np-widget__title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 3px; background: var(--np-primary); }
.np-widget__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.np-widget__list > li { list-style: none; padding-left: 0; }
.np-widget__list > li::marker { content: ""; }
.np-widget__list > li::before { content: none; }

.np-cat-list { list-style: none; margin: 0; padding: 0; }
.np-cat-list__item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 10px 14px; border-top: 1px solid var(--np-border); position: relative; font-weight: 600; }
.np-cat-list__item:first-child { border-top: none; }
.np-cat-list__item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; background: var(--np-item-accent, var(--np-primary)); border-radius: 2px; }
.np-cat-list__item a:hover { color: var(--np-link-hover); }
.np-cat-list__count { color: var(--np-text-muted); font-size: 13px; font-weight: 500; }

.np-tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.np-tag { display: inline-block; padding: 6px 12px; background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: 3px; font-size: 13px; font-weight: 500; }
.np-tag:hover { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }

.np-sidebar__ad { text-align: center; }
.np-sidebar__ad:empty { display: none; }

/* ============================ BREADCRUMBS ============================ */
.np-page-intro { background: var(--np-surface); border-bottom: 1px solid var(--np-border); padding: 34px 0; position: relative; }
.np-page-intro--image { background-size: cover; background-position: center; color: #fff; }
.np-page-intro__overlay { position: absolute; inset: 0; background: rgba(12, 14, 18, .62); }
.np-page-intro .container { position: relative; z-index: 2; }
.np-page-intro__title { font-size: 32px; font-weight: 900; margin: 0 0 6px; }
.np-page-intro--image .np-page-intro__title { color: #fff; }
.np-page-intro .breadcrumb { margin: 0; font-size: 13px; }
.np-page-intro--image .breadcrumb, .np-page-intro--image .breadcrumb a { color: rgba(255,255,255,.85); }

/* ============================ ARTICLE ============================ */
.np-article { padding: 36px 0 0; }
.np-article__header { max-width: 860px; margin: 0 auto; text-align: center; }
.np-article__title { font-size: 40px; font-weight: 900; line-height: 1.15; margin: 8px 0 14px; }
.np-article__lead { font-size: 19px; color: var(--np-text-soft); margin: 0 0 16px; }
.np-article__meta { justify-content: center; margin-bottom: 28px; }
.np-article__hero { margin-bottom: 36px; }
.np-article__hero img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--np-radius); }
.np-article__content { font-size: 17px; line-height: 1.8; }
.np-article__content img { border-radius: var(--np-radius); }
.np-article__content h2, .np-article__content h3 { margin-top: 1.4em; }
.np-article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0; padding-top: 20px; border-top: 1px solid var(--np-border); }
.np-article__tags a { padding: 5px 12px; background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: 3px; font-size: 13px; }
.np-article__tags a:hover { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }
.np-article__share { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.np-article__share > span { font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }

.np-author-box { display: flex; gap: 18px; align-items: flex-start; background: var(--np-surface-2); border: 1px solid var(--np-border); border-left: 4px solid var(--np-primary); border-radius: var(--np-radius); padding: 22px; margin: 30px 0; }
.np-author-box__avatar img { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; }
.np-author-box__label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--np-text-muted); }
.np-author-box__name { font-size: 20px; margin: 2px 0 8px; }
.np-author-box__bio { color: var(--np-text-soft); margin: 0; font-size: 14.5px; }

.np-related { margin-top: 40px; }
.np-article__comments { margin-top: 40px; }

/* ---- Rich text (article/page prose) ---- */
/* Scoped to .np-prose only — NOT bare .ck-content, because the homepage and other
   shortcode-driven pages wrap their whole layout in .ck-content. */
.np-prose { color: var(--np-text); }
.np-prose p { margin: 0 0 1.2em; }
.np-prose a { color: var(--np-link); text-decoration: underline; text-underline-offset: 2px; }
.np-prose a:hover { color: var(--np-link-hover); }
.np-prose h2, .np-prose h3, .np-prose h4 { margin: 1.6em 0 .6em; line-height: 1.25; }
.np-prose h2 { font-size: 28px; }
.np-prose h3 { font-size: 23px; }
.np-prose h4 { font-size: 20px; }
.np-prose ul, .np-prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.np-prose li { margin-bottom: .5em; }
.np-prose img { height: auto; border-radius: var(--np-radius); }
.np-prose figure { margin: 1.6em 0; max-width: 100%; }
.np-prose figure.image { display: table; }
.np-prose figure.image-style-align-center { margin-left: auto; margin-right: auto; }
.np-prose figure.image-style-align-left { float: left; margin: .4em 1.6em 1em 0; }
.np-prose figure.image-style-align-right { float: right; margin: .4em 0 1em 1.6em; }
.np-prose figcaption { display: table-caption; caption-side: bottom; padding: 8px 4px 0; font-size: 13.5px; color: var(--np-text-muted); text-align: center; }
.np-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--np-primary); font-family: var(--np-heading-font); font-size: 21px; font-style: italic; line-height: 1.5; color: var(--np-text); }
.np-prose blockquote p:last-child { margin-bottom: 0; }
.np-prose hr { border: 0; border-top: 1px solid var(--np-border); margin: 2em 0; }
.np-prose pre { background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: var(--np-radius); padding: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 1.2em; }
.np-prose code { background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: 3px; padding: 1px 6px; font-size: .9em; }
.np-prose pre code { background: none; border: 0; padding: 0; }
.np-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; }
.np-prose table td, .np-prose table th { border: 1px solid var(--np-border); padding: 10px 12px; text-align: left; }
.np-prose table th, .np-prose table thead td { background: var(--np-surface-2); font-weight: 700; }
.np-prose .media, .np-prose iframe { max-width: 100%; }

/* ============================ PAGINATION / EMPTY / SETUP / ERROR ============================ */
.np-pagination { margin-top: 34px; display: flex; justify-content: center; }
.np-pagination .pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.np-pagination .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--np-border); border-radius: var(--np-radius); color: var(--np-text); background: var(--np-surface); }
.np-pagination .active .page-link, .np-pagination .page-item.active .page-link { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }
.np-empty { background: var(--np-surface); border: 1px dashed var(--np-border); border-radius: var(--np-radius); padding: 40px; text-align: center; color: var(--np-text-muted); }

.np-setup { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); padding: 34px; margin: 40px 0; box-shadow: var(--np-shadow); }
.np-setup__title { font-size: 26px; }
.np-setup__steps { padding-left: 20px; color: var(--np-text-soft); }
.np-setup__steps li { margin-bottom: 8px; }
.np-setup__code { margin-top: 18px; background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: var(--np-radius); padding: 16px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.9; color: var(--np-text); }

.np-error { text-align: center; padding: 80px 0; }
.np-error__code { font-size: 120px; font-weight: 900; line-height: 1; color: var(--np-text); margin: 0; }
.np-error__title { font-size: 28px; margin: 10px 0; }
.np-error__text { color: var(--np-text-soft); margin-bottom: 26px; }
.np-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--np-primary); color: #fff; padding: 12px 28px; border-radius: 30px; font-weight: 600; }
.np-btn:hover { color: #fff; filter: brightness(1.12); }

/* ============================ FOOTER ============================ */
.np-footer { background: #14161a; color: rgba(255, 255, 255, .68); margin-top: 10px; }
html[data-theme="dark"] .np-footer { background: #0b0d0f; }
.np-footer__top { padding: 50px 0 30px; }
.np-footer__title { color: #fff; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.np-footer__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--np-primary); }
html[data-theme="dark"] .np-footer__title::after,
.np-footer .np-footer__title::after { background: #fff; }
.np-footer__about { font-size: 14px; line-height: 1.7; }
.np-footer__contact { list-style: none; margin: 14px 0 0; padding: 0; }
.np-footer__contact li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.np-footer__contact a:hover { color: #fff; }
.np-footer__links { list-style: none; margin: 0; padding: 0; }
.np-footer__links li { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.np-footer__links a:hover { color: #fff; }
.np-footer__widget .np-widget__list { gap: 14px; }
.np-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }
.np-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.np-copyright { font-size: 13.5px; }
.np-copyright a { color: #fff; }
.np-social--footer { gap: 14px; }

/* back to top */
#np-back-to-top {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 46px; height: 46px;
    border: none; border-radius: 50%;
    background: var(--np-primary);
    color: #fff; font-size: 20px;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: all .25s ease;
    z-index: 1030;
    box-shadow: var(--np-shadow-lg);
}
#np-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================ SKELETONS ============================ */
.np-skeleton { position: relative; overflow: hidden; background: var(--np-surface-2); border-radius: var(--np-radius); }
.np-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: np-shimmer 1.4s infinite; }
html[data-theme="dark"] .np-skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes np-shimmer { to { transform: translateX(100%); } }
.np-skeleton--hero { aspect-ratio: 16 / 10; }
.np-skeleton--card { aspect-ratio: 1 / 1; }
.np-skeleton--lead { aspect-ratio: 16 / 11; }
.np-skeleton--row { height: 84px; margin-bottom: 16px; }
.np-skeleton--line { height: 28px; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 991.98px) {
    .np-nav__toggle { display: inline-flex; }
    .np-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: var(--np-surface);
        box-shadow: var(--np-shadow-lg);
        padding: 8px 0;
        display: none;
    }
    .np-nav.is-open .np-menu { display: flex; }
    .np-menu > .np-menu__item > a { color: var(--np-text); padding: 12px 18px; }
    .np-menu > .np-menu__item > a::after { display: none; }
    .np-submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; padding-left: 14px; display: none; }
    .np-menu__item.is-open > .np-submenu { display: block; }
    .np-card--hero .np-card__title { font-size: 24px; }
    .np-article__title { font-size: 30px; }
}

@media (max-width: 767.98px) {
    .np-section { padding: 28px 0; }
    .np-card__title { font-size: 19px; }
    .np-trending { grid-template-columns: 1fr; }
    .np-search-list { grid-template-columns: 1fr; }
    .np-author-box { flex-direction: column; }
    .np-block__title { font-size: 19px; }
    .np-article__title { font-size: 26px; }
}

/* RTL tweaks */
[dir="rtl"] .np-menu > .np-menu__item > a::after { transform-origin: right; }
[dir="rtl"] .np-cat-list__item { padding: 10px 14px 10px 0; }
[dir="rtl"] .np-cat-list__item::before { left: auto; right: 0; }
[dir="rtl"] #np-back-to-top { right: auto; left: 22px; }

/* ===== tagDiv-style featured hero ([featured-posts]) ===== */
.np-hero--tagdiv .np-card__title,
.np-hero--tagdiv .np-card__title a { font-family: var(--np-body-font); }   /* sans-serif, override serif headings */
.np-hero--tagdiv .np-card--hero .np-card__title { font-weight: 800; line-height: 1.25; }
.np-hero__meta { text-transform: uppercase; letter-spacing: .5px; font-size: 11px; gap: 12px; }

.np-hero__side { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.np-card--overlay-wide .np-card__thumb { aspect-ratio: 16 / 9; }           /* row-1 wide post */
.np-card--overlay-wide .np-card__title { font-size: 18px; }

/* Lead card fills the full hero height so the left column is height-matched to
   the right stack (wide + 2 overlay), tagDiv-style full-bleed image + bottom title. */
.np-hero .col-lg-7 { display: flex; }
.np-hero .np-card--hero { width: 100%; height: 100%; }
.np-hero .np-card--hero .np-card__thumb { aspect-ratio: auto; height: 100%; min-height: 460px; }
@media (max-width: 991.98px) {
    .np-hero .np-card--hero .np-card__thumb { min-height: 300px; }
}

/* Ad placeholders */
.np-ad { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; background:var(--np-surface-2); border:1px dashed var(--np-border); border-radius:var(--np-radius); color:var(--np-text-muted); text-align:center; min-height:90px; padding:14px; }
.np-ad span { font-size:10px; letter-spacing:1px; text-transform:uppercase; }
.np-ad strong { font-size:16px; font-weight:800; color:var(--np-text-soft); }
.np-ad--box { min-height:250px; }
.np-header__ad .np-ad--leaderboard { min-width:320px; }

/* Kill default list markers on custom theme lists */
.np-linklist > li::marker, .np-cat-list > li::marker, .np-footer__links > li::marker, .np-footer__contact > li::marker, .np-menu > li::marker, .np-submenu > li::marker { content: ""; }
.np-linklist > li, .np-cat-list > li { list-style: none; }

/* ============================ ENHANCEMENTS ============================ */
/* Smooth in-page navigation with offset for the sticky nav */
html { scroll-behavior: smooth; }
.np-prose [id], .np-article [id] { scroll-margin-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Reading progress bar */
.np-read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1040; background: var(--np-primary); transition: width .1s linear; }
html[data-theme="dark"] .np-read-progress { background: #fff; }

/* Reading-time meta item shares .np-meta__item styling automatically */

/* Sticky condensed header */
.np-nav { transition: padding .2s ease, box-shadow .2s ease; }
.np-nav.is-stuck { box-shadow: var(--np-shadow-lg); }
.np-nav.is-stuck .np-menu > .np-menu__item > a { padding-top: 10px; padding-bottom: 10px; }
.np-nav.is-stuck .np-icon-btn { height: 38px; }

/* Subtle card lift on hover (body cards only — overlay/hero cards keep their look) */
.np-card--grid, .np-card--compact, .np-card--lead { transition: transform .2s ease; }
.np-card--grid:hover, .np-card--compact:hover, .np-card--lead:hover { transform: translateY(-3px); }

/* Table of contents */
.np-toc { background: var(--np-surface-2); border: 1px solid var(--np-border); border-left: 4px solid var(--np-primary); border-radius: var(--np-radius); padding: 16px 20px; margin: 0 0 28px; }
html[data-theme="dark"] .np-toc { border-left-color: #fff; }
.np-toc__title { font-family: var(--np-heading-font); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 10px; }
.np-toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.np-toc__item { margin: 6px 0; line-height: 1.4; }
.np-toc__item--h3 { padding-left: 16px; font-size: 14px; }
.np-toc__item a { color: var(--np-text-soft); text-decoration: none; }
.np-toc__item a:hover { color: var(--np-link-hover); text-decoration: underline; }

/* Most-read / popular posts widget */
.np-popular { list-style: none; counter-reset: pop; margin: 0; padding: 0; }
.np-popular__item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--np-border); }
.np-popular__item:last-child { border-bottom: 0; padding-bottom: 0; }
.np-popular__rank { flex-shrink: 0; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--np-surface-2); border: 1px solid var(--np-border); font-weight: 800; font-size: 13px; color: var(--np-text-soft); }
.np-popular__item:first-child .np-popular__rank { background: var(--np-primary); color: #fff; border-color: var(--np-primary); }
html[data-theme="dark"] .np-popular__item:first-child .np-popular__rank { background: #fff; color: #14161a; border-color: #fff; }
.np-popular__link { font-family: var(--np-heading-font); font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--np-text); }
.np-popular__link:hover { color: var(--np-link-hover); }

/* Sticky aside on article pages (desktop) */
@media (min-width: 992px) {
    .np-article__aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 24px; }
}
.np-article__aside .np-widget { margin-bottom: 0; }
