/*
Theme Name: Nabaa
Theme URI: https://example.com/nabaa
Author: Nabaa Studio
Author URI: https://example.com
Description: Nabaa is a fast, modern and AdSense-ready news & magazine theme for Arabic (RTL) and English (LTR) websites. It ships with a magazine homepage, breaking news ticker, dark mode, category colors, built-in ad slots, ads.txt manager, schema markup, custom widgets and locally hosted fonts — no jQuery and no page builders required.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nabaa
Domain Path: /languages
Tags: news, blog, two-columns, right-sidebar, left-sidebar, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, theme-options, editor-style, wide-blocks, block-styles
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--nb-accent: #e5432d;
	--nb-accent-ink: #ffffff;
	--nb-bg: #f6f5f1;
	--nb-surface: #ffffff;
	--nb-soft: #efede7;
	--nb-ink: #121417;
	--nb-ink-2: #2b3038;
	--nb-muted: #5c6470;
	--nb-line: #e3e0d9;
	--nb-topbar-bg: #121417;
	--nb-topbar-ink: #d7dbe0;
	--nb-shadow: 0 1px 2px rgba(18, 20, 23, .04), 0 8px 24px rgba(18, 20, 23, .06);
	--nb-radius: 14px;
	--nb-radius-sm: 8px;
	--nb-container: 1240px;
	--nb-gap: 24px;
	--nb-font: "Nabaa Plex", system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
	--nb-ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}

html[data-theme="dark"] {
	--nb-bg: #0d0f12;
	--nb-surface: #15181d;
	--nb-soft: #1c2026;
	--nb-ink: #eceef1;
	--nb-ink-2: #c9ced5;
	--nb-muted: #98a1ad;
	--nb-line: #272b32;
	--nb-topbar-bg: #08090b;
	--nb-topbar-ink: #b7bec7;
	--nb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

/* ==========================================================================
   2. Base / reset
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
	margin: 0;
	font-family: var(--nb-font);
	font-size: 17px;
	line-height: 1.75;
	color: var(--nb-ink);
	background: var(--nb-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	transition: background-color .25s var(--nb-ease), color .25s var(--nb-ease);
}

img,
svg,
video,
iframe { max-width: 100%; height: auto; vertical-align: middle; }

a { color: inherit; text-decoration: none; transition: color .2s var(--nb-ease); }
a:hover { color: var(--nb-accent); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	font-weight: 700;
	line-height: 1.35;
	color: var(--nb-ink);
	letter-spacing: -.005em;
}

p { margin: 0 0 1.25em; }
ul, ol { margin: 0 0 1.25em; padding-inline-start: 1.4em; }
hr { border: 0; border-top: 1px solid var(--nb-line); margin: 2em 0; }

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
	width: 100%;
	padding: .7em 1em;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius-sm);
	transition: border-color .2s, box-shadow .2s;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--nb-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--nb-accent) 20%, transparent);
}

button,
.nb-button,
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .7em 1.4em;
	font-weight: 600;
	line-height: 1.3;
	color: var(--nb-accent-ink);
	background: var(--nb-accent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: transform .15s var(--nb-ease), filter .2s;
}

button:hover,
.nb-button:hover,
input[type="submit"]:hover { filter: brightness(1.08); color: var(--nb-accent-ink); }
button:active { transform: translateY(1px); }

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

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
th, td { padding: .6em .8em; border: 1px solid var(--nb-line); text-align: start; }
th { background: var(--nb-soft); font-weight: 600; }

/* ==========================================================================
   3. Accessibility & WordPress core classes
   ========================================================================== */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
	position: fixed !important;
	inset-block-start: 12px;
	inset-inline-start: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip: auto;
	clip-path: none;
	background: var(--nb-surface);
	color: var(--nb-ink);
	border-radius: var(--nb-radius-sm);
	box-shadow: var(--nb-shadow);
}

.alignleft { float: left; margin: .4em 1.5em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption,
figcaption { font-size: .85rem; color: var(--nb-muted); margin-top: .5em; }
.sticky,
.bypostauthor { position: relative; }

/* ==========================================================================
   4. Layout
   ========================================================================== */
.nb-container {
	width: 100%;
	max-width: var(--nb-container);
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 768px) {
	.nb-container { padding-inline: 24px; }
}

.nb-main { display: block; padding-block: 24px 56px; min-height: 50vh; }

.nb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	margin-top: 8px;
}

@media (min-width: 1024px) {
	.nb-layout { grid-template-columns: minmax(0, 1fr) 320px; }
	.nb-layout--sidebar-start { grid-template-columns: 320px minmax(0, 1fr); }
	.nb-layout--sidebar-start .nb-sidebar { order: -1; }
	.nb-layout--no-sidebar { grid-template-columns: minmax(0, 1fr); }
	.nb-layout--no-sidebar .nb-content--narrow { max-width: 820px; margin-inline: auto; width: 100%; }
}

.nb-sidebar { min-width: 0; }

@media (min-width: 1024px) {
	.nb-sidebar__sticky { position: sticky; top: 84px; }
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.nb-topbar {
	background: var(--nb-topbar-bg);
	color: var(--nb-topbar-ink);
	font-size: .8rem;
}

.nb-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 40px;
}

.nb-topbar__start { display: flex; align-items: center; gap: 20px; min-width: 0; }
.nb-topbar__date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; opacity: .9; }
.nb-topbar__date svg { width: 14px; height: 14px; }

