/* ==========================================================================
   SibMac Articles, Banner Slider & Styled Homepage Sections (v3.13.0)
   WCAG AA verified for both Light and Dark (dark_mod / data-theme="dark")
   ========================================================================== */

:root {
    --sma-surface: #f4f6fa;
    --sma-surface-hover: #edf1f7;
    --sma-elevated: #ffffff;
    --sma-ink: #0f172a;
    --sma-body: #1e293b;
    --sma-muted: #5c687a;
    --sma-border: rgba(15, 23, 42, .08);
    --sma-border-strong: rgba(15, 23, 42, .14);
    --sma-brand: #1a66d2;
    --sma-brand-hover: #1554ad;
    --sma-pill-bg: #e2edff;
    --sma-pill-ink: #1a66d2;
    --sma-star: #f59e0b;
    --sma-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    --sma-shadow-hover: 0 12px 28px rgba(15, 23, 42, .1);
    --sma-radius: 20px;
}

html.dark_mod,
body.dark_mod,
html[data-theme="dark"],
html[data-color-mode="dark"],
body.dark-mode,
body.dark {
    --sma-surface: #181c23;
    --sma-surface-hover: #242b36;
    --sma-elevated: #1e2430;
    --sma-ink: #f1f5f9;
    --sma-body: #cbd5e1;
    --sma-muted: #94a3b8;
    --sma-border: rgba(255, 255, 255, .08);
    --sma-border-strong: rgba(255, 255, 255, .15);
    --sma-brand: #3b82f6;
    --sma-brand-hover: #2563eb;
    --sma-pill-bg: rgba(59, 130, 246, .18);
    --sma-pill-ink: #8cc0ff;
    --sma-shadow: 0 4px 16px rgba(0, 0, 0, .28);
    --sma-shadow-hover: 0 14px 32px rgba(0, 0, 0, .42);
}

/* ── Shared Utilities ── */
.sma-rating-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
    color: var(--sma-muted);
    white-space: nowrap;
}
.sma-star-svg {
    width: 14px;
    height: 14px;
    fill: var(--sma-star);
    flex: none;
}
.sma-dot {
    opacity: .55;
    margin-inline: 2px;
}
.sma-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.sma-meta-item svg {
    width: 15px;
    height: 15px;
    opacity: .78;
    flex: none;
}

/* Button-only hover "دانلود" pill — no arrow icon */
.sma-dl-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 68px;
    width: 68px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 0;
    background: var(--sma-pill-bg);
    color: var(--sma-pill-ink) !important;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}
.sma-dl-pill--sm {
    flex-basis: 60px;
    width: 60px;
    height: 30px;
    font-size: 12px;
}
.sma-dl-pill:hover,
.sma-dl-pill:focus-visible {
    background: #1a66d2;
    color: #ffffff !important;
    outline: none;
}
html.dark_mod .sma-dl-pill:hover,
body.dark_mod .sma-dl-pill:hover,
html[data-theme="dark"] .sma-dl-pill:hover,
body.dark-mode .sma-dl-pill:hover,
html.dark_mod .sma-dl-pill:focus-visible,
body.dark_mod .sma-dl-pill:focus-visible {
    background: #2563eb;
    color: #ffffff !important;
}

/* ==========================================================================
   1. Editorial Article Cards (Homepage, Archive & Related)
   ========================================================================== */
.sma-grid,
.sibmac-articles__grid.sma-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.sma-card {
    min-width: 0;
    height: 100%;
    border-radius: var(--sma-radius);
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    box-shadow: var(--sma-shadow);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}
.sma-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none !important;
}
.sma-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}
.sma-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.sma-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, .65);
}
.sma-card__placeholder svg {
    width: 44px;
    height: 44px;
}
.sma-card__tags {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}
.sma-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #0f172a;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
}
.sma-card__readtime {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .68);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}
.sma-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 16px 18px 16px;
}
.sma-card__byline {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--sma-muted);
}
.sma-card__avatar {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #1a66d2);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}
.sma-card__author {
    font-weight: 600;
    color: var(--sma-ink);
}
.sma-card__title {
    margin: 0;
    color: var(--sma-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s ease;
}
.sma-card__excerpt {
    margin: 0;
    color: var(--sma-muted);
    font-size: 13.5px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sma-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--sma-border);
    color: var(--sma-muted);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
}
.sma-card__date {
    margin-inline-start: auto;
    white-space: nowrap;
    opacity: .88;
}

@media (hover: hover) and (pointer: fine) {
    .sma-card:hover {
        transform: translateY(-3px);
        background: var(--sma-surface-hover);
        border-color: color-mix(in srgb, var(--sma-brand) 34%, var(--sma-border));
        box-shadow: var(--sma-shadow-hover);
    }
    .sma-card:hover .sma-card__img {
        transform: scale(1.04);
    }
    .sma-card:hover .sma-card__title {
        color: var(--sma-brand);
    }
}

/* ==========================================================================
   2. Articles Archive Page (/articles/)
   ========================================================================== */
.sma-page {
    padding: 24px 0 64px;
    color: var(--sma-ink);
}
.sma-container {
    width: min(1240px, 100% - 32px);
    margin-inline: auto;
}
.sma-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--sma-muted);
}
.sma-crumb a {
    color: var(--sma-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.sma-crumb a:hover {
    color: var(--sma-brand);
}

.sma-archive-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.sma-archive-hero__copy {
    flex: 1 1 420px;
    min-width: 0;
}
.sma-archive-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 800;
    line-height: 1.35;
    color: var(--sma-ink);
}
.sma-archive-desc {
    margin: 0;
    color: var(--sma-muted);
    font-size: 14.5px;
    line-height: 1.85;
    max-width: 680px;
}

.sma-search-form {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 380px;
    width: 100%;
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--sma-border-strong);
    background: var(--sma-surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.sma-search-form:focus-within {
    border-color: var(--sma-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sma-brand) 16%, transparent);
}
.sma-search-form__icon {
    display: inline-flex;
    padding-inline: 10px 4px;
    color: var(--sma-muted);
}
.sma-search-form__icon svg {
    width: 18px;
    height: 18px;
}
.sma-search-form__input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--sma-ink) !important;
    font-size: 13.5px;
    padding: 8px 6px;
    outline: none !important;
    box-shadow: none !important;
}
.sma-search-form__clear {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: var(--sma-muted);
    text-decoration: none;
    font-size: 18px;
}
.sma-search-form__submit {
    border: 0;
    border-radius: 10px;
    background: var(--sma-brand);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color .18s ease;
}
.sma-search-form__submit:hover {
    background: var(--sma-brand-hover);
}

