/* ==========================================================================
   Nezam theme — base, header, footer, blog, pages
   ========================================================================== */
:root {
	--nz-primary: #FF6A2B;
	--nz-secondary: #FFB13B;
	--nz-grad: linear-gradient(135deg, var(--nz-secondary) 0%, var(--nz-primary) 100%);
	--nz-ink: #141417;
	--nz-text: #3c3c46;
	--nz-muted: #6c6c78;
	--nz-line: #ece6e0;
	--nz-soft: #faf6f2;
	--nz-tint: #fff3ec;
	--nz-dark: #141418;
	--nz-radius: 20px;
	--nz-shadow: 0 1px 2px rgba(20, 20, 23, .04), 0 10px 30px -14px rgba(20, 20, 23, .14);
	--nz-container: 1200px;
	--nz-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
	--nz-header-h: 78px;
}

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nz-header-h) + 16px); }
body { margin: 0; font-family: var(--nz-font); font-size: 16px; line-height: 1.75; color: var(--nz-text); background: #fff; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--nz-primary); text-decoration: none; transition: color .2s; }
a:hover { color: #e0541a; }
h1, h2, h3, h4, h5, h6 { font-family: var(--nz-font); color: var(--nz-ink); line-height: 1.35; font-weight: 700; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(255, 106, 43, .2); }
:focus-visible { outline: 3px solid rgba(255, 106, 43, .45); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nz-skip:focus { position: fixed !important; top: 12px; inset-inline-start: 12px; width: auto; height: auto; clip: auto; z-index: 9999; background: #fff; color: var(--nz-ink); padding: 10px 16px; border-radius: 10px; box-shadow: var(--nz-shadow); }
.nz-main { display: block; min-height: 50vh; }
.nz-container { width: 100%; max-width: var(--nz-container); margin-inline: auto; padding-inline: 20px; }
.nz-container--narrow { max-width: 860px; }
.nz-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }

/* Header -------------------------------------------------------------------- */
.nz-header { position: relative; z-index: 100; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
.nz-sticky .nz-header { position: sticky; top: 0; }
.admin-bar.nz-sticky .nz-header { top: 32px; }
.nz-header.is-scrolled { border-color: var(--nz-line); box-shadow: 0 8px 30px -20px rgba(20, 20, 23, .25); }
.nz-header__in { display: flex; align-items: center; gap: 28px; min-height: var(--nz-header-h); }
.nz-logo { display: inline-flex; align-items: center; }
.nz-logo img, .nz-logo .nz-logo__img { height: 50px; width: auto; display: block; }
.nz-nav { flex: 1; }
.nz-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nz-menu > li { position: relative; display: flex; align-items: center; margin: 0; }
.nz-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--nz-ink); font-weight: 500; font-size: 15.5px; }
.nz-menu a:hover, .nz-menu .current-menu-item > a, .nz-menu .current-menu-ancestor > a, .nz-menu .current_page_item > a { color: var(--nz-primary); }
.nz-menu > .current-menu-item > a, .nz-menu > .current_page_item > a { background: var(--nz-tint); }
.nz-sub-toggle { border: 0; background: none; padding: 4px; margin-inline-start: -10px; color: var(--nz-muted); cursor: pointer; display: grid; place-items: center; }
.nz-sub-toggle .nz-icon { width: 16px; height: 16px; transition: transform .2s; }
.nz-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; background: #fff; border: 1px solid var(--nz-line); border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(20, 20, 23, .25); opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; z-index: 10; }
.nz-menu .sub-menu li { margin: 0; }
.nz-menu .sub-menu a { padding: 10px 14px; font-size: 15px; }
.nz-menu .sub-menu a:hover { background: var(--nz-soft); }
.nz-menu > li:hover > .sub-menu, .nz-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nz-menu > li:hover > .nz-sub-toggle .nz-icon { transform: rotate(180deg); }
.nz-header__actions { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.nz-header__login { display: inline-flex; align-items: center; gap: 8px; color: var(--nz-ink); font-weight: 600; font-size: 15px; padding: 8px 6px; }
.nz-header__login .nz-icon { width: 20px; height: 20px; color: var(--nz-primary); }
.nz-header__cta { padding: 11px 22px; font-size: 15px; }
.nz-burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--nz-line); background: #fff; color: var(--nz-ink); cursor: pointer; place-items: center; }
.nz-burger .nz-icon { width: 24px; height: 24px; }
.nz-burger__close { display: none; }
.nz-nav__mobile-actions { display: none; }

/* Fallback buttons when Nezam Core is inactive */
:where(.nz-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent; font: 600 16px/1.4 var(--nz-font); cursor: pointer; transition: transform .2s, box-shadow .2s; }
:where(.nz-btn--primary) { background: var(--nz-grad); color: #fff !important; box-shadow: 0 10px 24px -10px rgba(255, 106, 43, .7); }
:where(.nz-btn--ghost) { background: #fff; color: var(--nz-ink) !important; border-color: var(--nz-line); }
:where(.nz-btn:hover) { transform: translateY(-2px); }

/* Footer -------------------------------------------------------------------- */
.nz-footer { position: relative; overflow: hidden; background: var(--nz-dark); color: rgba(255, 255, 255, .66); padding: 80px 0 0; margin-top: 0; font-size: 15px; }
.nz-footer__glow { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 106, 43, .22), transparent 65%); top: -320px; inset-inline-end: -160px; pointer-events: none; }
.nz-footer .nz-container { position: relative; }
.nz-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.nz-footer__about .nz-logo img { height: 64px; margin-bottom: 18px; }
.nz-footer__about p { line-height: 1.9; max-width: 360px; }
.nz-footer h3 { color: #fff; font-size: 17px; margin: 6px 0 18px; }
.nz-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nz-footer li { margin: 0; }
.nz-footer a { color: rgba(255, 255, 255, .72); }
.nz-footer a:hover { color: var(--nz-secondary); }
.nz-footer__col em { font-style: normal; font-size: 11px; background: rgba(255, 255, 255, .08); color: var(--nz-secondary); padding: 1px 8px; border-radius: 99px; margin-inline-start: 4px; }
.nz-footer__contact li { display: flex; gap: 10px; align-items: center; }
.nz-footer__contact .nz-icon { width: 18px; height: 18px; color: var(--nz-secondary); }
.nz-social { display: flex; gap: 10px; margin-top: 22px; }
.nz-social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); transition: .2s; }
.nz-social a:hover { background: var(--nz-grad); color: #fff; border-color: transparent; }
.nz-social svg { width: 19px; height: 19px; }
.nz-footer__partner { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.nz-footer__partner p { margin: 0; color: rgba(255, 255, 255, .82); font-weight: 500; }
.nz-footer__partner a { color: var(--nz-secondary); font-weight: 700; }
.nz-footer__spark { width: 36px; height: 36px; border-radius: 10px; background: var(--nz-grad); color: #fff; display: grid; place-items: center; flex: none; }
.nz-footer__spark svg { width: 18px; height: 18px; }
.nz-footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 24px 0 28px; margin-top: 28px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.nz-footer__bottom p { margin: 0; }
.nz-footer ul.nz-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Floating buttons */
.nz-wa { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #fff !important; padding: 12px 18px 12px 14px; border-radius: 999px; font-weight: 700; box-shadow: 0 14px 30px -12px rgba(37, 211, 102, .8); transition: transform .2s; }
.nz-wa:hover { transform: translateY(-3px); }
.nz-wa svg { width: 26px; height: 26px; }
.nz-top { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 90; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--nz-line); background: #fff; color: var(--nz-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--nz-shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s; }
.nz-top.is-on { opacity: 1; visibility: visible; transform: none; }
.nz-top .nz-icon { width: 22px; height: 22px; }

/* Page hero (fallback when plugin inactive) ------------------------------- */
:where(.nz-page-hero) { position: relative; overflow: hidden; padding: 64px 0 56px; background: linear-gradient(180deg, #fff, var(--nz-soft)); border-bottom: 1px solid var(--nz-line); }
:where(.nz-page-hero .nz-container) { position: relative; }
:where(.nz-page-hero__title) { font-size: clamp(30px, 4vw, 48px); margin: 0 0 12px; }
:where(.nz-page-hero__sub) { font-size: 18px; color: var(--nz-muted); margin: 0; max-width: 680px; }
:where(.nz-crumbs) { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--nz-muted); margin-bottom: 18px; }
:where(.nz-crumbs a) { color: var(--nz-muted); }
:where(.nz-crumbs a:hover) { color: var(--nz-primary); }
:where(.nz-hero__bg) { position: absolute; inset: 0; pointer-events: none; }

/* Blog ---------------------------------------------------------------------- */
.nz-blog { padding-top: 56px; }
.nz-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.nz-chips a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--nz-line); color: var(--nz-ink); font-weight: 500; font-size: 15px; background: #fff; }
.nz-chips a:hover { border-color: var(--nz-primary); color: var(--nz-primary); }
.nz-chips a.is-active { background: var(--nz-ink); border-color: var(--nz-ink); color: #fff; }
:where(.nz-grid) { display: grid; gap: 24px; }
:where(.nz-grid--3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:where(.nz-card) { background: #fff; border: 1px solid var(--nz-line); border-radius: var(--nz-radius); }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--nz-line); color: var(--nz-ink); font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--nz-grad); color: #fff; border-color: transparent; }
.nz-empty-state { text-align: center; padding: 48px 0; }
.nz-search-wrap { max-width: 560px; margin: 0 auto 40px; }
.nz-searchform { display: flex; gap: 8px; background: #fff; border: 1.5px solid var(--nz-line); border-radius: 999px; padding: 6px; }
.nz-searchform:focus-within { border-color: var(--nz-primary); box-shadow: 0 0 0 4px rgba(255, 106, 43, .12); }
.nz-searchform input { flex: 1; border: 0; background: transparent; padding: 0 16px; font-size: 16px; min-width: 0; outline: 0; }
.nz-searchform button { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--nz-grad); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* Article ------------------------------------------------------------------- */
.nz-article__head { position: relative; overflow: hidden; padding: 56px 0 40px; background: linear-gradient(180deg, #fff, var(--nz-soft)); }
.nz-article__head .nz-container { position: relative; }
.nz-article__title { font-size: clamp(28px, 4vw, 46px); line-height: 1.35; margin: 0 0 20px; }
.nz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 14.5px; color: var(--nz-muted); }
.nz-meta span { display: inline-flex; align-items: center; gap: 6px; }
.nz-meta .nz-icon { width: 16px; height: 16px; }
.nz-meta__cat { background: var(--nz-tint); color: var(--nz-primary); padding: 4px 12px; border-radius: 99px; font-weight: 600; font-size: 13px; }
.nz-article__thumb { margin: 0 auto; max-width: 1040px; }
.nz-article__thumb img { width: 100%; border-radius: 24px; display: block; box-shadow: var(--nz-shadow); margin-top: -8px; }
.nz-article__body { padding-top: 48px; padding-bottom: 24px; }
.nz-article__foot { padding-bottom: 48px; }
.nz-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.nz-tags a { background: var(--nz-soft); color: var(--nz-ink); padding: 5px 12px; border-radius: 99px; font-size: 14px; }
.nz-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 20px 0; border-top: 1px solid var(--nz-line); border-bottom: 1px solid var(--nz-line); }
.nz-share span { font-weight: 600; color: var(--nz-ink); margin-inline-end: 6px; }
.nz-share a, .nz-share button { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--nz-line); color: var(--nz-ink); font-size: 14px; font-weight: 500; background: #fff; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-family: inherit; }
.nz-share a:hover, .nz-share button:hover { border-color: var(--nz-primary); color: var(--nz-primary); }
.nz-share .nz-icon { width: 15px; height: 15px; }

/* Prose ------------------------------------------------------------------- */
.nz-prose { font-size: 17.5px; line-height: 2; color: var(--nz-text); }
.nz-prose > * { margin-top: 0; margin-bottom: 1.25em; }
.nz-prose h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 1.8em 0 .7em; }
.nz-prose h3 { font-size: clamp(19px, 2.2vw, 22px); margin: 1.6em 0 .6em; }
.nz-prose ul, .nz-prose ol { padding-inline-start: 1.4em; }
.nz-prose li { margin-bottom: .5em; }
.nz-prose ul li::marker { color: var(--nz-primary); }
.nz-prose ol li::marker { color: var(--nz-primary); font-weight: 700; }
.nz-prose a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.nz-prose strong { color: var(--nz-ink); }
.nz-prose blockquote, .nz-prose .wp-block-quote { margin-inline: 0; padding: 20px 24px; border-inline-start: 4px solid var(--nz-primary); background: var(--nz-soft); border-radius: 0 16px 16px 0; color: var(--nz-ink); font-size: 18.5px; }
[dir="rtl"] .nz-prose blockquote { border-radius: 16px 0 0 16px; }
.nz-prose img { border-radius: 16px; }
.nz-prose figure { margin-inline: 0; }
.nz-prose figcaption { font-size: 14px; color: var(--nz-muted); text-align: center; }
.nz-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.nz-prose th, .nz-prose td { border: 1px solid var(--nz-line); padding: 10px 14px; text-align: start; }
.nz-prose th { background: var(--nz-soft); color: var(--nz-ink); }
.nz-prose code { background: var(--nz-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.nz-prose pre { background: var(--nz-dark); color: #f3f3f3; padding: 18px; border-radius: 14px; overflow: auto; direction: ltr; text-align: left; }
.nz-prose hr { border: 0; border-top: 1px solid var(--nz-line); margin: 2.5em 0; }
.nz-prose .wp-block-button__link { background: var(--nz-grad); border-radius: 999px; padding: 12px 26px; color: #fff; text-decoration: none; font-weight: 600; }
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.aligncenter { margin-inline: auto; display: block; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption-text { font-size: 14px; color: var(--nz-muted); }
.sticky .nz-post__title::before { content: "★ "; color: var(--nz-primary); }

/* Comments ------------------------------------------------------------------ */
.nz-comments-wrap { padding-bottom: 64px; }
.nz-comments { border-top: 1px solid var(--nz-line); padding-top: 40px; }
.nz-comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.nz-comment-list .comment-body { padding: 20px; border: 1px solid var(--nz-line); border-radius: 16px; margin-bottom: 14px; }
.nz-comment-list .children { list-style: none; padding-inline-start: 28px; }
.nz-comment-list .avatar { border-radius: 50%; float: inline-start; margin-inline-end: 12px; }
.comment-form label { display: block; font-weight: 600; color: var(--nz-ink); margin-bottom: 6px; font-size: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1.5px solid var(--nz-line); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.comment-form textarea:focus, .comment-form input:focus { outline: 0; border-color: var(--nz-primary); }

/* 404 ----------------------------------------------------------------------- */
.nz-404 { position: relative; overflow: hidden; text-align: center; padding: 96px 0; }
.nz-404 .nz-container { position: relative; }
.nz-404__code { font-size: clamp(90px, 16vw, 180px); font-weight: 700; line-height: 1; margin: 0 0 12px; }
.nz-404 .nz-subtitle { margin: 0 auto 32px; }
.nz-grad-text { background: var(--nz-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Elementor ----------------------------------------------------------------- */
.nz-fullwidth > .elementor, .nz-article__body--el > .elementor { width: 100%; }
.elementor-page .nz-main > .elementor { margin: 0; }
.nz-canvas .nz-footer, .nz-canvas .nz-wa, .nz-canvas .nz-top { display: none; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
	.nz-burger { display: grid; }
	.nz-header__login span { display: none; }
	.nz-nav { position: fixed; inset: var(--nz-header-h) 0 0 0; background: #fff; padding: 20px 20px 32px; overflow-y: auto; opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility .25s; z-index: 99; border-top: 1px solid var(--nz-line); }
	.admin-bar .nz-nav { top: calc(var(--nz-header-h) + 46px); }
	.nz-open .nz-nav { transform: none; visibility: visible; opacity: 1; pointer-events: auto; }
	.nz-open { overflow: hidden; }
	.nz-open .nz-burger__open { display: none; }
	.nz-open .nz-burger__close { display: block; }
	.nz-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.nz-menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--nz-line); }
	.nz-menu > li > a { flex: 1; padding: 16px 6px; font-size: 17px; }
	.nz-menu > .current-menu-item > a { background: none; }
	.nz-sub-toggle { margin: 0; width: 44px; height: 44px; }
	.nz-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 12px 12px; width: 100%; display: none; min-width: 0; background: var(--nz-soft); border-radius: 12px; margin-bottom: 12px; }
	.nz-menu li.is-open > .sub-menu { display: block; }
	.nz-menu li.is-open > .nz-sub-toggle .nz-icon { transform: rotate(180deg); }
	.nz-nav__mobile-actions { display: grid; gap: 10px; margin-top: 24px; }
	.nz-footer__grid { grid-template-columns: 1fr 1fr; }
	.nz-footer__about { grid-column: 1 / -1; }
	.nz-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.admin-bar.nz-sticky .nz-header { top: 46px; }
}
@media (max-width: 640px) {
	:root { --nz-header-h: 68px; }
	.nz-logo img, .nz-logo .nz-logo__img { height: 42px; }
	.nz-header__cta { display: none; }
	.nz-header__in { gap: 12px; }
	.nz-footer { padding-top: 56px; }
	.nz-footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.nz-footer__bottom { flex-direction: column; align-items: flex-start; }
	.nz-grid--3 { grid-template-columns: 1fr; }
	.nz-prose { font-size: 16.5px; }
	.nz-wa span { display: none; }
	.nz-wa { padding: 12px; }
	.nz-article__thumb img { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
