/* ==========================================================================
   SEO Blog Manager — Frontend Styles
   Clean, simple, professional design. Prefix: .sbm-
   ========================================================================== */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
    --sbm-primary:       #2563eb;
    --sbm-primary-hover: #1d4ed8;
    --sbm-text:          #1a1a2e;
    --sbm-text-body:     #374151;
    --sbm-text-muted:    #6b7280;
    --sbm-text-light:    #9ca3af;
    --sbm-border:        #e5e7eb;
    --sbm-bg:            #f9fafb;
    --sbm-white:         #ffffff;
    --sbm-radius:        10px;
    --sbm-radius-sm:     6px;
    --sbm-shadow:        0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    --sbm-shadow-hover:  0 4px 16px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.07);
    --sbm-transition:    0.18s ease;
}

/* ── Box sizing reset ──────────────────────────────────────────────────────── */
.sbm-blog-section *,
.sbm-single-wrap * {
    box-sizing: border-box;
}

/* ==========================================================================
   BLOG HERO HEADING (above search bar)
   ========================================================================== */
.sbm-blog-hero {
    text-align: center;
    margin-bottom: 24px;
    padding: 28px 20px 0;
}
.sbm-blog-hero__heading {
    /* Elegant serif italic — gives the quote a distinct, editorial feel */
    font-family: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
    font-size: clamp(20px, 2.8vw, 30px);
    font-weight: 700;
    font-style: italic;
    color: var(--sbm-text);
    margin: 0 0 8px;
    line-height: 1.4;
    letter-spacing: 0.01em;
    /* Subtle gradient text on supported browsers */
    background: linear-gradient(135deg, #1a1a2e 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .sbm-blog-hero__heading {
        color: var(--sbm-text);
        background: none;
        -webkit-text-fill-color: unset;
    }
}
.sbm-blog-hero__sub {
    font-size: 15px;
    color: var(--sbm-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */
.sbm-filter-bar { margin-bottom: 28px; }
.sbm-filter-form {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: var(--sbm-white); border: 1px solid var(--sbm-border);
    border-radius: var(--sbm-radius); padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sbm-filter__search { flex: 1; min-width: 200px; }
.sbm-filter__input,
.sbm-filter__select {
    width: 100%; padding: 9px 12px; font-size: 14px;
    border: 1px solid var(--sbm-border); border-radius: var(--sbm-radius-sm);
    background: var(--sbm-white); color: var(--sbm-text-body);
    line-height: 1.5; font-family: inherit;
    transition: border-color var(--sbm-transition), box-shadow var(--sbm-transition);
}
.sbm-filter__input:focus,
.sbm-filter__select:focus {
    outline: none; border-color: var(--sbm-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.sbm-filter__cat { min-width: 170px; }
.sbm-filter__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sbm-filter__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; font-size: 14px; font-weight: 600;
    border-radius: var(--sbm-radius-sm); cursor: pointer;
    text-decoration: none; font-family: inherit; white-space: nowrap;
    transition: all var(--sbm-transition); line-height: 1; border: 1px solid transparent;
}
.sbm-filter__btn--search {
    background: var(--sbm-primary); color: #fff; border-color: var(--sbm-primary);
}
.sbm-filter__btn--search:hover {
    background: var(--sbm-primary-hover); border-color: var(--sbm-primary-hover);
    color: #fff; text-decoration: none;
}
.sbm-filter__btn--clear {
    background: var(--sbm-white); color: var(--sbm-text-muted);
    border-color: var(--sbm-border);
}
.sbm-filter__btn--clear:hover {
    background: var(--sbm-bg); color: var(--sbm-text-body);
    border-color: #d1d5db; text-decoration: none;
}

/* Reset button */
.sbm-filter__btn--reset {
    background: var(--sbm-white); color: var(--sbm-text-muted);
    border-color: var(--sbm-border);
}
.sbm-filter__btn--reset:hover {
    background: #fff7ed; color: #b45309;
    border-color: #fbbf24; text-decoration: none;
}

/* Grid container loading state */
.sbm-grid-container {
    transition: opacity 0.2s ease;
}
.sbm-loading-placeholder {
    min-height: 200px;
}
.sbm-active-filters {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-top: 8px; font-size: 13px;
}
.sbm-active-filters__label { color: var(--sbm-text-muted); font-weight: 500; }
.sbm-filter-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; background: #eff6ff; color: var(--sbm-primary);
    border-radius: 20px; font-size: 12px; font-weight: 500;
    border: 1px solid #bfdbfe;
}
.sbm-filter-tag__remove { color: var(--sbm-primary); text-decoration: none; font-weight: 700; }
.sbm-filter-tag__remove:hover { color: #dc2626; }

/* ==========================================================================
   BLOG GRID
   ========================================================================== */
.sbm-grid {
    display: grid; gap: 24px;
    grid-template-columns: repeat(4, 1fr);
}
@media (min-width: 1600px) { .sbm-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1279px) { .sbm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1023px) { .sbm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px)  { .sbm-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ── Blog Card ─────────────────────────────────────────────────────────────── */
.sbm-card {
    background: var(--sbm-white); border: 1px solid var(--sbm-border);
    border-radius: var(--sbm-radius); overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--sbm-shadow);
    transition: transform var(--sbm-transition), box-shadow var(--sbm-transition);
}
.sbm-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sbm-shadow-hover);
}

/* Card image */
.sbm-card__img-wrap {
    display: block; overflow: hidden;
    aspect-ratio: 16 / 9; background: #f3f4f6;
    flex-shrink: 0; position: relative; text-decoration: none;
}
.sbm-card__img-wrap:focus-visible { outline: 2px solid var(--sbm-primary); outline-offset: 2px; }
.sbm-card__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.3s ease;
}
.sbm-card:hover .sbm-card__img { transform: scale(1.04); }
.sbm-card__img--placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex; align-items: center; justify-content: center;
    color: #d1d5db;
}