.sma-topic-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.sma-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    color: var(--sma-ink) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.sma-chip:hover {
    background: var(--sma-surface-hover);
    border-color: var(--sma-border-strong);
}
.sma-chip.is-active {
    background: var(--sma-brand);
    border-color: var(--sma-brand);
    color: #ffffff !important;
}
.sma-chip__count {
    font-size: 11.5px;
    opacity: .75;
}

.sma-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--sma-border);
    margin-bottom: 24px;
}
.sma-sort-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sma-sort-tabs::-webkit-scrollbar {
    display: none;
}
.sma-sort-tab {
    position: relative;
    padding: 10px 2px 12px;
    color: var(--sma-muted) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color .18s ease;
}
.sma-sort-tab:hover {
    color: var(--sma-ink) !important;
}
.sma-sort-tab.is-active {
    color: var(--sma-brand) !important;
    font-weight: 700;
}
.sma-sort-tab.is-active::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--sma-brand);
}
.sma-result-count {
    font-size: 13px;
    color: var(--sma-muted);
    white-space: nowrap;
}

/* Featured Lead Story */
.sma-featured {
    margin-bottom: 26px;
    border-radius: 24px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    box-shadow: var(--sma-shadow);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.sma-featured:hover {
    transform: translateY(-2px);
    box-shadow: var(--sma-shadow-hover);
    border-color: color-mix(in srgb, var(--sma-brand) 34%, var(--sma-border));
}
.sma-featured__link {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
    color: inherit;
    text-decoration: none !important;
}
.sma-featured__media {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}
.sma-featured__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.sma-featured:hover .sma-featured__media img {
    transform: scale(1.03);
}
.sma-featured__pill {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--sma-brand);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(26, 102, 210, .35);
}
.sma-featured__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 26px 30px;
}
.sma-featured__top-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sma-topic-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--sma-pill-bg);
    color: var(--sma-pill-ink) !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}
.sma-muted-inline {
    font-size: 12.5px;
    color: var(--sma-muted);
}
.sma-featured__title {
    margin: 0;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 800;
    line-height: 1.45;
    color: var(--sma-ink);
}
.sma-featured__excerpt {
    margin: 0;
    color: var(--sma-muted);
    font-size: 14.5px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sma-featured__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--sma-border);
}
.sma-featured__stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--sma-muted);
}
.sma-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--sma-brand);
    font-size: 13.5px;
    font-weight: 700;
}
.sma-featured__cta svg {
    width: 16px;
    height: 16px;
}

/* Pagination & Empty state */
.sma-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}
.sma-pagination ul.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.sma-pagination .page-numbers a,
.sma-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    color: var(--sma-ink);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}
.sma-pagination .page-numbers .current {
    background: var(--sma-brand);
    border-color: var(--sma-brand);
    color: #ffffff;
}
.sma-empty {
    text-align: center;
    padding: 48px 24px;
    border-radius: 20px;
    border: 1px dashed var(--sma-border-strong);
    background: var(--sma-surface);
}
.sma-empty h2 {
    margin: 0 0 8px;
    font-size: 19px;
}
.sma-empty p {
    margin: 0 0 18px;
    color: var(--sma-muted);
    font-size: 14px;
}
.sma-empty__btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--sma-brand);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none !important;
}

/* ==========================================================================
   3. Single Editorial Article Page (/articles/{slug}/)
   ========================================================================== */
.sma-progress {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: 3px;
    z-index: 9990;
    background: transparent;
    pointer-events: none;
}
.sma-progress__bar {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #1a66d2, #38bdf8);
    transition: width .08s linear;
}

.sma-single-hero {
    max-width: 880px;
    margin-bottom: 22px;
}
.sma-single-cats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.sma-single-title {
    margin: 0 0 12px;
    font-size: clamp(24px, 2.8vw, 35px);
    font-weight: 800;
    line-height: 1.4;
    color: var(--sma-ink);
}
.sma-single-lead {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.85;
    color: var(--sma-muted);
}
.sma-single-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
}
.sma-single-meta__items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--sma-muted);
}
.sma-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.sma-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--sma-border-strong);
    background: var(--sma-elevated);
    color: var(--sma-ink);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease;
}
.sma-share-btn svg {
    width: 15px;
    height: 15px;
}
.sma-share-btn:hover {
    border-color: var(--sma-brand);
    color: var(--sma-brand);
}

.sma-single-cover {
    margin: 0 0 28px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    aspect-ratio: 16 / 9;
    max-height: 500px;
}
.sma-single-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sma-reading-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: start;
}
.sma-article-main {
    min-width: 0;
}

/* Mobile Collapsible TOC */
.sma-toc-mobile {
    display: none;
    margin-bottom: 22px;
    border-radius: 16px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    padding: 12px 16px;
}
.sma-toc-mobile__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--sma-ink);
    cursor: pointer;
    list-style: none;
}
.sma-toc-mobile__summary::-webkit-details-marker {
    display: none;
}
.sma-toc-mobile__summary svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}
.sma-toc-mobile[open] .sma-toc-mobile__summary svg {
    transform: rotate(180deg);
}
.sma-toc-mobile .sma-toc-list {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--sma-border);
}

/* Editorial Prose */
.sma-prose {
    font-size: 16px;
    line-height: 2;
    color: var(--sma-body);
}
.sma-prose h2 {
    margin: 34px 0 14px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--sma-ink);
    scroll-margin-top: 86px;
}
.sma-prose h3 {
    margin: 26px 0 10px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--sma-ink);
    scroll-margin-top: 86px;
}
.sma-prose p {
    margin: 0 0 18px;
}
.sma-prose ul,
.sma-prose ol {
    margin: 0 0 18px;
    padding-inline-start: 24px;
}
.sma-prose li {
    margin-bottom: 8px;
}
.sma-prose a {
    color: var(--sma-brand);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.sma-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--sma-border);
    margin: 14px 0;
}
.sma-prose blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    border-inline-start: 4px solid var(--sma-brand);
    border-radius: 14px;
    background: var(--sma-surface);
    color: var(--sma-ink);
}
.sma-prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .88em;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--sma-surface);
    border: 1px solid var(--sma-border);
    direction: ltr;
    unicode-bidi: isolate;
}
.sma-prose pre {
    position: relative;
    margin: 20px 0;
    padding: 16px 18px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.7;
}
.sma-prose pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