.nb-top-menu { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.nb-top-menu a { color: inherit; opacity: .85; }
.nb-top-menu a:hover { opacity: 1; color: #fff; }

@media (max-width: 767px) {
	.nb-top-menu { display: none; }
}

@media (max-width: 479px) {
	.nb-topbar .nb-social { display: none; }
	.nb-topbar__inner { justify-content: center; }
}

.nb-social { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nb-social a {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: inherit;
	transition: background-color .2s, color .2s;
}
.nb-social a:hover { background: var(--nb-accent); color: #fff; }
.nb-social svg { width: 15px; height: 15px; }

.nb-brandbar { background: var(--nb-surface); border-bottom: 1px solid var(--nb-line); }

.nb-brandbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 96px;
	padding-block: 16px;
}

.nb-brand { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.nb-brand .custom-logo-link { display: inline-block; line-height: 0; }
.nb-brand .custom-logo { max-height: 64px; width: auto; }

.nb-brand__title {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.nb-brand__title a { display: inline-flex; align-items: center; gap: 10px; color: var(--nb-ink); }
.nb-brand__mark {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--nb-accent);
	color: #fff;
	font-size: 1.3rem;
}
.nb-brand__tagline { margin: 6px 0 0; font-size: .85rem; color: var(--nb-muted); line-height: 1.4; }

.nb-header-ad { flex: 0 1 728px; min-width: 0; display: flex; justify-content: flex-end; }

@media (max-width: 991px) {
	.nb-brandbar { display: none; }
}

/* Navbar */
.nb-navbar {
	position: sticky;
	top: 0;
	z-index: 900;
	background: color-mix(in srgb, var(--nb-surface) 92%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--nb-line);
}

.admin-bar .nb-navbar { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .nb-navbar { top: 0; }
}

.nb-navbar__inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }

.nb-navbar__brand { display: none; font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.nb-navbar__brand img { max-height: 38px; width: auto; }
.nb-navbar__brand .nb-brand__mark { width: 32px; height: 32px; font-size: 1rem; border-radius: 9px; margin-inline-end: 8px; }

@media (max-width: 991px) {
	.nb-navbar__brand { display: inline-flex; align-items: center; margin-inline-end: auto; }
}

@media (min-width: 992px) {
	.nb-is-stuck .nb-navbar__brand { display: inline-flex; align-items: center; margin-inline-end: 16px; animation: nb-fade .3s var(--nb-ease); }
}

.nb-nav { flex: 1; min-width: 0; }

.nb-menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nb-menu > li { position: relative; }
.nb-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 18px 12px;
	font-weight: 600;
	font-size: .95rem;
	white-space: nowrap;
}

.nb-menu > li > a::after {
	content: "";
	position: absolute;
	inset-inline: 12px;
	bottom: 10px;
	height: 3px;
	border-radius: 3px;
	background: var(--nb-accent);
	transform: scaleX(0);
	transition: transform .25s var(--nb-ease);
}

.nb-menu > li:hover > a::after,
.nb-menu > .current-menu-item > a::after,
.nb-menu > .current-menu-ancestor > a::after,
.nb-menu > .current-post-ancestor > a::after { transform: scaleX(1); }

.nb-menu .menu-item-has-children > a::before {
	content: "";
	order: 2;
	width: 6px;
	height: 6px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg) translateY(-2px);
	opacity: .6;
}

.nb-menu .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 20;
	min-width: 220px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
	box-shadow: var(--nb-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s var(--nb-ease), visibility .2s;
}

.nb-menu .sub-menu .sub-menu { top: -9px; inset-inline-start: 100%; }
.nb-menu li:hover > .sub-menu,
.nb-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nb-menu .sub-menu a { display: block; padding: 8px 12px; border-radius: var(--nb-radius-sm); font-size: .92rem; }
.nb-menu .sub-menu a:hover { background: var(--nb-soft); }

@media (max-width: 991px) {
	.nb-nav { display: none; }
}

.nb-navbar__actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }

.nb-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--nb-ink);
	background: transparent;
	border-radius: 50%;
}

.nb-icon-btn:hover { background: var(--nb-soft); color: var(--nb-accent); filter: none; }
.nb-icon-btn svg { width: 20px; height: 20px; }

.nb-menu-toggle { display: none; }
@media (max-width: 991px) {
	.nb-menu-toggle { display: inline-grid; }
}

.nb-theme-toggle .nb-icon-sun { display: none; }
html[data-theme="dark"] .nb-theme-toggle .nb-icon-sun { display: block; }
html[data-theme="dark"] .nb-theme-toggle .nb-icon-moon { display: none; }

/* Search panel */
.nb-search-panel {
	border-top: 1px solid var(--nb-line);
	background: var(--nb-surface);
	padding-block: 16px;
	animation: nb-slide .25s var(--nb-ease);
}

.nb-search-panel[hidden] { display: none; }

.nb-searchform { display: flex; gap: 8px; }
.nb-searchform__field { flex: 1; border-radius: 999px; padding-inline: 1.2em; }
.nb-searchform__submit { flex: none; }
.nb-searchform__submit svg { width: 18px; height: 18px; }

/* Reading progress */
.nb-progress {
	position: fixed;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 1000;
	width: 100%;
	height: 3px;
	background: var(--nb-accent);
	transform: scaleX(0);
	transform-origin: left center;
	pointer-events: none;
}

[dir="rtl"] .nb-progress { transform-origin: right center; }
.admin-bar .nb-progress { top: 32px; }

/* ==========================================================================
   6. Breaking ticker
   ========================================================================== */
.nb-ticker { background: var(--nb-surface); border-bottom: 1px solid var(--nb-line); }

.nb-ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 46px; overflow: hidden; }

.nb-ticker__label {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 14px;
	font-size: .8rem;
	font-weight: 700;
	color: #fff;
	background: var(--nb-accent);
	border-radius: 999px;
}

.nb-ticker__label::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	animation: nb-pulse 1.4s infinite;
}

.nb-ticker__track {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.nb-ticker__list {
	display: flex;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: nb-marquee var(--nb-ticker-duration, 40s) linear infinite;
}

[dir="rtl"] .nb-ticker__list { animation-name: nb-marquee-rtl; }
.nb-ticker__track:hover .nb-ticker__list,
.nb-ticker__track:focus-within .nb-ticker__list { animation-play-state: paused; }

.nb-ticker__list li { display: flex; align-items: center; white-space: nowrap; font-size: .92rem; font-weight: 500; }
.nb-ticker__list li::after { content: "•"; margin-inline: 22px; color: var(--nb-accent); }

@media (prefers-reduced-motion: reduce) {
	.nb-ticker__list { animation: none; }
}

/* ==========================================================================
   7. Shared components
   ========================================================================== */
.nb-badge {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 3px 10px;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.6;
	color: #fff;
	background: var(--cat-color, var(--nb-accent));
	border-radius: 6px;
	letter-spacing: .02em;
}

.nb-badge:hover { color: #fff; filter: brightness(1.1); }

.nb-badge--soft {
	color: var(--cat-color, var(--nb-accent));
	background: color-mix(in srgb, var(--cat-color, var(--nb-accent)) 12%, transparent);
}

.nb-badge--soft:hover { color: var(--cat-color, var(--nb-accent)); }

.nb-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	font-size: .8rem;
	color: var(--nb-muted);
	line-height: 1.5;
}

.nb-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.nb-meta svg { width: 14px; height: 14px; opacity: .8; }
.nb-meta a:hover { color: var(--nb-accent); }

.nb-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.nb-media {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--nb-soft);
	border-radius: var(--nb-radius);
	aspect-ratio: 16 / 9;
}

