.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— Clean blog header (no canvas / mouse bg) ——— */
.blog-head,
.article-head {
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
    padding: calc(var(--header-h) + 1.6rem) 0 1.75rem;
}
.blog-head-inner,
.article-head-inner {
    max-width: calc(var(--max) + 4rem);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.blog-head h1,
.article-head h1 {
    margin: 0.55rem 0 0.55rem;
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.45;
    color: var(--ink);
    max-width: none;
}
.blog-head-lead {
    margin: 0 0 1.15rem;
    color: var(--ink-muted);
    font-size: 0.98rem;
    line-height: 1.8;
    max-width: 36rem;
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin-bottom: 0.35rem;
}
.crumb a { color: var(--ink-muted); }
.crumb a:hover { color: var(--primary); }
.crumb-sep { opacity: 0.45; user-select: none; }
.crumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

.blog-search {
    display: flex;
    gap: 0.5rem;
    max-width: 520px;
    margin: 0 0 1rem;
}
.blog-search input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font: inherit;
}
.blog-search input:focus {
    outline: 2px solid rgba(30, 77, 107, 0.25);
    outline-offset: 1px;
}

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.blog-cats a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
}
.blog-cats a small { font-size: 0.72rem; opacity: 0.65; }
.blog-cats a.is-active,
.blog-cats a:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.65rem 0 0.15rem;
}
.article-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    color: var(--ink-muted);
    font-size: 0.86rem;
    margin-top: 0.85rem;
}
.stat-views {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: var(--primary-deep);
}
.stat-views svg { width: 15px; height: 15px; }

.blog-board { padding-top: 1.6rem; }
.related-board { background: #eef2f6; }

.ai-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 20px;
}
.ai-empty strong { display: block; margin-bottom: 0.4rem; font-size: 1.05rem; }

.ai-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

/* کارت مقاله — اندازهٔ استاندارد؛ جلوگیری از بزرگ شدن تیتر داخل .section */
.section .ai-card h2.ai-card-title,
.section .ai-card h3.ai-card-title {
    font-size: clamp(0.9375rem, 0.35vw + 0.875rem, 1.0625rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.5;
    margin: 0;
}

.blog-home .section-lead {
    font-size: clamp(0.875rem, 0.5vw + 0.82rem, 0.975rem);
    line-height: 1.65;
    margin-bottom: 1.35rem;
}
.blog-home .ai-grid {
    gap: clamp(0.85rem, 2vw, 1.15rem);
}
.blog-home .ai-card-media {
    aspect-ratio: 16 / 9;
}
.blog-home .ai-card-body {
    padding: 0.85rem 0.95rem 1rem;
}

.ai-card {
    position: relative;
    min-height: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(21, 32, 51, 0.08);
    box-shadow: 0 10px 28px rgba(12, 27, 44, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.ai-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(12, 27, 44, 0.1);
    border-color: rgba(30, 77, 107, 0.2);
}
.ai-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.ai-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(145deg, #10263a, #1e4d6b);
}
.ai-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.ai-card:hover .ai-card-media img { transform: scale(1.04); }
.ai-card-glow { display: none; }
.ai-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,0.86);
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
    text-transform: uppercase;
}
.ai-orb { display: none; }
.ai-card-body {
    padding: 1rem 1.05rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}
.ai-card-top { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 0.72rem;
    font-weight: 700;
}
.ai-chip.ghost {
    background: var(--bg-soft);
    color: var(--ink-muted);
}
.ai-chip svg { width: 12px; height: 12px; }
.ai-card-title {
    font-size: clamp(0.9375rem, 0.35vw + 0.875rem, 1.0625rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ai-card-excerpt {
    color: var(--ink-muted);
    font-size: clamp(0.8125rem, 0.25vw + 0.76rem, 0.875rem);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ai-card-foot {
    margin-top: auto;
    padding-top: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.75rem, 0.2vw + 0.7rem, 0.8125rem);
    color: var(--ink-muted);
}
.ai-card-cta {
    font-weight: 700;
    color: var(--primary);
}

.article-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3.5rem;
    position: relative;
    z-index: 1;
}
.article-cover {
    margin: 0 0 1.5rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(12, 27, 44, 0.1);
}
.article-cover img { width: 100%; display: block; }
.article-layout {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}
.article-share {
    position: sticky;
    top: calc(var(--header-h) + 18px);
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    padding-top: 0.2rem;
}
.article-share span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    margin-bottom: 0.25rem;
}
.article-share a,
.article-share .article-share-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
}
.article-share .article-share-btn {
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.article-share a:hover,
.article-share .article-share-btn:hover { background: var(--ink); color: #fff; }
.article-share .article-share-btn.is-copied {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.article-share-copy-status {
    font-size: 0.65rem;
    color: #0f766e;
    font-weight: 700;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.blog-board .pager,
.section .pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.8rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.pager-btns { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pager-current {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
}

@media (max-width: 980px) {
    .ai-grid,
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout { grid-template-columns: 1fr; }
    .article-share {
        position: static;
        grid-auto-flow: column;
        justify-content: start;
        margin-bottom: 1rem;
    }
    .article-share span { writing-mode: horizontal-tb; transform: none; }
    .article-share-copy-status { writing-mode: horizontal-tb; transform: none; }
}
@media (max-width: 700px) {
    .ai-grid,
    .blog-grid { grid-template-columns: 1fr; }
    .blog-home .ai-card-media { aspect-ratio: 2 / 1; max-height: 220px; }
    .blog-home .ai-card-media img { object-fit: cover; height: 100%; }
    .blog-search { flex-direction: column; }
    .blog-head h1,
    .article-head h1 { font-size: 1.4rem; }
}