/* Callouts */
.sma-callout {
    margin: 22px 0;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--sma-border);
    border-inline-start: 4px solid var(--sma-brand);
    background: var(--sma-surface);
}
.sma-callout--warn {
    border-inline-start-color: #d97706;
    background: color-mix(in srgb, #f59e0b 8%, var(--sma-surface));
}
.sma-callout--tip {
    border-inline-start-color: #059669;
    background: color-mix(in srgb, #10b981 8%, var(--sma-surface));
}
.sma-callout__title {
    display: block;
    margin-bottom: 6px;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--sma-ink);
}
.sma-callout__body p:last-child {
    margin-bottom: 0;
}

/* macOS Terminal Block */
.sma-code-block {
    margin: 22px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0d1320;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .18);
}
.sma-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .05);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sma-code-head__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sma-dots {
    display: inline-flex;
    gap: 6px;
}
.sma-dots i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.sma-dots i:nth-child(1) { background: #ff5f56; }
.sma-dots i:nth-child(2) { background: #ffbd2e; }
.sma-dots i:nth-child(3) { background: #27c93f; }
.sma-code-title {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sma-copy-btn {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: background-color .15s ease;
}
.sma-copy-btn:hover {
    background: rgba(255, 255, 255, .18);
}
.sma-code-pre {
    margin: 0 !important;
    padding: 16px 18px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #e2e8f0;
    font-size: 13.5px;
    line-height: 1.75;
    overflow-x: auto;
}

/* Inline App Mention */
.sma-app-mention {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    transition: border-color .18s ease, background-color .18s ease;
}
.sma-app-mention:hover {
    background: var(--sma-surface-hover);
    border-color: var(--sma-border-strong);
}
.sma-app-mention__main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none !important;
}
.sma-app-mention__icon {
    width: 52px;
    height: 52px;
    border-radius: 22%;
    object-fit: contain;
    flex: none;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .14));
    transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(var(--sibmac-icon-scale, 1));
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.sma-app-mention__icon--placeholder {
    display: grid;
    place-items: center;
    background: var(--sma-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.sma-app-mention__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.sma-app-mention__title {
    color: var(--sma-ink);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sma-app-mention__sub {
    color: var(--sma-muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sma-app-mention__meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--sma-muted);
}

/* Tags */
.sma-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 22px;
}
.sma-tag {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
    color: var(--sma-muted) !important;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
}
.sma-tag:hover {
    color: var(--sma-brand) !important;
    border-color: var(--sma-brand);
}

/* Rating Box */
.sma-rating-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding: 18px 22px;
    border-radius: 20px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
}
.sma-rating-box__copy strong {
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--sma-ink);
    margin-bottom: 4px;
}
.sma-rating-box__status {
    margin: 0;
    font-size: 13px;
    color: var(--sma-muted);
}
.sma-stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sma-star-btn {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 28px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    transition: transform .15s ease, color .15s ease;
}
html.dark_mod .sma-star-btn,
body.dark_mod .sma-star-btn,
html[data-theme="dark"] .sma-star-btn {
    color: #475569;
}
.sma-star-btn.is-active,
.sma-star-btn.is-hover {
    color: var(--sma-star);
}
.sma-star-btn:not(:disabled):hover {
    transform: scale(1.14);
}
.sma-rating-box.is-locked .sma-star-btn {
    cursor: default;
    opacity: .88;
}

/* Sidebar */
.sma-sidebar {
    position: sticky;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.sma-side-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface);
}
.sma-side-card__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    color: var(--sma-ink);
}
.sma-toc-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sma-toc-link {
    display: block;
    padding: 6px 10px;
    border-radius: 10px;
    border-inline-start: 2px solid transparent;
    color: var(--sma-muted) !important;
    font-size: 13px;
    line-height: 1.55;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.sma-toc-link--h3 {
    padding-inline-start: 22px;
    font-size: 12.5px;
}
.sma-toc-link:hover {
    color: var(--sma-ink) !important;
    background: var(--sma-surface-hover);
}
.sma-toc-link.is-active {
    color: var(--sma-brand) !important;
    font-weight: 700;
    border-inline-start-color: var(--sma-brand);
    background: color-mix(in srgb, var(--sma-brand) 10%, transparent);
}
.sma-side-apps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sma-side-app {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.sma-side-app__info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none !important;
}
.sma-side-app__info img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    flex: none;
}
.sma-side-app__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sma-side-app__text strong {
    font-size: 13.5px;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sma-side-app__text small {
    font-size: 11.5px;
    color: var(--sma-muted);
}
.sma-side-card__note {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--sma-muted);
}
.sma-side-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--sma-brand) !important;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none !important;
}
.sma-side-card__link svg {
    width: 15px;
    height: 15px;
}

/* Related Blocks */
.sma-related-apps-block,
.sma-related-section,
.sma-comments-wrap {
    margin-top: 34px;
}
.sma-related-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.sma-related-apps-grid .sma-app-mention {
    margin: 0;
}
.sma-related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.sma-block-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--sma-ink);
}
.sma-related-head .sma-block-title {
    margin: 0;
}
.sma-more-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--sma-brand) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}
.sma-more-link svg {
    width: 16px;
    height: 16px;
}

/* macOS Glass Toast */
.sma-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 9999;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 11px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(15, 23, 42, .12);
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}
.sma-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
html.dark_mod .sma-toast,
body.dark_mod .sma-toast,
html[data-theme="dark"] .sma-toast,
body.dark-mode .sma-toast {
    background: rgba(30, 36, 48, .94);
    border-color: rgba(255, 255, 255, .14);
    color: #f1f5f9;
}