.nb-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--nb-ease);
}

.nb-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, .9);
	font-size: 2.2rem;
	font-weight: 700;
	background:
		radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .22), transparent 45%),
		linear-gradient(135deg, var(--cat-color, var(--nb-accent)), color-mix(in srgb, var(--cat-color, var(--nb-accent)) 55%, #121417));
}

/* Card (grid) */
.nb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.nb-card:hover .nb-media img { transform: scale(1.05); }
.nb-card__body { display: flex; flex-direction: column; gap: 8px; }
.nb-card__title { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.nb-card__title a:hover { color: var(--nb-accent); }
.nb-card__excerpt { margin: 0; font-size: .92rem; color: var(--nb-muted); line-height: 1.7; }
.nb-card--lg .nb-card__title { font-size: 1.5rem; line-height: 1.4; }

/* Card list (compact) */
.nb-mini {
	position: relative;
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

.nb-mini .nb-media { border-radius: 10px; aspect-ratio: 4 / 3; }
.nb-mini:hover .nb-media img { transform: scale(1.06); }
.nb-mini__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nb-mini__title {
	margin: 0;
	font-size: .95rem;
	line-height: 1.55;
	font-weight: 600;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nb-mini:hover .nb-mini__title a { color: var(--nb-accent); }

/* Overlay card */
.nb-overlay {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	min-height: 220px;
	border-radius: var(--nb-radius);
	background: var(--nb-topbar-bg);
	isolation: isolate;
}

.nb-overlay .nb-media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	border-radius: 0;
	z-index: -2;
}

.nb-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(10, 11, 13, 0) 30%, rgba(10, 11, 13, .55) 60%, rgba(10, 11, 13, .92) 100%);
}

.nb-overlay:hover .nb-media img { transform: scale(1.05); }

.nb-overlay__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px;
	color: #fff;
}

.nb-overlay__title { margin: 0; color: #fff; font-size: 1.12rem; line-height: 1.45; }
.nb-overlay__title a { color: #fff; }
.nb-overlay__title a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.nb-overlay .nb-meta { color: rgba(255, 255, 255, .8); }
.nb-overlay--xl .nb-overlay__body { padding: 28px; }
.nb-overlay--xl .nb-overlay__title { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.25rem); line-height: 1.3; }
.nb-overlay__excerpt { margin: 0; color: rgba(255, 255, 255, .85); font-size: .95rem; max-width: 60ch; }

@media (max-width: 599px) {
	.nb-overlay__excerpt { display: none; }
}

/* Row card (archives / stream) */
.nb-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--nb-line);
}

.nb-row:last-child { border-bottom: 0; }
.nb-row:hover .nb-media img { transform: scale(1.05); }
.nb-row__body { display: flex; flex-direction: column; gap: 10px; justify-content: center; min-width: 0; }
.nb-row__title { margin: 0; font-size: 1.3rem; line-height: 1.45; }
.nb-row__title a:hover { color: var(--nb-accent); }
.nb-row__excerpt { margin: 0; color: var(--nb-muted); font-size: .96rem; }

@media (min-width: 600px) {
	.nb-row { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
	.nb-row .nb-media { aspect-ratio: 4 / 3; }
}

.nb-stream { display: flex; flex-direction: column; gap: 28px; }

/* Grids */
.nb-grid { display: grid; gap: var(--nb-gap); grid-template-columns: minmax(0, 1fr); }

@media (min-width: 600px) {
	.nb-grid--2,
	.nb-grid--3,
	.nb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.nb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   8. Homepage
   ========================================================================== */
.nb-hero {
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(0, 1fr);
	margin-bottom: 40px;
}

.nb-hero .nb-overlay--xl { min-height: 420px; }

.nb-hero__side { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nb-hero__side .nb-overlay { min-height: 200px; }
.nb-hero__side .nb-overlay__body { padding: 16px; }
.nb-hero__side .nb-overlay__title { font-size: 1rem; }

@media (max-width: 599px) {
	.nb-hero .nb-overlay--xl { min-height: 360px; }
	.nb-hero__side {
		display: flex;
		gap: 12px;
		margin-inline: -16px;
		padding-inline: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.nb-hero__side::-webkit-scrollbar { display: none; }
	.nb-hero__side .nb-overlay { flex: 0 0 80%; min-height: 230px; scroll-snap-align: start; }
}

@media (min-width: 1024px) {
	.nb-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
	.nb-hero .nb-overlay--xl { min-height: 520px; }
	.nb-hero__side { grid-template-rows: repeat(2, minmax(0, 1fr)); }
	.nb-hero__side .nb-overlay { min-height: 0; }
}

.nb-section { margin-bottom: 48px; }

.nb-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--nb-line);
	position: relative;
}

.nb-section__head::after {
	content: "";
	position: absolute;
	bottom: -2px;
	inset-inline-start: 0;
	width: 64px;
	height: 2px;
	background: var(--cat-color, var(--nb-accent));
}

.nb-section__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 1.35rem;
}

.nb-section__title::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--cat-color, var(--nb-accent));
	transform: rotate(45deg);
}

.nb-section__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--nb-muted);
}

.nb-section__more svg { width: 16px; height: 16px; transition: transform .2s; }
[dir="rtl"] .nb-section__more svg { transform: scaleX(-1); }
.nb-section__more:hover { color: var(--cat-color, var(--nb-accent)); }

