/* Local Vazirmatn fonts */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Regular.woff') format('woff');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

/* NovaBox main styles */
:root {
    --nb-primary: #2158d5;
    --nb-primary-dark: #173f9e;
    --nb-text: #172033;
    --nb-muted: #697386;
    --nb-bg: #f2f4f8;
    --nb-surface: #ffffff;
    --nb-border: #e5e9f0;
    --nb-soft: #f7f8fb;
    --nb-radius: 16px;
    --nb-shadow: 0 14px 44px rgba(20, 32, 55, .07);
    --nb-container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--nb-bg);
    color: var(--nb-text);
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.85;
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body.admin-bar.has-sticky-header .site-header { top: 32px; }
a { color: var(--nb-primary); text-decoration: none; }
a:hover { color: var(--nb-primary-dark); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--nb-primary) 20%, white); }

.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;
}
.screen-reader-text:focus, .skip-link:focus {
    position: fixed !important; inset: 12px auto auto 12px;
    width: auto; height: auto; padding: 10px 14px;
    clip: auto; z-index: 99999;
    background: #111827; color: #fff; border-radius: 8px;
}

.site-shell {
    width: min(var(--nb-container), calc(100% - 32px));
    margin: 26px auto;
    background: var(--nb-surface);
    border: 1px solid var(--nb-border);
    border-radius: 20px;
    box-shadow: var(--nb-shadow);
    overflow: clip;
}
.site-header {
    position: relative;
    z-index: 100;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--nb-border);
    backdrop-filter: blur(14px);
}
.has-sticky-header .site-header { position: sticky; top: 0; }
.header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 10px 28px;
}
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.site-logo img { max-height: 54px; width: auto; }
.brand-mark {
    display: grid; place-items: center;
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-dark));
    color: #fff; font-size: 22px; font-weight: 900;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--nb-primary) 25%, transparent);
}
.brand-mark:hover { color: #fff; }
.site-title { margin: 0; font-size: 18px; font-weight: 850; line-height: 1.35; }
.site-title a { color: var(--nb-text); }
.site-description { margin: 3px 0 0; color: var(--nb-muted); font-size: 11.5px; line-height: 1.4; }

.main-navigation { justify-self: center; }
.primary-menu, .footer-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.primary-menu li { position: relative; }
.primary-menu a {
    display: block; padding: 9px 12px;
    color: #354052; border-radius: 9px;
    font-size: 13.5px; font-weight: 700;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a {
    color: var(--nb-primary); background: color-mix(in srgb, var(--nb-primary) 8%, white);
}
.primary-menu .sub-menu {
    position: absolute; inset: calc(100% + 8px) 0 auto auto;
    width: 210px; list-style: none; margin: 0; padding: 8px;
    background: #fff; border: 1px solid var(--nb-border); border-radius: 12px;
    box-shadow: var(--nb-shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: .2s ease;
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.header-actions { display: flex; gap: 8px; }
.icon-button {
    width: 42px; height: 42px; padding: 0;
    display: grid; place-items: center;
    color: var(--nb-text); background: var(--nb-soft);
    border: 1px solid var(--nb-border); border-radius: 11px;
}
.icon-button:hover { color: var(--nb-primary); border-color: color-mix(in srgb, var(--nb-primary) 30%, var(--nb-border)); }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-toggle { display: none; gap: 4px; align-content: center; }
.menu-toggle span { width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: .2s; }
.menu-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-search {
    border-top: 1px solid var(--nb-border);
    background: linear-gradient(180deg, #fff, #fbfcff);
}
.header-search[hidden] { display: none; }
.header-search-inner {
    display: grid;
    grid-template-columns: minmax(0, 760px) 44px;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
}
.novabox-header-search-form { width: 100%; margin: 0; }
.novabox-header-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 54px;
    padding: 5px;
    background: #f7f9fc;
    border: 1px solid var(--nb-border);
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(24, 36, 60, .035);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.novabox-header-search-box:focus-within {
    background: #fff;
    border-color: color-mix(in srgb, var(--nb-primary) 55%, var(--nb-border));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--nb-primary) 10%, transparent);
}
.novabox-header-search-field {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    color: var(--nb-text);
    background: transparent;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}
.novabox-header-search-field::-webkit-search-cancel-button { cursor: pointer; }
.novabox-header-search-field::placeholder { color: #8c96a7; }
.novabox-header-search-submit {
    flex: 0 0 auto;
    min-width: 112px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-dark));
    border: 0;
    border-radius: 11px;
    font-weight: 800;
    box-shadow: 0 7px 16px color-mix(in srgb, var(--nb-primary) 18%, transparent);
    transition: transform .2s ease, box-shadow .2s ease;
}
.novabox-header-search-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 9px 20px color-mix(in srgb, var(--nb-primary) 24%, transparent);
}
.novabox-header-search-submit svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
.search-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--nb-muted);
    background: #fff;
    border: 1px solid var(--nb-border);
    border-radius: 12px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.search-close:hover {
    color: #c23737;
    background: #fff8f8;
    border-color: #f1cccc;
}
.search-close svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}
/* فرم هدر عمداً فقط ورودی جستجو و دکمه دارد. هر select تزریق‌شده توسط افزونه‌ها مخفی می‌شود. */
.novabox-header-search-form select,
.novabox-header-search-form input[type="hidden"],
.novabox-header-search-box > :not(.novabox-header-search-field):not(.novabox-header-search-submit) {
    display: none !important;
}