/* ==========================================================================
   3b. Minimal "مشاهده همه" Link (matches Live Preview — no filled blue circle)
   ========================================================================== */
.sibmac-section__head .sibmac-section__more {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 10px;
    direction: rtl;
    color: var(--sma-brand) !important;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    transition: background-color .16s ease, color .16s ease;
}
.sibmac-section__head .sibmac-section__more:hover,
.sibmac-section__head .sibmac-section__more:focus-visible {
    background: var(--sma-brand-soft) !important;
    color: var(--sma-brand) !important;
    outline: none;
}
.sibmac-section__head .sibmac-section__more .sibmac-section__more-icon {
    width: 15px !important;
    height: 15px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: currentColor !important;
    overflow: visible !important;
    box-shadow: none !important;
}
.sibmac-section__head .sibmac-section__more .sibmac-section__more-icon svg {
    position: static !important;
    width: 15px !important;
    height: 15px !important;
    transform: none !important;
    stroke: currentColor !important;
}
.sibmac-section__head .sibmac-section__more:hover .sibmac-section__more-icon,
.sibmac-section__head .sibmac-section__more:focus-visible .sibmac-section__more-icon {
    background: transparent !important;
    transform: translateX(-2px);
}

/* ==========================================================================
   4. Top Spotlight Banner Carousel — 75/25 Horizontal Peek Track (.sibmac-banner-carousel)
   ========================================================================== */
.sibmac-banner-carousel {
    position: relative;
    margin: 22px 0 28px;
}
.sibmac-home-categories + .sibmac-section--banner-slider .sibmac-banner-carousel {
    margin-top: 0;
}
.sibmac-section--banner-slider:has(+ .sibmac-home-categories) .sibmac-banner-carousel {
    margin-bottom: 16px;
}
.sibmac-banner-carousel__viewport {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}
.sibmac-banner-carousel__track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
    will-change: transform;
}
.sibmac-banner-slide {
    position: relative;
    flex: 0 0 calc(75% - 8px);
    width: calc(75% - 8px);
    height: clamp(280px, 26vw, 326px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px 40px 54px;
    box-sizing: border-box;
    border-radius: 24px;
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 14% 24%, rgba(56, 189, 248, .28), transparent 46%),
        radial-gradient(circle at 86% 85%, rgba(99, 102, 241, .3), transparent 52%),
        linear-gradient(125deg, var(--sm-slide-start, #0b1120), var(--sm-slide-end, #172554));
    background-size: cover;
    background-position: center;
}
.sibmac-banner-carousel--single .sibmac-banner-slide {
    flex: 0 0 100%;
    width: 100%;
}
.sibmac-banner-slide--pure-image {
    padding: 0;
    background: #0f172a;
}
.sibmac-banner-slide__full-link {
    display: block;
    width: 100%;
    height: 100%;
}
.sibmac-banner-slide__fullimg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.sibmac-banner-slide__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 64%;
    max-width: 560px;
    min-width: 0;
}
.sibmac-banner-slide__kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .76);
}
.sibmac-banner-slide__title {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(20px, 2.1vw, 27px);
    font-weight: 800;
    line-height: 1.42;
}
.sibmac-banner-slide__text {
    margin: 0;
    color: rgba(241, 245, 249, .86) !important;
    font-size: 14px;
    line-height: 1.75;
    max-width: 470px;
}
.sibmac-banner-slide__foot {
    display: flex;
    align-items: center;
    margin-top: 8px;
}
.sibmac-banner-slide__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.sibmac-banner-slide__btn--pill {
    border-radius: 14px;
}
.sibmac-banner-slide__btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .24);
}
.sibmac-banner-slide__art {
    position: relative;
    z-index: 2;
    flex: 0 0 34%;
    max-width: 300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sibmac-banner-slide__art img {
    display: block;
    max-width: 100%;
    max-height: 230px;
    width: auto;
    height: auto;
    border-radius: 18px;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .32));
}
.sibmac-banner-slide__mosaic {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 82px);
    gap: 14px;
    transform: rotate(-3deg);
}
.sibmac-banner-slide__mosaic-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    padding: 12px;
    box-sizing: border-box;
    border-radius: 22px;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}
.sibmac-banner-slide__mosaic-item img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 13px;
    object-fit: contain;
}

/* Crisp 44px white circular ← / → arrows pinned bottom-left over peeking next slide */
.sibmac-banner-carousel__arrows {
    position: absolute;
    bottom: 18px;
    inset-inline-end: 18px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.sibmac-banner-carousel__arrow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    line-height: 0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .22) !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.sibmac-banner-carousel__arrow:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    transform: scale(1.07);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .28) !important;
}
.sibmac-banner-carousel__arrow:focus-visible {
    outline: 2px solid var(--sma-brand);
    outline-offset: 2px;
}
.sibmac-banner-carousel__arrow svg {
    display: block !important;
    flex: none !important;
    width: 20px !important;
    height: 20px !important;
    color: #0f172a !important;
    stroke: #0f172a !important;
    fill: none !important;
    overflow: visible;
}

/* ==========================================================================
   5. Styled Homepage App Sections (App Store, Games, Extensions, macOS & List)
   ========================================================================== */
.sibmac-section__head {
    margin: 0 0 14px !important;
}
.sibmac-section__title {
    font-size: clamp(19px, 1.7vw, 22px) !important;
    font-weight: 800 !important;
    letter-spacing: -.015em;
}
.sibmac-styled-wrap {
    position: relative;
}

/* Paginated slider layout — 16px horizontal shadow padding prevents edge-card hover shadows from clipping */
.sibmac-styled-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    gap: 24px !important;
    padding: 14px 0 32px;
    margin: -12px -16px -26px;
}
.sibmac-styled-track::-webkit-scrollbar {
    display: none;
}
.sibmac-styled-page {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    padding-inline: 16px;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.sibmac-styled-page--grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.sibmac-styled-page--list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 4px;
}
/* Inline header actions: "مشاهده همه" + circular prev/next slider controls (matches Single & Archive) */
.sibmac-section__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
.sibmac-styled-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
}
.sibmac-styled-nav[hidden] {
    display: none !important;
}
.sibmac-styled-nav .sibmac-styled-arrow {
    position: static !important;
    top: auto !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--sma-border) !important;
    border-radius: 999px !important;
    background: var(--sma-surface) !important;
    color: var(--sma-ink) !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