/* Category badge on image */
.sbm-card__cat-overlay {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,0.55); color: #fff;
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 4px; letter-spacing: 0.03em; pointer-events: none;
}

/* Card body */
.sbm-card__body {
    padding: 16px 18px 18px; flex: 1;
    display: flex; flex-direction: column;
}
.sbm-card__date {
    display: block; font-size: 12px; color: var(--sbm-text-muted);
    font-weight: 500; margin-bottom: 7px; letter-spacing: 0.01em;
}
.sbm-card__title {
    font-size: 15px; font-weight: 700; line-height: 1.45;
    margin: 0 0 8px; color: var(--sbm-text);
}
.sbm-card__title a {
    color: inherit; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color var(--sbm-transition);
}
.sbm-card__title a:hover { color: var(--sbm-primary); }
.sbm-card__excerpt {
    font-size: 13px;
    color: var(--sbm-text-muted);
    line-height: 1.6;
    margin: 0 0 12px;
    flex: 1;
    /* Clamp to 3 lines — no max-height fallback which causes clipping */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sbm-card__read-more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--sbm-primary);
    text-decoration: none; margin-top: auto;
    transition: gap var(--sbm-transition);
    align-self: flex-start;
}
.sbm-card__read-more:hover { gap: 7px; text-decoration: none; color: var(--sbm-primary-hover); }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.sbm-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; flex-wrap: wrap; margin-top: 40px;
    padding-top: 24px; border-top: 1px solid var(--sbm-border);
}
.sbm-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 10px; font-size: 14px;
    font-weight: 500; border-radius: var(--sbm-radius-sm);
    border: 1px solid var(--sbm-border); background: var(--sbm-white);
    color: var(--sbm-text-body); text-decoration: none;
    transition: all var(--sbm-transition);
}
.sbm-page-btn:hover {
    background: #eff6ff; border-color: #bfdbfe; color: var(--sbm-primary);
    text-decoration: none;
}
.sbm-page-btn--current {
    background: var(--sbm-primary); border-color: var(--sbm-primary);
    color: #fff; cursor: default; font-weight: 700;
}
.sbm-page-ellipsis { color: var(--sbm-text-light); font-size: 14px; padding: 0 2px; }

.sbm-no-results {
    text-align: center; padding: 60px 20px;
    color: var(--sbm-text-muted); font-size: 15px;
    grid-column: 1 / -1;
    background: var(--sbm-white); border: 1px solid var(--sbm-border);
    border-radius: var(--sbm-radius);
}
.sbm-no-results__icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--sbm-bg); margin: 0 auto 16px; color: #9ca3af;
}
.sbm-no-results a { color: var(--sbm-primary); font-weight: 600; }
.sbm-results-summary {
    font-size: 13px; color: var(--sbm-text-light);
    text-align: center; margin-top: 12px;
}

/* ==========================================================================
   SINGLE POST PAGE
   ========================================================================== */