.site-header-banner {
    padding: 22px 28px 0;
    background: var(--nb-surface);
}
.site-header-banner a {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: var(--nb-soft);
}
.site-header-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.site-main { padding: 30px 28px 42px; }
.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
    align-items: start;
}
.sidebar-left .layout-grid { grid-template-columns: 300px minmax(0, 1fr); }
.sidebar-left .content-column { grid-column: 2; }
.sidebar-left .site-sidebar { grid-column: 1; grid-row: 1; }
.no-sidebar .layout-grid { display: block; }
.no-sidebar .content-column { max-width: 840px; margin-inline: auto; }

.page-header {
    margin-bottom: 20px; padding: 23px 25px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--nb-primary) 7%, white), #fff);
    border: 1px solid var(--nb-border); border-radius: var(--nb-radius);
}
.eyebrow { display: inline-block; color: var(--nb-primary); font-size: 12px; font-weight: 850; margin-bottom: 4px; }
.page-title { margin: 0; color: var(--nb-text); font-size: clamp(24px, 4vw, 34px); line-height: 1.4; }
.page-header p, .archive-description { margin: 8px 0 0; color: var(--nb-muted); }
.archive-description p { margin: 0; }
.posts-list { display: grid; gap: 17px; }

.post-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 225px;
    background: #fff;
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(24, 35, 58, .08); border-color: #d9deea; }
.post-card-media { display: block; min-height: 100%; background: var(--nb-soft); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.025); }
.post-placeholder {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 100%; padding: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 15%, rgba(255,255,255,.2), transparent 30%),
        linear-gradient(145deg, var(--nb-primary), var(--nb-primary-dark));
    isolation: isolate;
}
.post-placeholder::after {
    content: ''; position: absolute; width: 120px; height: 120px; inset: auto -35px -35px auto;
    border: 22px solid rgba(255,255,255,.08); border-radius: 50%; z-index: -1;
}
.placeholder-letter { font-size: 74px; line-height: 1; font-weight: 900; opacity: .95; }
.placeholder-category { align-self: flex-start; padding: 5px 9px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 11px; }
.post-card-body { display: flex; flex-direction: column; padding: 20px 22px; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; color: var(--nb-muted); font-size: 11.5px; }
.post-meta > span:not(:first-child)::before { content: '•'; margin-inline-end: 10px; color: #c1c7d2; }
.top-meta { margin-bottom: 8px; }
.top-meta .post-category { color: var(--nb-primary); font-weight: 800; }
.post-card-title { margin: 0 0 8px; font-size: 20px; line-height: 1.6; }
.post-card-title a { color: var(--nb-text); }
.post-card-title a:hover { color: var(--nb-primary); }
.post-excerpt { color: #5d6778; font-size: 13px; line-height: 1.9; }
.post-excerpt p { margin: 0; }
.post-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.read-more { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 850; }
.read-more span { transition: transform .2s; }
.read-more:hover span { transform: translateX(-3px); }

.site-sidebar { position: sticky; top: 100px; }
.admin-bar .site-sidebar { top: 132px; }
.sidebar-mobile-toggle { display: none; }
.sidebar-widgets { display: grid; gap: 16px; }
.widget {
    padding: 19px;
    background: #fff;
    border: 1px solid var(--nb-border);
    border-radius: 14px;
}
.widget-title {
    position: relative; margin: 0 0 15px; padding: 0 14px 11px 0;
    border-bottom: 1px solid var(--nb-border);
    font-size: 15px; line-height: 1.5;
}
.widget-title::before { content: ''; position: absolute; inset: 5px 0 auto auto; width: 5px; height: 14px; border-radius: 4px; background: var(--nb-primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px dashed var(--nb-border); color: var(--nb-muted); }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li:first-child { padding-top: 0; }
.widget a { color: #445066; }
.widget a:hover { color: var(--nb-primary); }
.widget_categories li, .widget_archive li { display: flex; justify-content: space-between; gap: 10px; }
.widget_tag_cloud a { display: inline-block; margin: 3px 1px; padding: 4px 8px; background: var(--nb-soft); border-radius: 7px; font-size: 11px !important; }

.search-form { display: flex; gap: 7px; }
.search-field {
    min-width: 0; flex: 1; height: 45px; padding: 0 14px;
    color: var(--nb-text); background: #fff;
    border: 1px solid var(--nb-border); border-radius: 10px; outline: 0;
}
.search-field:focus { border-color: var(--nb-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nb-primary) 12%, transparent); }
.search-submit, .button, input[type="submit"] {
    min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 0 16px; color: #fff; background: var(--nb-primary);
    border: 0; border-radius: 10px; font-weight: 800;
}
.search-submit:hover, .button:hover, input[type="submit"]:hover { color: #fff; background: var(--nb-primary-dark); }
.search-submit svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }


/* Search results */
.search-results-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
    align-items: end;
    gap: 22px;
}
.search-results-copy { min-width: 0; }
.search-query-term { color: var(--nb-primary); overflow-wrap: anywhere; }
.search-result-count { margin: 8px 0 0; color: var(--nb-muted); font-size: 13px; }
.search-refine-form .search-form { width: 100%; }
.search-refine-form .search-field { background: #fff; }

/* Core archive block and common ParsiDate archive widget class names */
.widget .wp-block-archives-list li,
.widget_archive li,
.widget_persian_archive li,
.widget_parsidate_archive li,
.widget_wp_parsidate_archive li,
.widget[class*="parsidate"] li,
.widget[class*="persian-archive"] li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.widget .wp-block-archives-list a,
.widget_persian_archive a,
.widget_parsidate_archive a,
.widget_wp_parsidate_archive a,
.widget[class*="parsidate"] a,
.widget[class*="persian-archive"] a {
    flex: 1;
}

.single-article {
    padding: clamp(22px, 4vw, 42px);
    background: #fff; border: 1px solid var(--nb-border); border-radius: var(--nb-radius);
}
.entry-header { margin-bottom: 25px; }
.entry-title { margin: 4px 0 20px; font-size: clamp(28px, 5vw, 43px); line-height: 1.45; letter-spacing: -.4px; }
.entry-byline { display: flex; align-items: center; gap: 11px; }
.author-avatar { border-radius: 50%; }
.entry-byline strong { display: block; margin-bottom: 3px; font-size: 13px; }
.entry-thumbnail { margin: 0 0 30px; overflow: hidden; border-radius: 14px; }
.entry-thumbnail img { width: 100%; }
.entry-content { color: #303a4b; font-size: 16px; line-height: 2.05; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--nb-text); line-height: 1.55; margin-top: 1.7em; }
.entry-content h2 { font-size: 27px; }
.entry-content h3 { font-size: 22px; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content blockquote {
    margin: 24px 0; padding: 17px 20px;
    background: color-mix(in srgb, var(--nb-primary) 6%, white);
    border-inline-start: 4px solid var(--nb-primary); border-radius: 10px;
}
.entry-content pre { overflow: auto; direction: ltr; text-align: left; padding: 16px; background: #111827; color: #e5e7eb; border-radius: 10px; }
.entry-content code { direction: ltr; font-family: Consolas, Monaco, monospace; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--nb-border); white-space: nowrap; }
.entry-content figure { max-width: 100%; }
.entry-footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--nb-border); }
.tag-list { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; }
.tag-list a { padding: 5px 9px; color: #4c576a; background: var(--nb-soft); border-radius: 7px; }
.page-links { margin-top: 20px; }

.post-navigation { margin: 18px 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: block; min-height: 100%; padding: 16px 18px; color: var(--nb-text); background: #fff; border: 1px solid var(--nb-border); border-radius: 13px; }
.post-navigation a:hover { color: var(--nb-primary); border-color: color-mix(in srgb, var(--nb-primary) 30%, var(--nb-border)); }
.nav-subtitle { display: block; color: var(--nb-muted); font-size: 11px; }
.nav-title { display: block; margin-top: 4px; font-weight: 800; line-height: 1.6; }
.nav-next { text-align: left; }

.comments-area { margin-top: 18px; padding: clamp(20px, 4vw, 34px); background: #fff; border: 1px solid var(--nb-border); border-radius: var(--nb-radius); }
.comments-title, .comment-reply-title { margin: 0 0 20px; font-size: 22px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 12px 34px 0 0; padding: 0; }
.comment-body { position: relative; margin-bottom: 14px; padding: 17px; background: var(--nb-soft); border: 1px solid var(--nb-border); border-radius: 12px; }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.comment-author { display: flex; align-items: center; gap: 9px; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { margin-inline-start: auto; font-size: 10.5px; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 8px; font-size: 11px; font-weight: 800; }
.comment-respond { margin-top: 28px; }
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form > p { margin: 0; }
.comment-form-comment, .comment-notes, .logged-in-as, .form-submit, .comment-form-cookies-consent { grid-column: 1 / -1; }
.comment-form label { display: block; margin-bottom: 5px; color: #465166; font-size: 12px; font-weight: 700; }
.comment-form input:not([type="checkbox"]), .comment-form textarea {
    width: 100%; padding: 11px 13px; color: var(--nb-text); background: #fff;
    border: 1px solid var(--nb-border); border-radius: 9px; outline: 0;
}
.comment-form textarea { resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--nb-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nb-primary) 10%, transparent); }
.required { color: #d92d20; }

.pagination { margin-top: 22px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; color: #4d586b; background: #fff; border: 1px solid var(--nb-border); border-radius: 9px; }
.page-numbers.current, .page-numbers:hover { color: #fff; background: var(--nb-primary); border-color: var(--nb-primary); }

.no-results, .error-404 { max-width: 690px; margin: 30px auto; padding: 45px 30px; text-align: center; background: #fff; border: 1px solid var(--nb-border); border-radius: var(--nb-radius); }
.empty-icon, .error-code { display: block; color: var(--nb-primary); font-size: 66px; font-weight: 900; line-height: 1; }
.no-results h2, .error-404 h1 { margin: 18px 0 7px; }
.no-results p, .error-404 p { color: var(--nb-muted); }
.no-results .search-form, .error-404 .search-form { max-width: 480px; margin: 22px auto; }
.error-404 .button { margin-top: 4px; }

.site-footer { border-top: 1px solid var(--nb-border); background: #fbfcfd; }
.footer-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 28px; }
.footer-widgets .widget { background: transparent; }
.footer-bottom { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 28px; border-top: 1px solid var(--nb-border); color: var(--nb-muted); font-size: 12px; }
.footer-menu a { color: var(--nb-muted); }
.footer-menu a:hover { color: var(--nb-primary); }

.alignwide { margin-inline: -5%; max-width: 110%; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.wp-caption, .gallery-caption { color: var(--nb-muted); font-size: 12px; }
.sticky { border-color: color-mix(in srgb, var(--nb-primary) 32%, var(--nb-border)); }
.bypostauthor > .comment-body { border-inline-start: 3px solid var(--nb-primary); }

@media (max-width: 1040px) {
    .header-inner { gap: 16px; }
    .site-description { display: none; }
    .primary-menu a { padding-inline: 8px; }
    .layout-grid { grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; }
    .sidebar-left .layout-grid { grid-template-columns: 275px minmax(0, 1fr); }
    .post-card { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .search-results-heading { grid-template-columns: 1fr; align-items: stretch; }
    body.admin-bar.has-sticky-header .site-header { top: 46px; }
    .site-shell { width: min(100% - 20px, 760px); margin: 10px auto; border-radius: 15px; }
    .header-inner { min-height: 68px; padding: 9px 16px; grid-template-columns: minmax(0, 1fr) auto; }
    .site-header-banner { padding: 16px 16px 0; }
    .site-header-banner a { border-radius: 12px; }
    .site-branding { min-width: 0; }
    .site-title { font-size: 16px; }
    .brand-mark { width: 42px; height: 42px; }
    .menu-toggle { display: grid; }
    .main-navigation {
        position: absolute; inset: 100% 0 auto 0; display: none;
        padding: 10px 16px 16px; background: #fff; border-bottom: 1px solid var(--nb-border);
        box-shadow: 0 12px 22px rgba(20,32,55,.08);
    }
    .main-navigation.is-open { display: block; }
    .primary-menu { align-items: stretch; flex-direction: column; }
    .primary-menu a { padding: 10px 12px; }
    .primary-menu .sub-menu { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-inline-start: 2px solid var(--nb-border); margin: 3px 12px 0 0; }
    .site-main { padding: 20px 16px 30px; }
    .layout-grid, .sidebar-left .layout-grid { grid-template-columns: 1fr; }
    .sidebar-left .content-column, .sidebar-left .site-sidebar { grid-column: auto; grid-row: auto; }
    .site-sidebar { position: static; }
    .sidebar-mobile-toggle {
        width: 100%; display: flex; align-items: center; justify-content: space-between;
        padding: 13px 15px; color: var(--nb-text); background: #fff;
        border: 1px solid var(--nb-border); border-radius: 12px; font-weight: 800;
    }
    .sidebar-mobile-toggle::after { content: '+'; color: var(--nb-primary); font-size: 20px; }
    .sidebar-mobile-toggle[aria-expanded="true"]::after { content: '−'; }
    .sidebar-widgets { display: none; margin-top: 12px; }
    .sidebar-widgets.is-open { display: grid; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    .site-shell { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
    .header-inner { padding-inline: 12px; }
    .site-header-banner { padding: 12px 12px 0; }
    .site-header-banner a { border-radius: 10px; }
    .header-search-inner {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 8px;
        padding: 12px;
    }
    .novabox-header-search-box { min-height: 50px; padding: 4px; border-radius: 13px; }
    .novabox-header-search-field { height: 40px; padding-inline: 11px; font-size: 13px; }
    .novabox-header-search-submit { width: 42px; min-width: 42px; height: 40px; padding: 0; border-radius: 10px; }
    .novabox-header-search-submit span { display: none; }
    .search-close { width: 42px; height: 42px; }
    .site-main { padding: 16px 12px 26px; }
    .page-header { padding: 19px; }
    .page-title { font-size: 25px; }
    .post-card { grid-template-columns: 1fr; min-height: 0; }
    .post-card-media { min-height: 160px; max-height: 190px; }
    .post-card-media img { aspect-ratio: 16/8; }
    .post-placeholder { min-height: 160px; }
    .placeholder-letter { font-size: 60px; }
    .post-card-body { padding: 17px; }
    .post-card-title { font-size: 18px; }
    .post-card-footer { align-items: flex-start; }
    .post-card-footer .post-meta { gap: 4px 8px; }
    .post-card-footer .post-meta span:nth-child(3) { display: none; }
    .single-article { padding: 20px 17px; }
    .entry-title { font-size: 28px; }
    .entry-content { font-size: 15px; }
    .entry-content h2 { font-size: 23px; }
    .post-navigation .nav-links { grid-template-columns: 1fr; }
    .nav-next { text-align: right; }
    .comments-area { padding: 19px 16px; }
    .comment-list .children { margin-right: 15px; }
    .comment-form { grid-template-columns: 1fr; }
    .comment-form > p { grid-column: 1; }
    .footer-widgets { grid-template-columns: 1fr; padding: 20px 12px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; padding: 17px 14px; }
    .footer-menu { flex-wrap: wrap; }
}

@media (max-width: 380px) {
    .brand-copy { max-width: 132px; }
    .site-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .icon-button { width: 39px; height: 39px; }
    .post-card-footer { display: block; }
    .read-more { margin-top: 12px; }
}

/* Prevent legacy post markup from overflowing narrow screens */
.content-column,
.single-article,
.entry-header,
.entry-content,
.entry-footer {
    min-width: 0;
    max-width: 100%;
}

.entry-content {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.entry-content p,
.entry-content li,
.entry-content a,
.entry-content blockquote,
.entry-content figcaption,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video,
.entry-content audio,
.entry-content svg,
.entry-content canvas {
    max-width: 100%;
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .single-article {
        width: 100%;
        overflow: hidden;
    }

    /* Old Classic Editor content may contain inline fixed widths/margins. */
    .entry-content > *,
    .entry-content p,
    .entry-content div,
    .entry-content section,
    .entry-content article,
    .entry-content header,
    .entry-content footer,
    .entry-content aside,
    .entry-content figure,
    .entry-content blockquote,
    .entry-content ul,
    .entry-content ol,
    .entry-content dl {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .entry-content p,
    .entry-content div:not(.wp-block-file):not(.wp-block-group):not(.wp-block-columns),
    .entry-content section,
    .entry-content blockquote {
        width: auto !important;
        min-width: 0 !important;
        margin-inline-start: 0 !important;
        margin-inline-end: 0 !important;
        transform: none !important;
    }

    .entry-content p,
    .entry-content li,
    .entry-content span,
    .entry-content strong,
    .entry-content em,
    .entry-content a {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word;
    }

    .entry-content img,
    .entry-content figure,
    .entry-content .wp-caption,
    .entry-content .wp-block-image,
    .entry-content .wp-block-file,
    .entry-content .wp-block-embed,
    .entry-content iframe,
    .entry-content embed,
    .entry-content object,
    .entry-content video {
        width: auto !important;
        max-width: 100% !important;
        height: auto;
    }

    .entry-content table {
        width: 100% !important;
        max-width: 100% !important;
    }
}