.sibmac-styled-nav .sibmac-styled-arrow svg {
    width: 16px;
    height: 16px;
}
.sibmac-styled-nav .sibmac-styled-arrow:disabled {
    opacity: .35 !important;
    cursor: default;
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-styled-nav .sibmac-styled-arrow:not(:disabled):hover {
        background: var(--sma-surface-hover) !important;
        border-color: color-mix(in srgb, var(--sma-brand) 32%, var(--sma-border)) !important;
        color: var(--sma-brand) !important;
        box-shadow: none !important;
    }
}
@media (max-width: 720px) {
    .sibmac-styled-nav {
        display: none !important;
    }
}
.sibmac-styled-wrap .sibmac-styled-arrow {
    top: 50%;
    z-index: 4;
    width: 40px;
    height: 40px;
    border: 1px solid var(--sma-border);
    background: var(--sma-surface-solid);
    color: var(--sma-ink);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .14);
    transform: translateY(-50%);
}
/* Desktop uses arrows only (no redundant bottom dots); mobile swipe keeps subtle dots */
@media (min-width: 721px) {
    .sibmac-styled-dots {
        display: none !important;
    }
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-styled-wrap:not(:hover):not(:focus-within) .sibmac-styled-arrow,
    .sibmac-styled-wrap:not(:hover):not(:focus-within) .sibmac-styled-arrow:disabled {
        opacity: 0 !important;
        pointer-events: none !important;
    }
    .sibmac-styled-wrap:is(:hover, :focus-within) .sibmac-styled-arrow {
        opacity: 1 !important;
        pointer-events: auto;
    }
    .sibmac-styled-wrap:is(:hover, :focus-within) .sibmac-styled-arrow:disabled {
        opacity: .3 !important;
        pointer-events: none;
    }
}
@media (max-width: 720px) {
    .sibmac-styled-wrap .sibmac-styled-arrow {
        display: none !important;
    }
}
.sibmac-styled-dots {
    margin-top: 12px;
}

/* ── App Store Centered 4-Column Tile (sleek, borderless-at-rest surface matching reference) ── */
.sibmac-appstore-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.sibmac-appstore-tile {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: flex-start;
    text-align: center !important;
    padding: 18px 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: var(--sma-surface);
    box-shadow: none;
    color: inherit !important;
    text-decoration: none !important;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    transition: transform .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.sibmac-appstore-tile__glow {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 170px;
    pointer-events: none;
    z-index: 0;
    opacity: .14;
    -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 0%, rgba(0, 0, 0, .45) 36%, transparent 70%);
    mask-image: radial-gradient(circle at 50% 48%, #000 0%, rgba(0, 0, 0, .45) 36%, transparent 70%);
    transition: opacity .24s ease, transform .24s ease;
}
html.dark_mod .sibmac-appstore-tile__glow,
body.dark_mod .sibmac-appstore-tile__glow,
html[data-theme="dark"] .sibmac-appstore-tile__glow,
body.dark-mode .sibmac-appstore-tile__glow {
    opacity: .2;
}
.sibmac-appstore-tile__glow img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(28px) saturate(1.55);
}
.sibmac-appstore-tile__badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
}
.sibmac-appstore-tile__badge--new {
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #dff5e7;
    color: #137333;
}
html.dark_mod .sibmac-appstore-tile__badge--new,
body.dark_mod .sibmac-appstore-tile__badge--new,
html[data-theme="dark"] .sibmac-appstore-tile__badge--new,
body.dark-mode .sibmac-appstore-tile__badge--new {
    background: rgba(16, 185, 129, .2);
    color: #6ee7b7;
}
.sibmac-appstore-tile__badge--upd {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: var(--sma-muted);
    transition: background-color .18s ease, color .18s ease;
}
html.dark_mod .sibmac-appstore-tile__badge--upd,
body.dark_mod .sibmac-appstore-tile__badge--upd,
html[data-theme="dark"] .sibmac-appstore-tile__badge--upd,
body.dark-mode .sibmac-appstore-tile__badge--upd {
    background: rgba(255, 255, 255, .08);
}
.sibmac-appstore-tile__badge--upd svg {
    width: 13px;
    height: 13px;
}
/* حجم فایل — گوشهٔ مقابل بج، فقط هنگام هاور (در لمس همیشه کم‌رنگ دیده می‌شود) */
.sibmac-appstore-tile__size {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .07);
    color: var(--sma-muted);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px) scale(.94);
    transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1), background-color .18s ease, color .18s ease;
}
html.dark_mod .sibmac-appstore-tile__size,
body.dark_mod .sibmac-appstore-tile__size,
html[data-theme="dark"] .sibmac-appstore-tile__size,
body.dark-mode .sibmac-appstore-tile__size {
    background: rgba(255, 255, 255, .1);
}
.sibmac-appstore-tile:focus-visible .sibmac-appstore-tile__size {
    opacity: 1;
    transform: none;
}
/* موبایل/لمسی: حجم اصلاً نمایش داده نمی‌شود */
@media (max-width: 767px), (hover: none), (pointer: coarse) {
    .sibmac-appstore-tile__size { display: none !important; }
}
/* بج (جدید/بروزرسانی) همیشه گوشهٔ چپ، حجم (هاور) همیشه گوشهٔ راست — با مقادیر فیزیکی،
   چون inset-inline-* در RTL به right/left نگاشت می‌شود و همدیگر را خنثی می‌کردند (بج وسط کارت می‌افتاد). */