.sbm-single-wrap {
    padding: 32px 20px 72px;
    background: var(--sbm-bg);
    min-height: 60vh;
}
.sbm-single-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Two-column: article + sidebar */
.sbm-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.sbm-breadcrumb { margin-bottom: 22px; }
.sbm-breadcrumb__list {
    list-style: none !important; padding: 0 !important; margin: 0 !important;
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    font-size: 13px; color: var(--sbm-text-muted);
}
.sbm-breadcrumb__item { display: list-item !important; list-style: none !important; }
.sbm-breadcrumb__item a { color: var(--sbm-primary); text-decoration: none; }
.sbm-breadcrumb__item a:hover { text-decoration: underline; }
.sbm-breadcrumb__sep { color: #d1d5db; display: flex; align-items: center; }
.sbm-breadcrumb__item--current {
    color: var(--sbm-text-body); font-weight: 500;
    max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ==========================================================================
   ARTICLE
   ========================================================================== */
.sbm-article {
    background: var(--sbm-white);
    border: 1px solid var(--sbm-border);
    border-radius: var(--sbm-radius);
    box-shadow: var(--sbm-shadow);
    padding: 36px 40px;
}

/* Article header */
.sbm-article__header { margin-bottom: 24px; }
.sbm-article__cat-badge {
    display: inline-block;
    background: #eff6ff; color: var(--sbm-primary);
    font-size: 12px; font-weight: 600; padding: 3px 12px;
    border-radius: 4px; letter-spacing: 0.03em; text-transform: uppercase;
    margin-bottom: 12px; border: 1px solid #bfdbfe;
}
.sbm-article__title {
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800; line-height: 1.25;
    color: var(--sbm-text); margin: 0 0 18px;
    letter-spacing: -0.02em;
}
.sbm-article__meta {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap; font-size: 13px; color: var(--sbm-text-muted);
}
.sbm-meta-chip {
    display: inline-flex; align-items: center; gap: 5px;
}
.sbm-article__divider {
    border: none; border-top: 1px solid var(--sbm-border);
    margin: 0 0 28px;
}

/* ==========================================================================
   ARTICLE CONTENT — typography
   ========================================================================== */
.sbm-article__content {
    font-size: 16px; line-height: 1.82; color: var(--sbm-text-body);
    margin-bottom: 36px;
}

/* Headings — !important to override theme resets */
.sbm-article__content h2 {
    font-size: 1.55em !important; font-weight: 700 !important;
    margin: 2em 0 0.7em !important; color: var(--sbm-text) !important;
    line-height: 1.3 !important; letter-spacing: -0.015em;
    padding-bottom: 8px; border-bottom: 1px solid var(--sbm-border);
}
.sbm-article__content h3 {
    font-size: 1.28em !important; font-weight: 700 !important;
    margin: 1.8em 0 0.55em !important; color: var(--sbm-text) !important;
    line-height: 1.35 !important;
}
.sbm-article__content h4,
.sbm-article__content h5,
.sbm-article__content h6 {
    font-size: 1.08em !important; font-weight: 700 !important;
    margin: 1.5em 0 0.5em !important; color: var(--sbm-text) !important;
}
.sbm-article__content p { margin: 0 0 1.35em !important; }

/* Lists — !important to beat every theme reset */
.sbm-article__content ul,
.sbm-article__content ol {
    margin: 0 0 1.35em 1.6em !important;
    padding: 0 !important;
    list-style-position: outside !important;
}
.sbm-article__content ul    { list-style-type: disc !important; }
.sbm-article__content ol    { list-style-type: decimal !important; }
.sbm-article__content ul ul { list-style-type: circle !important; margin-top: 0.3em !important; margin-bottom: 0.3em !important; }
.sbm-article__content ol ol { list-style-type: lower-alpha !important; margin-top: 0.3em !important; }
.sbm-article__content li {
    display: list-item !important; list-style: inherit !important;
    margin-bottom: 0.4em !important; line-height: 1.72;
}
.sbm-article__content li > p { margin-bottom: 0.25em !important; }

/* Inline & misc content elements */
.sbm-article__content a { color: var(--sbm-primary); text-decoration: underline; text-underline-offset: 3px; }
.sbm-article__content a:hover { color: var(--sbm-primary-hover); }
.sbm-article__content strong, .sbm-article__content b { font-weight: 700; }
.sbm-article__content em, .sbm-article__content i { font-style: italic; }
.sbm-article__content blockquote {
    border-left: 3px solid #d1d5db; margin: 1.5em 0; padding: 12px 20px;
    background: #f9fafb; color: #4b5563; font-style: italic;
    border-radius: 0 var(--sbm-radius-sm) var(--sbm-radius-sm) 0;
}
.sbm-article__content pre {
    background: #1f2937; color: #f9fafb; padding: 18px 22px;
    border-radius: var(--sbm-radius-sm); overflow-x: auto; margin: 1.5em 0;
    line-height: 1.65; font-size: 0.88em;
    font-family: 'Consolas','Fira Code',monospace;
}
.sbm-article__content code {
    background: #f3f4f6; color: #111827; padding: 2px 6px;
    border-radius: 4px; font-size: 0.88em;
    font-family: 'Consolas','Fira Code',monospace;
    border: 1px solid var(--sbm-border);
}
.sbm-article__content pre code { background: none; color: inherit; padding: 0; border: none; }
.sbm-article__content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.sbm-article__content table th, .sbm-article__content table td { border: 1px solid var(--sbm-border); padding: 10px 14px; text-align: left; }
.sbm-article__content table th { background: #f9fafb; font-weight: 700; color: var(--sbm-text); }
.sbm-article__content table tr:nth-child(even) { background: #f9fafb; }
.sbm-article__content img {
    max-width: 100%; width: auto; height: auto; display: block;
    margin: 1.5em auto; border-radius: var(--sbm-radius-sm);
    border: 1px solid var(--sbm-border);
}
.sbm-article__content figure, .sbm-article__content .wp-block-image { max-width: 100%; margin: 1.5em auto; text-align: center; }
.sbm-article__content figcaption, .sbm-article__content .wp-caption-text { font-size: 12px; color: var(--sbm-text-light); text-align: center; margin-top: 6px; font-style: italic; }
.sbm-article__content hr { border: none; border-top: 1px solid var(--sbm-border); margin: 1.8em 0; }

/* ==========================================================================
   ARTICLE FOOTER (tags + updated)
   ========================================================================== */
.sbm-article__footer {
    padding-top: 24px; border-top: 1px solid var(--sbm-border); margin-top: 36px;
}
.sbm-article__tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sbm-tags-label { font-size: 13px; color: var(--sbm-text-muted); font-weight: 600; flex-shrink: 0; }
.sbm-tag-pill {
    display: inline-block; padding: 3px 12px;
    background: #f3f4f6; color: var(--sbm-text-muted);
    border-radius: 20px; font-size: 12px; font-weight: 500;
    border: 1px solid var(--sbm-border);
    transition: background var(--sbm-transition), color var(--sbm-transition);
}
.sbm-tag-pill:hover { background: #eff6ff; color: var(--sbm-primary); border-color: #bfdbfe; }
.sbm-article__updated { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--sbm-text-light); margin: 6px 0 0; }

/* Back button */
.sbm-back-wrap { margin-top: 24px; }
.sbm-btn-back {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; background: var(--sbm-white); color: var(--sbm-text-muted);
    border: 1px solid var(--sbm-border); border-radius: var(--sbm-radius-sm);
    font-size: 14px; font-weight: 600; text-decoration: none;
    transition: all var(--sbm-transition);
}
.sbm-btn-back:hover { background: #f9fafb; color: var(--sbm-text-body); text-decoration: none; border-color: #d1d5db; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sbm-sidebar {
    position: sticky; top: 24px;
    display: flex; flex-direction: column; gap: 20px;
}
.sbm-widget {
    background: var(--sbm-white); border: 1px solid var(--sbm-border);
    border-radius: var(--sbm-radius); box-shadow: var(--sbm-shadow);
    padding: 22px 20px; overflow: hidden;
}
.sbm-widget__title {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; color: var(--sbm-text);
    margin: 0 0 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--sbm-border);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.sbm-widget__title svg { color: var(--sbm-text-muted); flex-shrink: 0; }

/* Category list */
.sbm-widget__cat-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.sbm-widget__cat-item { list-style: none !important; display: list-item !important; margin: 0 !important; }
.sbm-widget__cat-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: var(--sbm-radius-sm);
    text-decoration: none; color: var(--sbm-text-body);
    font-size: 14px; font-weight: 500;
    transition: all var(--sbm-transition);
    border: 1px solid transparent;
}
.sbm-widget__cat-link:hover { background: #f9fafb; color: var(--sbm-primary); text-decoration: none; }
.sbm-widget__cat-link--active { background: #eff6ff; color: var(--sbm-primary); border-color: #bfdbfe; font-weight: 700; }
.sbm-widget__cat-count {
    background: #f3f4f6; color: var(--sbm-text-muted);
    font-size: 11px; font-weight: 600; padding: 1px 7px;
    border-radius: 10px; min-width: 22px; text-align: center;
}

/* Scrollable category list — activates when > 10 categories */
.sbm-widget__cat-list--scroll {
    max-height: 320px;      /* shows exactly ~10 items */
    overflow-y: auto;
    overflow-x: hidden;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    /* Add right padding so scrollbar doesn't overlap text */
    padding-right: 4px !important;
    margin-right: -4px;
}
.sbm-widget__cat-list--scroll::-webkit-scrollbar {
    width: 5px;
}
.sbm-widget__cat-list--scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sbm-widget__cat-list--scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.sbm-widget__cat-list--scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Count badge on widget title when scroll is active */
.sbm-widget__scroll-hint {
    margin-left: auto;
    background: #e0e7ff;
    color: var(--sbm-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: 0;
    text-transform: none;
}

/* Recent posts */
.sbm-widget__recent-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.sbm-widget__recent-item { list-style: none !important; display: list-item !important; margin-bottom: 2px !important; }
.sbm-widget__recent-link {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px; border-radius: var(--sbm-radius-sm);
    text-decoration: none;
    transition: background var(--sbm-transition);
    border: 1px solid transparent;
}
.sbm-widget__recent-link:hover { background: #f9fafb; text-decoration: none; }
.sbm-widget__recent-thumb {
    flex-shrink: 0; width: 68px; height: 52px;
    border-radius: var(--sbm-radius-sm); overflow: hidden;
    background: #f3f4f6; border: 1px solid var(--sbm-border);
}
.sbm-widget__recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbm-widget__recent-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.sbm-widget__recent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sbm-widget__recent-title {
    display: block; font-size: 13px; font-weight: 600; line-height: 1.4;
    color: var(--sbm-text-body);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color var(--sbm-transition);
}
.sbm-widget__recent-link:hover .sbm-widget__recent-title { color: var(--sbm-primary); }
.sbm-widget__recent-date { font-size: 11px; color: var(--sbm-text-light); font-weight: 500; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Large laptop: ≤ 1200px */
@media (max-width: 1200px) {
    .sbm-single-layout { grid-template-columns: 1fr 270px; gap: 22px; }
    .sbm-article { padding: 28px 30px; }
}

/* Tablet: ≤ 992px — sidebar goes below */
@media (max-width: 992px) {
    .sbm-single-layout { grid-template-columns: 1fr; gap: 24px; }
    .sbm-sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
    .sbm-widget { flex: 1; min-width: 240px; }
    .sbm-single-wrap { padding: 24px 16px 56px; }
    .sbm-article { padding: 24px 24px; }
    .sbm-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet small: ≤ 768px */
@media (max-width: 768px) {
    .sbm-article { padding: 20px 18px; }
    .sbm-article__title { font-size: clamp(20px, 5vw, 28px); }
    .sbm-article__content { font-size: 15px; line-height: 1.75; }
    .sbm-article__content h2 { font-size: 1.35em !important; }
    .sbm-article__content h3 { font-size: 1.18em !important; }
    .sbm-breadcrumb__item--current { max-width: 160px; }
    .sbm-filter-form { padding: 12px 14px; }
}

/* Mobile: ≤ 540px */
@media (max-width: 540px) {
    .sbm-single-wrap { padding: 14px 12px 48px; }
    .sbm-article { padding: 18px 16px; }
    .sbm-article__meta { gap: 10px; }
    .sbm-article__content { font-size: 15px; }
    .sbm-article__content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sbm-sidebar { flex-direction: column; }
    .sbm-widget { min-width: 0; }
    .sbm-filter__search, .sbm-filter__cat { min-width: 100%; }
    .sbm-filter__actions { width: 100%; }
    .sbm-filter__btn { flex: 1; justify-content: center; }
    .sbm-card__body { padding: 12px 14px 14px; }
    .sbm-card__title { font-size: 14px; }
    .sbm-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.screen-reader-text, .sbm-sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
.sbm-card__img-wrap:focus-visible,
.sbm-card__title a:focus-visible,
.sbm-page-btn:focus-visible,
.sbm-filter__btn:focus-visible,
.sbm-btn-back:focus-visible,
.sbm-widget__cat-link:focus-visible,
.sbm-widget__recent-link:focus-visible {
    outline: 2px solid var(--sbm-primary); outline-offset: 2px;
}

/* Spinner */
.sbm-spinner-icon {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid #e5e7eb; border-top-color: var(--sbm-primary);
    border-radius: 50%; animation: sbm-spin 0.6s linear infinite;
}
@keyframes sbm-spin { to { transform: rotate(360deg); } }