.nb-feature { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.nb-feature__list { display: flex; flex-direction: column; gap: 18px; }

@media (min-width: 900px) {
	.nb-feature { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

.nb-section--overlay .nb-overlay { min-height: 300px; }

.nb-list-cols { display: grid; gap: 20px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
	.nb-list-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   9. Archives & page headers
   ========================================================================== */
.nb-archive-head {
	position: relative;
	margin-bottom: 32px;
	padding: 28px;
	overflow: hidden;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
}

.nb-archive-head::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 5px;
	background: var(--cat-color, var(--nb-accent));
}

.nb-archive-head__kicker { display: block; margin-bottom: 4px; font-size: .8rem; font-weight: 600; color: var(--cat-color, var(--nb-accent)); }
.nb-archive-head__title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); }
.nb-archive-head__desc { margin-top: 10px; color: var(--nb-muted); }
.nb-archive-head__desc p:last-child { margin-bottom: 0; }
.nb-archive-head .nb-searchform { margin-top: 16px; max-width: 560px; }

/* Breadcrumbs */
.nb-breadcrumbs { margin-bottom: 18px; font-size: .82rem; color: var(--nb-muted); }
.nb-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nb-breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.nb-breadcrumbs li + li::before { content: "/"; opacity: .5; }
.nb-breadcrumbs [aria-current] { color: var(--nb-ink-2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pagination */
.nb-pagination,
.navigation.pagination { margin-top: 40px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 12px;
	font-weight: 600;
	font-size: .92rem;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: 999px;
}

.page-numbers.current,
.page-numbers:hover { color: #fff; background: var(--nb-accent); border-color: var(--nb-accent); }
.page-numbers.dots { background: transparent; border-color: transparent; color: var(--nb-muted); }

/* ==========================================================================
   10. Single article
   ========================================================================== */
.nb-article__head { margin-bottom: 24px; }
.nb-article__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.nb-article__title {
	margin: 0 0 14px;
	font-size: clamp(1.7rem, 1.2rem + 2vw, 2.65rem);
	line-height: 1.3;
	letter-spacing: -.015em;
}

.nb-article__lead { margin: 0 0 20px; font-size: 1.15rem; line-height: 1.7; color: var(--nb-ink-2); }

.nb-article__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-block: 14px;
	border-block: 1px solid var(--nb-line);
}

.nb-author-chip { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nb-author-chip img { width: 44px; height: 44px; border-radius: 50%; }
.nb-author-chip__name { display: block; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.nb-author-chip .nb-meta { margin-top: 2px; }

.nb-article__media { margin: 0 0 28px; }
.nb-article__media .nb-media { aspect-ratio: auto; }
.nb-article__media img { width: 100%; height: auto; max-height: 640px; }

/* Share */
.nb-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nb-share__label { font-size: .8rem; font-weight: 600; color: var(--nb-muted); margin-inline-end: 4px; }

.nb-share__btn {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: var(--nb-ink-2);
	background: var(--nb-soft);
	border-radius: 50%;
	transition: background-color .2s, color .2s, transform .2s;
}

.nb-share__btn svg { width: 16px; height: 16px; }
.nb-share__btn:hover { color: #fff; background: var(--brand, var(--nb-accent)); transform: translateY(-2px); filter: none; }
.nb-share__btn.is-copied { color: #fff; background: #16a34a; }

/* Entry content */
.nb-entry { font-size: 1.08rem; line-height: 1.95; color: var(--nb-ink-2); overflow-wrap: break-word; }
.nb-entry > * { margin-block: 0 1.4em; }
.nb-entry h2 { font-size: 1.6rem; margin-top: 1.8em; }
.nb-entry h3 { font-size: 1.3rem; margin-top: 1.6em; }
.nb-entry h4 { font-size: 1.12rem; margin-top: 1.4em; }
.nb-entry a { color: var(--nb-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nb-entry a:hover { text-decoration-thickness: 2px; }
.nb-entry img { border-radius: var(--nb-radius-sm); }
.nb-entry li { margin-bottom: .45em; }

.nb-entry blockquote,
.wp-block-quote {
	margin-inline: 0;
	padding: 18px 24px;
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--nb-ink);
	background: var(--nb-surface);
	border: 0;
	border-inline-start: 4px solid var(--nb-accent);
	border-radius: var(--nb-radius-sm);
}

.nb-entry blockquote p:last-child { margin-bottom: 0; }
.nb-entry blockquote cite { display: block; margin-top: 8px; font-size: .85rem; font-style: normal; color: var(--nb-muted); }

.wp-block-pullquote { border-block: 3px solid var(--nb-accent); padding: 1.5em 0; text-align: center; }
.wp-block-pullquote blockquote { background: none; border: 0; }

.nb-entry pre,
.nb-entry code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; direction: ltr; }
.nb-entry pre { padding: 18px; overflow-x: auto; background: var(--nb-soft); border-radius: var(--nb-radius-sm); text-align: left; }
.nb-entry :not(pre) > code { padding: .15em .4em; background: var(--nb-soft); border-radius: 4px; }

.alignwide { margin-inline: calc(-1 * min(60px, 4vw)); max-width: none; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.nb-layout:not(.nb-layout--no-sidebar) .alignwide,
.nb-layout:not(.nb-layout--no-sidebar) .alignfull { margin-inline: 0; width: auto; max-width: 100%; }

.page-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2em; font-weight: 600; }

/* Tags */
.nb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0; }
.nb-tags__label { font-weight: 700; font-size: .9rem; margin-inline-end: 4px; }

.nb-tags a,
.tagcloud a,
.wp-block-tag-cloud a {
	display: inline-block;
	padding: 5px 14px;
	font-size: .82rem !important;
	font-weight: 500;
	color: var(--nb-ink-2);
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: 999px;
	margin: 0 0 6px;
}

.nb-tags a:hover,
.tagcloud a:hover { color: #fff; background: var(--nb-accent); border-color: var(--nb-accent); }

.nb-article__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 18px; border-block: 1px solid var(--nb-line); }

/* Author box */
.nb-author {
	display: flex;
	gap: 20px;
	margin: 32px 0;
	padding: 24px;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
}

.nb-author img { flex: none; width: 80px; height: 80px; border-radius: 50%; }
.nb-author__kicker { display: block; font-size: .75rem; font-weight: 600; color: var(--nb-accent); }
.nb-author__name { margin: 0 0 6px; font-size: 1.15rem; }
.nb-author__bio { margin: 0; color: var(--nb-muted); font-size: .94rem; }

@media (max-width: 479px) {
	.nb-author { flex-direction: column; }
}

/* Post navigation */
.nb-post-nav { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin: 32px 0; }
@media (min-width: 600px) {
	.nb-post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.nb-post-nav a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 18px 20px;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
	transition: border-color .2s, transform .2s;
}

.nb-post-nav a:hover { border-color: var(--nb-accent); color: inherit; transform: translateY(-2px); }
.nb-post-nav__label { font-size: .78rem; font-weight: 600; color: var(--nb-muted); }
.nb-post-nav__title { font-weight: 700; line-height: 1.5; }
.nb-post-nav__next { text-align: end; }

/* Related */
.nb-related { margin: 40px 0; }

/* ==========================================================================
   11. Widgets & sidebar
   ========================================================================== */
.widget {
	margin-bottom: 28px;
	padding: 22px;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
}

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

.widget-title,
.widget .wp-block-heading {
	position: relative;
	margin: 0 0 18px;
	padding-bottom: 10px;
	font-size: 1.05rem;
	border-bottom: 1px solid var(--nb-line);
}

.widget-title::after,
.widget .wp-block-heading::after {
	content: "";
	position: absolute;
	bottom: -1px;
	inset-inline-start: 0;
	width: 40px;
	height: 2px;
	background: var(--nb-accent);
}

.widget ul { margin: 0; padding: 0; list-style: none; }
.widget ul li { padding-block: 8px; border-bottom: 1px dashed var(--nb-line); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul ul { padding-inline-start: 1em; }
.widget select { width: 100%; }

.nb-widget-posts { display: flex; flex-direction: column; gap: 16px; counter-reset: nb-rank; }
.widget .nb-widget-posts li { padding: 0; border: 0; }

.nb-widget-posts--ranked .nb-mini { grid-template-columns: 40px minmax(0, 1fr); }
.nb-widget-posts--ranked .nb-mini::before {
	counter-increment: nb-rank;
	content: counter(nb-rank, decimal-leading-zero);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--nb-accent);
}

.nb-widget-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.widget .nb-widget-social li { padding: 0; border: 0; }

.nb-widget-social a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	font-size: .85rem;
	font-weight: 600;
	color: #fff;
	background: var(--brand, var(--nb-ink));
	border-radius: var(--nb-radius-sm);
	transition: transform .2s, filter .2s;
}

.nb-widget-social a:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.1); }
html[data-theme="dark"] .nb-widget-social a { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.nb-widget-social svg { width: 16px; height: 16px; }

/* ==========================================================================
   12. Ads
   ========================================================================== */
.nb-ad { display: block; width: 100%; margin: 28px auto; text-align: center; overflow: hidden; clear: both; }
.nb-ad__label { display: block; margin-bottom: 6px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--nb-muted); }
.nb-ad--header { margin: 0; }
.nb-ad--sidebar { margin-top: 0; }
.nb-ad ins { display: block; }

/* ==========================================================================
   13. Comments
   ========================================================================== */
.nb-comments { margin-top: 40px; padding: 28px; background: var(--nb-surface); border: 1px solid var(--nb-line); border-radius: var(--nb-radius); }
.nb-comments__title { font-size: 1.3rem; }
.comment-list { margin: 0 0 32px; padding: 0; list-style: none; }
.comment-list .children { margin: 0; padding-inline-start: 24px; list-style: none; border-inline-start: 2px solid var(--nb-line); }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--nb-line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .85rem; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { color: var(--nb-muted); }
.comment-content p:last-child { margin-bottom: 0; }
.reply a { font-size: .82rem; font-weight: 600; color: var(--nb-accent); }
.comment-respond { margin-top: 24px; }
.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 6px; font-size: .88rem; font-weight: 600; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-notes,
.logged-in-as { font-size: .85rem; color: var(--nb-muted); }

/* ==========================================================================
   14. Footer
   ========================================================================== */
.nb-footer { margin-top: 24px; color: #c4cad2; background: #0e1013; }
.nb-footer a { color: #e6e9ed; }
.nb-footer a:hover { color: var(--nb-accent); }

.nb-footer__top {
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr);
	padding-block: 56px 40px;
}

@media (min-width: 768px) {
	.nb-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.nb-footer__top { grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); }
}

.nb-footer__about .nb-brand__title a { color: #fff; }
.nb-footer__about p { margin: 16px 0; font-size: .92rem; line-height: 1.8; }
.nb-footer__about .custom-logo { max-height: 56px; width: auto; }
.nb-footer .nb-social a { background: rgba(255, 255, 255, .06); }
.nb-footer .nb-social a:hover { background: var(--nb-accent); color: #fff; }

.nb-footer .widget { padding: 0; background: none; border: 0; color: #c4cad2; }
.nb-footer .widget-title,
.nb-footer .widget .wp-block-heading { color: #fff; border-color: rgba(255, 255, 255, .1); }
.nb-footer .widget ul li { border-color: rgba(255, 255, 255, .08); }
.nb-footer .nb-mini__title a { color: #e6e9ed; }
.nb-footer .nb-meta { color: #8e97a3; }

.nb-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-block: 20px;
	font-size: .85rem;
	border-top: 1px solid rgba(255, 255, 255, .08);
}

.nb-footer__bottom p { margin: 0; }
.nb-footer-menu { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }

/* ==========================================================================
   15. Mobile drawer
   ========================================================================== */
.nb-drawer { position: fixed; inset: 0; z-index: 9999; }
.nb-drawer[hidden] { display: none; }
.nb-drawer__overlay { position: absolute; inset: 0; background: rgba(8, 9, 11, .55); animation: nb-fade .25s; }

.nb-drawer__panel {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: min(360px, 88vw);
	padding: 20px;
	overflow-y: auto;
	background: var(--nb-surface);
	box-shadow: var(--nb-shadow);
	animation: nb-drawer-in .3s var(--nb-ease);
}

[dir="rtl"] .nb-drawer__panel { animation-name: nb-drawer-in-rtl; }
.nb-drawer__head { display: flex; align-items: center; justify-content: space-between; }

.nb-mobile-menu { margin: 0; padding: 0; list-style: none; }
.nb-mobile-menu li { position: relative; border-bottom: 1px solid var(--nb-line); }
.nb-mobile-menu a { display: block; padding: 12px 4px; padding-inline-end: 44px; font-weight: 600; }
.nb-mobile-menu .sub-menu { display: none; margin: 0; padding: 0 0 8px; padding-inline-start: 14px; list-style: none; }
.nb-mobile-menu .sub-menu li { border: 0; }
.nb-mobile-menu .sub-menu a { padding-block: 8px; font-weight: 500; font-size: .94rem; color: var(--nb-muted); }
.nb-mobile-menu li.is-open > .sub-menu { display: block; }

.nb-submenu-toggle {
	position: absolute;
	top: 4px;
	inset-inline-end: 0;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--nb-ink);
	background: var(--nb-soft);
	border-radius: 8px;
}

.nb-submenu-toggle:hover { color: var(--nb-accent); filter: none; }
.nb-submenu-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.is-open > .nb-submenu-toggle svg { transform: rotate(180deg); }

/* ==========================================================================
   16. Misc: back to top, cookie, 404, empty
   ========================================================================== */
.nb-to-top {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 800;
	width: 46px;
	height: 46px;
	padding: 0;
	border-radius: 50%;
	box-shadow: var(--nb-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s, transform .25s var(--nb-ease), visibility .25s;
}

.nb-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.nb-to-top svg { width: 20px; height: 20px; }

.nb-cookie {
	position: fixed;
	inset-inline: 16px;
	bottom: 16px;
	z-index: 9000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	max-width: 720px;
	margin-inline: auto;
	padding: 16px 20px;
	font-size: .9rem;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: var(--nb-radius);
	box-shadow: var(--nb-shadow);
	animation: nb-slide .35s var(--nb-ease);
}

.nb-cookie[hidden] { display: none; }
.nb-cookie p { margin: 0; flex: 1 1 280px; }
.nb-cookie a { color: var(--nb-accent); text-decoration: underline; }

.nb-404 { padding-block: 40px 20px; text-align: center; }

.nb-404__code {
	margin: 0;
	font-size: clamp(5rem, 3rem + 10vw, 10rem);
	font-weight: 700;
	line-height: 1;
	color: transparent;
	background: linear-gradient(135deg, var(--nb-accent), color-mix(in srgb, var(--nb-accent) 40%, var(--nb-ink)));
	-webkit-background-clip: text;
	background-clip: text;
}

.nb-404 .nb-searchform { max-width: 520px; margin: 24px auto 0; }
.nb-empty { padding: 40px 24px; text-align: center; background: var(--nb-surface); border: 1px dashed var(--nb-line); border-radius: var(--nb-radius); }
.nb-empty .nb-searchform { max-width: 480px; margin: 16px auto 0; }

/* ==========================================================================
   17a. Header layouts & mega menu
   ========================================================================== */
.nb-no-sticky .nb-navbar { position: relative; }

.nb-header--centered .nb-brandbar__inner { flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
.nb-header--centered .nb-brand { align-items: center; }
.nb-header--centered .nb-header-ad { flex: 0 1 auto; justify-content: center; width: 100%; }
@media (min-width: 992px) {
	.nb-header--centered .nb-nav { display: flex; justify-content: center; }
}

.nb-header--compact .nb-brandbar { display: none; }
.nb-header--compact .nb-navbar__brand { display: inline-flex; align-items: center; margin-inline-end: 20px; }
.nb-header--compact .nb-navbar__inner { min-height: 68px; }
.nb-header-ad--below .nb-ad { margin: 16px auto 0; }

.nb-bookmarks-link { position: relative; }
.nb-bookmarks-count {
	position: absolute;
	top: 4px;
	inset-inline-end: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	font-size: .65rem;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
	color: #fff;
	background: var(--nb-accent);
	border-radius: 999px;
}

@media (min-width: 992px) {
	.nb-navbar__inner { position: relative; }
	.nb-menu > li.nb-has-mega { position: static; }
	.nb-menu > li.nb-has-mega > a::before {
		content: "";
		order: 2;
		width: 6px;
		height: 6px;
		border: solid currentColor;
		border-width: 0 1.5px 1.5px 0;
		transform: rotate(45deg) translateY(-2px);
		opacity: .6;
	}
}

.nb-mega {
	position: absolute;
	top: 100%;
	inset-inline: 0;
	z-index: 30;
	padding: 22px;
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-top: 3px solid var(--cat-color, var(--nb-accent));
	border-radius: 0 0 var(--nb-radius) var(--nb-radius);
	box-shadow: var(--nb-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s var(--nb-ease), visibility .2s;
}

.nb-menu li.nb-has-mega:hover > .nb-mega,
.nb-menu li.nb-has-mega:focus-within > .nb-mega { opacity: 1; visibility: visible; transform: none; }
.nb-mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.nb-mega__item { position: relative; display: flex; flex-direction: column; gap: 8px; }
.nb-mega__item:hover .nb-media img { transform: scale(1.05); }
.nb-mega__title { margin: 0; font-size: .95rem; line-height: 1.5; }
.nb-mega__item:hover .nb-mega__title a { color: var(--nb-accent); }
.nb-mega__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; font-size: .9rem; color: var(--cat-color, var(--nb-accent)); }
.nb-mega__more svg { width: 16px; height: 16px; }
[dir="rtl"] .nb-mega__more svg { transform: scaleX(-1); }
.nb-mobile-menu .nb-mega { display: none; }

/* ==========================================================================
   17b. Badges, live & media formats
   ========================================================================== */
.nb-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.nb-live {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.6;
	color: #fff;
	background: #dc2626;
	border-radius: 6px;
}

.nb-live::before { content: ""; width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: nb-pulse 1.2s infinite; }

.nb-format {
	position: absolute;
	inset-inline-start: 10px;
	bottom: 10px;
	z-index: 1;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	color: #fff;
	background: rgba(10, 11, 13, .65);
	border: 2px solid rgba(255, 255, 255, .85);
	border-radius: 50%;
	backdrop-filter: blur(4px);
}

.nb-overlay .nb-format { top: 14px; bottom: auto; }
.nb-mini .nb-format { width: 28px; height: 28px; inset-inline-start: 6px; bottom: 6px; }
.nb-mini .nb-format svg { width: 13px; height: 13px; }

.nb-video,
.nb-audio { overflow: hidden; border-radius: var(--nb-radius); }
.nb-video iframe,
.nb-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.nb-video .wp-video { width: 100% !important; }
.nb-audio { padding: 18px; background: var(--nb-surface); border: 1px solid var(--nb-line); }
.nb-article__media--embed { margin-bottom: 28px; }

.nb-live-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding: 12px 16px;
	font-weight: 600;
	font-size: .92rem;
	color: #991b1b;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--nb-radius-sm);
}

html[data-theme="dark"] .nb-live-banner { color: #fecaca; background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .35); }

.nb-live-updates {
	position: fixed;
	top: 80px;
	left: 50%;
	z-index: 950;
	transform: translateX(-50%);
	box-shadow: var(--nb-shadow);
	animation: nb-slide .3s var(--nb-ease);
}

/* ==========================================================================
   17c. Article layouts & reading tools
   ========================================================================== */
.nb-single-hero { margin-bottom: 28px; }
.nb-single-hero .nb-article__title { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem); }
.nb-single-hero__text { max-width: 900px; }
.nb-single-hero__media { margin-top: 24px; }
.nb-single-hero__media .nb-article__media { margin: 0; }
.nb-single-hero__media img { max-height: 620px; }

.nb-single-hero--overlay {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: min(72vh, 620px);
	padding: 32px;
	overflow: hidden;
	color: #fff;
	background: var(--nb-topbar-bg);
	border-radius: var(--nb-radius);
	isolation: isolate;
}

.nb-single-hero__bg { position: absolute; inset: 0; z-index: -2; }
.nb-single-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.nb-single-hero--overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(10, 11, 13, .1) 20%, rgba(10, 11, 13, .6) 55%, rgba(10, 11, 13, .95) 100%);
}

.nb-single-hero--overlay .nb-article__title,
.nb-single-hero--overlay .nb-article__lead { color: #fff; }
.nb-single-hero--overlay .nb-article__byline { border-color: rgba(255, 255, 255, .2); }
.nb-single-hero--overlay .nb-author-chip__name,
.nb-single-hero--overlay .nb-meta,
.nb-single-hero--overlay .nb-share__label { color: rgba(255, 255, 255, .85); }
.nb-single-hero--overlay .nb-share__btn { color: #fff; background: rgba(255, 255, 255, .14); }

@media (max-width: 599px) {
	.nb-single-hero--overlay { padding: 20px; min-height: 480px; }
}

.nb-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: -8px 0 18px; }
.nb-fontsize { display: inline-flex; overflow: hidden; border: 1px solid var(--nb-line); border-radius: 999px; }

.nb-fontsize button,
.nb-bookmark {
	padding: 6px 14px;
	font-size: .85rem;
	color: var(--nb-ink-2);
	background: var(--nb-surface);
	border-radius: 0;
}

.nb-fontsize button + button { border-inline-start: 1px solid var(--nb-line); }
.nb-fontsize button:hover,
.nb-bookmark:hover { color: var(--nb-accent); filter: none; }
.nb-fontsize sup { font-size: .7em; }

.nb-bookmark { gap: 6px; border: 1px solid var(--nb-line); border-radius: 999px; }
.nb-bookmark__saved { display: none; }
.nb-bookmark.is-saved { color: #fff; background: var(--nb-accent); border-color: var(--nb-accent); }
.nb-bookmark.is-saved svg { fill: currentColor; }
.nb-bookmark.is-saved .nb-bookmark__save { display: none; }
.nb-bookmark.is-saved .nb-bookmark__saved { display: inline; }

.nb-entry { transition: font-size .15s; }

.nb-toc { margin: 0 0 1.6em; font-size: .95rem; background: var(--nb-surface); border: 1px solid var(--nb-line); border-radius: var(--nb-radius); }
.nb-toc summary { padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.nb-toc summary::-webkit-details-marker { display: none; }
.nb-toc summary::after { content: "−"; float: inline-end; color: var(--nb-accent); }
.nb-toc details:not([open]) summary::after { content: "+"; }
.nb-toc ol { margin: 0; padding: 0 18px 14px; padding-inline-start: 38px; }
.nb-toc ol ol { padding: 4px 0 0; padding-inline-start: 20px; }
.nb-toc li { margin: 0 0 6px; }
.nb-entry .nb-toc a { color: var(--nb-ink-2); text-decoration: none; }
.nb-entry .nb-toc a:hover { color: var(--nb-accent); }
.nb-entry [id^="nb-h-"],
.nb-entry h2[id],
.nb-entry h3[id] { scroll-margin-top: 90px; }

.nb-reactions { margin: 28px 0; padding: 20px; text-align: center; background: var(--nb-surface); border: 1px solid var(--nb-line); border-radius: var(--nb-radius); }
.nb-reactions__title { margin: 0 0 12px; font-weight: 700; }
.nb-reactions__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.nb-react {
	flex-direction: column;
	gap: 2px;
	min-width: 64px;
	padding: 8px 10px;
	color: var(--nb-ink-2);
	background: var(--nb-soft);
	border: 2px solid transparent;
	border-radius: 14px;
}

.nb-react:hover { transform: translateY(-3px); color: var(--nb-ink); filter: none; }
.nb-react__emoji { font-size: 1.6rem; line-height: 1; }
.nb-react__count { font-size: .8rem; font-weight: 700; }
.nb-react.is-chosen { border-color: var(--nb-accent); background: color-mix(in srgb, var(--nb-accent) 10%, transparent); }
.nb-reactions.is-done .nb-react:not(.is-chosen) { opacity: .6; }

.nb-source-btn { margin: 4px 0 24px; }
.nb-source-btn svg { width: 16px; height: 16px; }
[dir="rtl"] .nb-source-btn svg { transform: scaleX(-1); }
.nb-entry .nb-source { font-size: .9rem; color: var(--nb-muted); }

.nb-next-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 48px 0 32px;
	font-size: .85rem;
	font-weight: 700;
	color: var(--nb-accent);
	text-transform: uppercase;
	letter-spacing: .06em;
}

.nb-next-divider::before,
.nb-next-divider::after { content: ""; flex: 1; height: 2px; background: var(--nb-line); }
.nb-infinite.is-loading::after { content: ""; display: block; width: 32px; height: 32px; margin: 32px auto; border: 3px solid var(--nb-line); border-top-color: var(--nb-accent); border-radius: 50%; animation: nb-spin .8s linear infinite; }

/* FAQ via core Details block */
.nb-entry .wp-block-details { margin-bottom: 12px; padding: 0; background: var(--nb-surface); border: 1px solid var(--nb-line); border-radius: var(--nb-radius-sm); }
.nb-entry .wp-block-details summary { padding: 14px 18px; font-weight: 700; color: var(--nb-ink); cursor: pointer; }
.nb-entry .wp-block-details > :not(summary) { margin: 0; padding: 0 18px 14px; }

/* ==========================================================================
   17d. Ads (device targeting, lazy, sticky)
   ========================================================================== */
.nb-ad template { display: none; }
.nb-ad.is-empty { display: none; }
.nb-ad__mobile { display: none; }

@media (max-width: 767px) {
	.nb-ad__mobile { display: block; }
	.nb-ad__desktop { display: none; }
}

@media (min-width: 768px) {
	.nb-ad--mobile-only,
	.nb-sticky-ad--mobile { display: none !important; }
}

.nb-sticky-ad {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 960;
	display: flex;
	justify-content: center;
	padding: 6px 40px;
	background: var(--nb-surface);
	border-top: 1px solid var(--nb-line);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
	animation: nb-up .35s var(--nb-ease);
}

.nb-sticky-ad[hidden] { display: none; }
.nb-sticky-ad .nb-ad { margin: 0; max-height: 110px; }
.nb-sticky-ad__close {
	position: absolute;
	top: -14px;
	inset-inline-end: 12px;
	width: 28px;
	height: 28px;
	padding: 0;
	color: var(--nb-ink);
	background: var(--nb-surface);
	border: 1px solid var(--nb-line);
	border-radius: 50%;
	box-shadow: var(--nb-shadow);
}

.nb-sticky-ad__close svg { width: 14px; height: 14px; }
.nb-has-sticky-ad .nb-to-top { bottom: 130px; }
.nb-has-sticky-ad .nb-cookie { bottom: 130px; }

/* ==========================================================================
   17e. Info widgets & bookmarks page
   ========================================================================== */
.nb-info-empty { margin: 0; font-size: .85rem; color: var(--nb-muted); }
.nb-info-credit { margin: 12px 0 0; font-size: .72rem; color: var(--nb-muted); }
.nb-info-credit a { text-decoration: underline; }

.nb-prayer__place { margin: 0; font-weight: 700; }
.nb-prayer__hijri { margin: 0 0 12px; font-size: .85rem; color: var(--nb-muted); }
.widget .nb-prayer__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.widget .nb-prayer__list li {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 4px;
	text-align: center;
	background: var(--nb-soft);
	border: 1px solid transparent;
	border-radius: 10px;
}

.nb-prayer__list span { font-size: .78rem; color: var(--nb-muted); }
.nb-prayer__list time { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.widget .nb-prayer__list li.is-next { color: #fff; background: var(--nb-accent); }
.nb-prayer__list li.is-next span { color: rgba(255, 255, 255, .85); }

.nb-rates__table { margin: 0 0 12px; font-size: .88rem; }
.nb-rates__table th,
.nb-rates__table td { padding: 8px 4px; border: 0; border-bottom: 1px dashed var(--nb-line); background: none; }
.nb-rates__table th { font-weight: 500; }
.nb-rates__table td { text-align: end; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nb-rates__table small { font-weight: 400; color: var(--nb-muted); }
.nb-rates__code { display: inline-block; min-width: 40px; margin-inline-end: 8px; padding: 1px 6px; font-size: .7rem; font-weight: 700; text-align: center; color: var(--nb-accent); background: color-mix(in srgb, var(--nb-accent) 10%, transparent); border-radius: 4px; }
.nb-rates__table--gold th::before { content: "●"; margin-inline-end: 8px; color: #d4a017; }

.nb-weather__now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nb-weather__icon { font-size: 2.6rem; line-height: 1; }
.nb-weather__temp { display: block; font-size: 2rem; line-height: 1; }
.nb-weather__cond { font-size: .85rem; color: var(--nb-muted); }
.nb-weather__city { margin-inline-start: auto; font-weight: 700; }
.widget .nb-weather__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.widget .nb-weather__meta li { padding: 8px; font-weight: 700; font-size: .85rem; text-align: center; background: var(--nb-soft); border: 0; border-radius: 10px; }
.nb-weather__meta span { display: block; font-weight: 400; font-size: .72rem; color: var(--nb-muted); }

.nb-bookmarks__list { margin: 0; padding: 0; list-style: none; }
.nb-bookmarks__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--nb-line); }
.nb-bookmarks__item img,
.nb-bookmarks__ph { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--nb-soft); }
.nb-entry .nb-bookmarks__item a { font-weight: 600; color: var(--nb-ink); text-decoration: none; }
.nb-bookmarks__empty { color: var(--nb-muted); }

/* ==========================================================================
   17f. Rendering performance
   ========================================================================== */
.nb-main > .nb-container > .nb-section ~ .nb-section,
.nb-footer { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ==========================================================================
   17. Keyframes
   ========================================================================== */
@keyframes nb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nb-marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes nb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes nb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nb-slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes nb-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes nb-drawer-in-rtl { from { transform: translateX(100%); } to { transform: none; } }
@keyframes nb-spin { to { transform: rotate(360deg); } }
@keyframes nb-up { from { transform: translateY(100%); } to { transform: none; } }

/* ==========================================================================
   18. Print
   ========================================================================== */
@media print {
	.nb-topbar,
	.nb-navbar,
	.nb-ticker,
	.nb-sidebar,
	.nb-share,
	.nb-ad,
	.nb-related,
	.nb-comments,
	.nb-footer,
	.nb-to-top,
	.nb-cookie,
	.nb-progress { display: none !important; }
	body { background: #fff; color: #000; }
	.nb-layout { display: block; }
}