.sibmac-appstore-tile__badge { inset-inline-start: auto !important; inset-inline-end: auto !important; right: auto !important; left: 12px !important; }
.sibmac-appstore-tile__size { inset-inline-start: auto !important; inset-inline-end: auto !important; left: auto !important; right: 12px !important; max-width: calc(100% - 56px); overflow: hidden; text-overflow: ellipsis; }
.sibmac-appstore-tile__icon-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}
.sibmac-appstore-tile__icon {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 22%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, .14));
    transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(var(--sibmac-icon-scale, 1));
    transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.sibmac-appstore-tile__title {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.38;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center !important;
    transition: color .16s ease;
}
.sibmac-appstore-tile__ver {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--sma-muted);
    opacity: .85;
    text-align: center !important;
}
.sibmac-appstore-tile__sub {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 3px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--sma-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center !important;
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-appstore-tile:hover {
        transform: translateY(-2px);
        background: var(--sma-surface-hover);
        border-color: color-mix(in srgb, var(--sma-brand) 22%, var(--sma-border));
        box-shadow: var(--sma-shadow-hover);
    }
    .sibmac-appstore-tile:hover .sibmac-appstore-tile__glow {
        opacity: .24;
        transform: translateX(-50%) scale(1.06);
    }
    html.dark_mod .sibmac-appstore-tile:hover .sibmac-appstore-tile__glow,
    body.dark_mod .sibmac-appstore-tile:hover .sibmac-appstore-tile__glow,
    html[data-theme="dark"] .sibmac-appstore-tile:hover .sibmac-appstore-tile__glow {
        opacity: .3;
    }
    .sibmac-appstore-tile:hover .sibmac-appstore-tile__icon {
        transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(calc(var(--sibmac-icon-scale, 1) * 1.07));
    }
    .sibmac-appstore-tile:hover .sibmac-appstore-tile__title {
        color: var(--sma-brand);
    }
    .sibmac-appstore-tile:hover .sibmac-appstore-tile__badge--upd {
        background: var(--sma-pill-bg);
        color: var(--sma-pill-ink);
    }
    .sibmac-appstore-tile:hover .sibmac-appstore-tile__size {
        opacity: 1;
        transform: none;
    }
}

/* ── 3-Column Compact List (پربازدیدترین‌ها — تضاد ریتم اپ‌استور) ── */
.sibmac-compact-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 4px;
}
.sibmac-compact-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 18px;
    border-bottom: 0;
    background: transparent;
    transition: background-color .18s ease;
}
.sibmac-compact-row::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline: 12px;
    height: 1px;
    background: var(--sma-border);
    pointer-events: none;
    transition: opacity .18s ease;
}
@media (min-width: 1101px) {
    .sibmac-compact-list > .sibmac-compact-row:nth-last-child(-n+3)::after,
    .sibmac-styled-page--list > .sibmac-compact-row:nth-last-child(-n+3)::after {
        opacity: 0;
    }
}
@media (max-width: 1100px) and (min-width: 721px) {
    .sibmac-compact-list > .sibmac-compact-row:nth-last-child(-n+2)::after,
    .sibmac-styled-page--list > .sibmac-compact-row:nth-last-child(-n+2)::after {
        opacity: 0;
    }
}
@media (max-width: 720px) {
    .sibmac-compact-list > .sibmac-compact-row:last-child::after,
    .sibmac-styled-page--list > .sibmac-compact-row:last-child::after {
        opacity: 0;
    }
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-compact-row:hover {
        background: var(--sma-surface);
    }
    .sibmac-compact-row:hover::after {
        opacity: 0;
    }
}
.sibmac-compact-row__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
    color: inherit !important;
    text-decoration: none !important;
}
.sibmac-compact-row__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex: 0 0 20px;
    font-size: 13px;
    font-weight: 800;
    color: var(--sma-muted);
    opacity: .72;
    font-variant-numeric: tabular-nums;
}
.sibmac-compact-row__icon-wrap {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sibmac-compact-row__icon {
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 22%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .14));
    transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(var(--sibmac-icon-scale, 1));
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.sibmac-compact-row__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sibmac-compact-row__title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sibmac-compact-row__sub,
.sibmac-compact-row__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--sma-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sibmac-compact-row__sub {
    display: block;
}

/* ── 4-Column Games Showcase (.sibmac-game-grid — 16:9 cover + size pill) ── */
.sibmac-game-grid,
.sibmac-ext-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.sibmac-game-card,
.sibmac-ext-card {
    position: relative;
    display: flex !important;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid transparent;
    background: var(--sma-surface);
    color: inherit !important;
    text-decoration: none !important;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    transition: transform .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.sibmac-game-card__media,
.sibmac-ext-card__media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: rgba(15, 23, 42, .08);
}
.sibmac-game-card__media {
    aspect-ratio: 16 / 9;
}
.sibmac-ext-card__media {
    aspect-ratio: 16 / 8.5;
}
html.dark_mod .sibmac-game-card__media,
body.dark_mod .sibmac-game-card__media,
html.dark_mod .sibmac-ext-card__media,
body.dark_mod .sibmac-ext-card__media {
    background: rgba(255, 255, 255, .05);
}
.sibmac-game-card__img,
.sibmac-ext-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .34s cubic-bezier(.22, 1, .36, 1);
}
.sibmac-media-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
}
.sibmac-media-badge--new {
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
}
.sibmac-media-badge--upd {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .62);
    color: #ffffff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.sibmac-media-badge--upd svg {
    width: 13px;
    height: 13px;
}
.sibmac-game-card__size {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .68);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.sibmac-game-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px 14px;
    min-width: 0;
}
.sibmac-game-card__title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .16s ease;
}
.sibmac-game-card__sub {
    display: block;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--sma-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sibmac-ext-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px 13px;
    min-width: 0;
}
.sibmac-ext-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.sibmac-ext-card__title {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .16s ease;
}
.sibmac-ext-card__ver {
    flex: none;
    font-size: 11.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--sma-muted);
    opacity: .86;
}
.sibmac-ext-card__sub {
    display: block;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--sma-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-game-card:hover,
    .sibmac-ext-card:hover {
        transform: translateY(-2px);
        background: var(--sma-surface-hover);
        border-color: color-mix(in srgb, var(--sma-brand) 22%, var(--sma-border));
        box-shadow: var(--sma-shadow-hover);
    }
    .sibmac-game-card:hover .sibmac-game-card__img,
    .sibmac-ext-card:hover .sibmac-ext-card__img {
        transform: scale(1.045);
    }
    .sibmac-game-card:hover .sibmac-game-card__title,
    .sibmac-ext-card:hover .sibmac-ext-card__title {
        color: var(--sma-brand);
    }
}

/* ── 4-Column macOS Versions Cards (.sibmac-os-grid / .sibmac-os-card) ── */
.sibmac-os-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.sibmac-os-card {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    text-align: center !important;
    padding: 16px 14px 15px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: var(--sma-surface);
    box-shadow: none;
    color: inherit !important;
    text-decoration: none !important;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    transition: transform .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.sibmac-os-card__glow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 144px;
    height: 144px;
    pointer-events: none;
    z-index: 0;
    opacity: .14;
    -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
    mask-image: radial-gradient(circle, #000 0%, transparent 70%);
    transition: opacity .24s ease;
}
html.dark_mod .sibmac-os-card__glow,
body.dark_mod .sibmac-os-card__glow,
html[data-theme="dark"] .sibmac-os-card__glow {
    opacity: .2;
}
.sibmac-os-card__glow img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(24px) saturate(1.45);
}
.sibmac-os-card__icon-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
}
.sibmac-os-card__icon {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 22%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, .14));
    transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(var(--sibmac-icon-scale, 1));
    transition: transform .22s ease;
}
.sibmac-os-card__title {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 700;
    color: var(--sma-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center !important;
    transition: color .16s ease;
}
.sibmac-os-card__ver {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--sma-muted);
    text-align: center !important;
}
@media (hover: hover) and (pointer: fine) {
    .sibmac-os-card:hover {
        transform: translateY(-2px);
        background: var(--sma-surface-hover);
        border-color: color-mix(in srgb, var(--sma-brand) 22%, var(--sma-border));
        box-shadow: var(--sma-shadow-hover);
    }
    .sibmac-os-card:hover .sibmac-os-card__icon {
        transform: translate(var(--sibmac-icon-tx, 0%), var(--sibmac-icon-ty, 0%)) scale(calc(var(--sibmac-icon-scale, 1) * 1.07));
    }
    .sibmac-os-card:hover .sibmac-os-card__title {
        color: var(--sma-brand);
    }
    .sibmac-os-card:hover .sibmac-os-card__glow {
        opacity: .24;
    }
}

/* ==========================================================================
   6. Standalone Catalog Archive & Single Pages (/games/, /extensions/, /macos/)
   ========================================================================== */
.smc-archive-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0 22px;
}
.smc-archive-head__copy {
    flex: 1 1 360px;
    min-width: 0;
}
.smc-archive-head__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.smc-archive-head__title {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 800;
    color: var(--sma-ink);
    line-height: 1.3;
}
.smc-archive-head__count {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--sma-surface);
    color: var(--sma-muted);
    font-size: 12px;
    font-weight: 700;
}
.smc-archive-head__desc {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--sma-muted);
    max-width: 660px;
}
.smc-sort-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: var(--sma-surface);
}
.smc-sort-tab {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sma-muted) !important;
    text-decoration: none !important;
    transition: background-color .16s ease, color .16s ease;
}
.smc-sort-tab:hover {
    color: var(--sma-ink) !important;
}
.smc-sort-tab.is-active {
    background: var(--sma-surface-solid);
    color: var(--sma-brand) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
.smc-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0 16px;
    margin-bottom: 10px;
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent 100%);
}
.smc-filter-chips::-webkit-scrollbar {
    display: none;
}
.smc-filter-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--sma-surface);
    color: var(--sma-ink) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .16s ease, color .16s ease;
}
.smc-filter-chip:hover {
    background: var(--sma-surface-hover);
    color: var(--sma-brand) !important;
}
.smc-filter-chip.is-active {
    background: var(--sma-brand);
    color: #ffffff !important;
}
.smc-empty-state {
    padding: 48px 24px;
    border-radius: 20px;
    background: var(--sma-surface);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.smc-empty-state p {
    margin: 0;
    font-size: 15px;
    color: var(--sma-muted);
}

/* ── Single Catalog Page (/games/{slug}/, /extensions/{slug}/, /macos/{slug}/) ── */
.smc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
    margin-top: 14px;
}
.smc-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.smc-hero {
    border-radius: 22px;
    background: var(--sma-surface);
    overflow: hidden;
}
.smc-hero__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}
.smc-hero__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.smc-hero__size-pill {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.smc-hero__os-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px 12px;
    overflow: hidden;
    isolation: isolate;
}
.smc-hero__os-glow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 240px;
    opacity: .22;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
    mask-image: radial-gradient(circle, #000 0%, transparent 70%);
}
.smc-hero__os-glow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(34px) saturate(1.6);
}
.smc-hero__os-icon {
    position: relative;
    z-index: 1;
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 22px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(15, 23, 42, .18));
}
.smc-hero__body {
    padding: 20px 24px 24px;
}
.smc-hero--icon .smc-hero__body {
    text-align: center;
}
.smc-hero__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.smc-hero__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.smc-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sma-muted) !important;
    text-decoration: none !important;
}
.smc-stat__star {
    color: #f59e0b;
    font-size: 15px;
}
.smc-hero__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.smc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--sma-border);
    border-radius: 999px;
    background: var(--sma-surface-solid);
    color: var(--sma-ink) !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: border-color .16s ease, color .16s ease;
}
.smc-icon-btn:hover {
    border-color: var(--sma-brand);
    color: var(--sma-brand) !important;
}
.smc-hero__title {
    margin: 0;
    font-size: clamp(22px, 2.3vw, 28px);
    font-weight: 800;
    line-height: 1.35;
    color: var(--sma-ink);
}
.smc-hero__sub {
    margin: 8px 0 0;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--sma-muted);
}
.smc-card-box {
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--sma-surface);
}
.smc-box-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
    color: var(--sma-ink);
}
.smc-pretext {
    font-size: 14px;
    line-height: 1.85;
    color: var(--sma-ink);
}
.smc-pretext p:last-child {
    margin-bottom: 0;
}
.smc-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.smc-gallery__item {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgba(15, 23, 42, .08);
}
.smc-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}
.smc-gallery__item:hover img {
    transform: scale(1.04);
}
.smc-sidebar {
    position: sticky;
    top: 88px;
}
.smc-sidebar-card {
    padding: 20px;
    border-radius: 22px;
    background: var(--sma-surface);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.smc-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.smc-specs__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--sma-border);
    font-size: 13.5px;
}
.smc-specs__row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.smc-specs__label {
    color: var(--sma-muted);
    font-weight: 500;
    flex: none;
}
.smc-specs__val {
    color: var(--sma-ink);
    font-weight: 700;
    text-align: end;
    min-width: 0;
    overflow-wrap: anywhere;
}
.smc-specs__val a {
    color: var(--sma-brand) !important;
    text-decoration: none !important;
}
.smc-downloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.smc-dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 13px 18px;
    border-radius: 14px;
    background: var(--sma-brand);
    color: #ffffff !important;
    text-decoration: none !important;
    text-align: center;
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.smc-dl-btn:hover {
    background: var(--sma-brand-hover, #1558b8);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(26, 102, 210, .28);
}
.smc-dl-btn--secondary {
    background: var(--sma-pill-bg);
    color: var(--sma-pill-ink) !important;
}
.smc-dl-btn--secondary:hover {
    background: var(--sma-brand);
    color: #ffffff !important;
}
.smc-dl-btn__label {
    font-size: 14.5px;
    font-weight: 700;
}
.smc-dl-btn__meta {
    font-size: 12px;
    opacity: .86;
}
.smc-dl-empty {
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: var(--sma-surface-solid);
    color: var(--sma-muted);
    font-size: 13px;
    text-align: center;
}
.smc-related-section {
    margin-top: 38px;
}
.smc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, .88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.smc-lightbox[hidden] {
    display: none !important;
}
.smc-lightbox__img {
    max-width: min(94vw, 1180px);
    max-height: 86vh;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.smc-lightbox__close {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
@media (max-width: 960px) {
    .smc-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .smc-sidebar {
        position: static;
    }
}
@media (max-width: 720px) {
    .smc-hero__body,
    .smc-card-box {
        padding: 16px;
    }
    .smc-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
    .sibmac-appstore-grid,
    .sibmac-game-grid,
    .sibmac-ext-grid,
    .sibmac-os-grid,
    .sibmac-styled-page--grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sibmac-compact-list,
    .sibmac-styled-page--list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sma-grid,
    .sibmac-articles__grid.sma-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .sibmac-banner-slide {
        flex: 0 0 calc(84% - 8px);
        width: calc(84% - 8px);
        height: 268px;
        padding: 28px 28px;
    }
    .sibmac-banner-slide__mosaic {
        grid-template-columns: repeat(2, 66px);
        gap: 10px;
    }
    .sibmac-banner-slide__mosaic-item {
        width: 66px;
        height: 66px;
        padding: 9px;
        border-radius: 18px;
    }
    .sibmac-banner-slide__mosaic-item img {
        width: 46px;
        height: 46px;
    }
    .sma-reading-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .sma-sidebar {
        position: static;
    }
    .sma-toc-card {
        display: none !important;
    }
    .sma-toc-mobile:not([hidden]) {
        display: block;
    }
    .sma-featured__link {
        grid-template-columns: minmax(0, 1fr);
    }
    .sma-featured__media {
        min-height: 220px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 720px) {
    .sibmac-banner-carousel__viewport {
        border-radius: 20px;
    }
    .sibmac-banner-carousel__track {
        gap: 12px;
    }
    .sibmac-banner-slide {
        flex: 0 0 calc(88% - 6px);
        width: calc(88% - 6px);
        height: 236px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 22px 20px;
        border-radius: 20px;
    }
    .sibmac-banner-slide--pure-image {
        padding: 0;
    }
    .sibmac-banner-slide__art,
    .sibmac-banner-slide__mosaic {
        display: none;
    }
    .sibmac-banner-slide__btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    .sibmac-banner-carousel__arrows {
        bottom: 12px;
        inset-inline-end: 12px;
        gap: 8px;
    }
    .sibmac-banner-carousel__arrow {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    .sibmac-banner-carousel__arrow svg {
        width: 17px !important;
        height: 17px !important;
    }
    .sibmac-appstore-grid,
    .sibmac-game-grid,
    .sibmac-ext-grid,
    .sibmac-os-grid,
    .sibmac-styled-page--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .sibmac-appstore-tile,
    .sibmac-os-card {
        padding: 15px 11px 13px;
        border-radius: 16px;
    }
    .sibmac-game-card,
    .sibmac-ext-card {
        border-radius: 16px;
    }
    .sibmac-game-card__body,
    .sibmac-ext-card__body {
        padding: 10px 11px 12px;
    }
    .sibmac-appstore-tile__icon-wrap,
    .sibmac-appstore-tile__icon {
        width: 52px;
        height: 52px;
    }
    .sibmac-os-card__icon-wrap,
    .sibmac-os-card__icon {
        width: 48px;
        height: 48px;
    }
    .sma-grid,
    .sibmac-articles__grid.sma-grid,
    .sibmac-compact-list,
    .sibmac-styled-page--list,
    .sma-related-apps-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .sma-featured__body {
        padding: 20px;
    }
    .sma-rating-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sma-card,
    .sma-card__img,
    .sma-featured,
    .sma-featured__media img,
    .sma-progress__bar,
    .sibmac-banner-slide,
    .sibmac-appstore-tile,
    .sibmac-appstore-tile__icon,
    .sibmac-game-card,
    .sibmac-game-card__img,
    .sibmac-ext-card,
    .sibmac-ext-card__img,
    .sibmac-os-card,
    .sibmac-os-card__icon {
        transition: none !important;
        animation: none !important;
    }
}

/* آرشیو مقالات: نوار مرتب‌سازی در هدر (هم‌استایل بازی‌ها/macOS)، بدون کادر جستجو */
.sma-archive-hero { align-items: flex-end; gap: 18px; margin: 14px 0 22px; } /* هم‌ساختار با هدر بازی‌ها/macOS */
.sma-archive-hero__copy { flex: 1 1 360px; }
.sma-archive-hero > .smc-sort-bar { flex: none; }
.sma-archive-title { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; }
.sma-archive-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.75; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* تک‌خطی مثل کاتالوگ‌ها */
@media (max-width: 767px) { .sma-archive-desc { white-space: normal; } }
.sma-toolbar { justify-content: flex-end; }
.sma-toolbar:not(:has(.sma-sort-tabs)) .sma-result-count { margin-inline-start: 0; }
