/* ============================================================
   AUX — صفحه‌ی فهرست وبلاگ
   ------------------------------------------------------------
   زبان بصری از خودِ محصول می‌آید: یراق‌آلات کابینت یک دنیای
   میلی‌متری است، پس عنصر ساختاری این صفحه یک «خط‌کش مدرج» است
   که سربرگ، نوار موضوع‌ها و پاورقی کارت‌ها را به هم می‌دوزد.
   پالت همان پالت لوگوست: مشکی 231F20، قرمز ED1C24، و یک خاکستری
   فلزی به‌جای سفید خام.

   کارتِ شاخص (تازه‌ترین مقاله) عمداً همان زبان کارت‌های صفحه‌ی
   اصلی را دارد — پس‌زمینه‌ی مشکی و درخشش قرمز — تا دو صفحه یک
   خانواده به نظر برسند. کارت‌های شبکه روشن و دقیق‌اند تا دوازده
   کارت مشکی پشت سر هم صفحه را سنگین نکنند.

   همه‌ی کلاس‌ها با auxb- شروع می‌شوند و با styles.css یا
   custom.css تداخل ندارند.
   ============================================================ */

.auxb {
    --auxb-ink: #231f20;
    --auxb-ink-soft: #565051;
    --auxb-muted: #8b8587;
    --auxb-paper: #f2f2f3;
    --auxb-line: #e4e4e6;
    --auxb-line-strong: #c7c7cb;
    --auxb-red: #ed1c24;
    --auxb-red-deep: #c2141b;

    background: linear-gradient(180deg, #fff 0, var(--auxb-paper) 260px, var(--auxb-paper) 100%);
    padding-bottom: 90px;
}

.auxb :focus-visible {
    outline: 2px solid var(--auxb-red);
    outline-offset: 3px;
}

/* ============================================================
   سربرگ — برگه‌ی شناسنامه‌ی وبلاگ
   ============================================================ */

.auxb-masthead {
    padding: 46px 0 0;
}

.auxb-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--auxb-red);
}

.auxb-eyebrow::before {
    content: "";
    width: 22px;
    height: 3px;
    background: var(--auxb-red);
}

.auxb-masthead__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.auxb-title {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(30px, 2rem + 1.4vw, 52px);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -.5px;
    color: var(--auxb-ink);
}

.auxb-lead {
    max-width: 62ch;
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 2.1;
    color: var(--auxb-ink-soft);
}

/* --- جست‌وجو --- */

.auxb-search {
    position: relative;
    flex: 0 1 340px;
    min-width: 260px;
}

.auxb-search__field {
    width: 100%;
    height: 52px;
    padding-inline: 20px 54px;
    border: 1px solid var(--auxb-line-strong);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: var(--auxb-ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auxb-search__field::placeholder {
    color: var(--auxb-muted);
}

.auxb-search__field:focus {
    border-color: var(--auxb-ink);
    box-shadow: 0 0 0 3px rgba(35, 31, 32, .07);
    outline: none;
}

.auxb-search__submit {
    position: absolute;
    inset-block: 6px;
    inset-inline-end: 6px;
    width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: var(--auxb-ink);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease;
}

.auxb-search__submit:hover {
    background: var(--auxb-red);
}

.auxb-search__submit svg {
    width: 17px;
    height: 17px;
}

/* --- خط‌کش مدرج: عنصر ساختاری صفحه --- */

.auxb-scale {
    height: 13px;
    margin-top: 30px;
    border-bottom: 1px solid var(--auxb-line-strong);
    background-image:
        repeating-linear-gradient(to right, var(--auxb-line-strong) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(to right, var(--auxb-ink) 0 1px, transparent 1px 45px);
    background-repeat: no-repeat;
    background-size: 100% 5px, 100% 12px;
    background-position: bottom right;
    opacity: .75;
}

/* --- سطر مشخصات، درست زیر خط‌کش --- */

.auxb-spec {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--auxb-muted);
}

.auxb-spec li {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.auxb-spec li + li {
    padding-inline-start: 22px;
    border-inline-start: 1px solid var(--auxb-line-strong);
}

.auxb-spec b {
    font-size: 15px;
    font-weight: 800;
    color: var(--auxb-ink);
}

/* ============================================================
   کارت شاخص — تازه‌ترین مقاله
   ============================================================ */

.auxb-lead-card {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    margin-top: 44px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--auxb-ink);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 20px 50px rgba(35, 31, 32, .16);
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}

.auxb-lead-card:hover,
.auxb-lead-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(35, 31, 32, .24);
    color: #fff;
}

.auxb-lead-card__media {
    position: relative;
    overflow: hidden;
    background: #1a1718;
    min-height: 300px;
}

.auxb-lead-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.22, .61, .36, 1);
}

.auxb-lead-card:hover .auxb-lead-card__media img {
    transform: scale(1.05);
}

/* پرده‌ی محو به سمت ستون متن تا لبه‌ی دو ستون دیده نشود */
.auxb-lead-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(35, 31, 32, .55), transparent 45%);
}

.rtl .auxb-lead-card__media::after {
    background: linear-gradient(to right, rgba(35, 31, 32, .55), transparent 45%);
}

.auxb-lead-card__body {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 46px 44px;
}

.auxb-lead-card__body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 100% at 90% 6%, rgba(237, 28, 36, .38), transparent 60%);
}

/* بدون تصویر: یک پنل تمام‌عرض. درخشش قرمز پررنگ‌تر می‌شود و یک نوار مدرج
   لبه‌ی پایین را می‌بندد، تا نبودِ عکس یک انتخاب به نظر برسد نه یک کمبود. */
.auxb-lead-card.is-textonly {
    grid-template-columns: 1fr;
}

.auxb-lead-card.is-textonly .auxb-lead-card__body {
    padding: 56px 48px 52px;
}

.auxb-lead-card.is-textonly .auxb-lead-card__body::before {
    background: radial-gradient(85% 150% at 93% 0, rgba(237, 28, 36, .5), transparent 62%);
}

.auxb-lead-card.is-textonly .auxb-lead-card__body::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 9px;
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, .22) 0 1px, transparent 1px 11px);
}

.auxb-lead-card.is-textonly .auxb-lead-card__title {
    max-width: 26ch;
    font-size: clamp(23px, 1rem + 1.5vw, 34px);
}

.auxb-lead-card.is-textonly .auxb-lead-card__excerpt {
    max-width: 72ch;
    -webkit-line-clamp: 2;
}

.auxb-lead-card__eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #ff7a80;
}

.auxb-lead-card__eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--auxb-red);
    transition: width .4s ease;
}

.auxb-lead-card:hover .auxb-lead-card__eyebrow::before {
    width: 42px;
}

.auxb-lead-card__title {
    margin: 0 0 16px;
    font-size: clamp(20px, 1rem + 1vw, 28px);
    font-weight: 800;
    line-height: 1.7;
    color: #fff;
}

.auxb-lead-card__excerpt {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 2.1;
    color: rgba(255, 255, 255, .74);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auxb-lead-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    font-size: 12.5px;
    color: rgba(255, 255, 255, .62);
}

.auxb-lead-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* پیکان به چپ اشاره می‌کند، چون در متن راست‌به‌چپ جهتِ «جلو» همان چپ است. */
.auxb-lead-card__cta::after {
    content: "←";
    display: inline-block;
    transition: transform .3s ease;
}

.auxb-lead-card:hover .auxb-lead-card__cta::after {
    transform: translateX(-5px);
}

/* ============================================================
   نوار موضوع‌ها
   ============================================================ */

.auxb-topics {
    margin-top: 56px;
    padding-bottom: 4px;
}

.auxb-topics__label {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--auxb-muted);
}

.auxb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auxb-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid var(--auxb-line-strong);
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--auxb-ink-soft);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.auxb-chip:hover {
    border-color: var(--auxb-ink);
    color: var(--auxb-ink);
}

.auxb-chip span {
    font-size: 11.5px;
    color: var(--auxb-muted);
}

.auxb-chip.is-active {
    border-color: var(--auxb-ink);
    background: var(--auxb-ink);
    color: #fff;
}

.auxb-chip.is-active span {
    color: rgba(255, 255, 255, .6);
}

/* ============================================================
   شبکه‌ی کارت‌ها
   ============================================================ */

.auxb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 30px;
}

@media (min-width: 576px) {
    .auxb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .auxb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.auxb-card {
    position: relative;
    display: flex;
    border: 1px solid var(--auxb-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease, border-color .35s ease;
}

.auxb-card:hover {
    transform: translateY(-4px);
    border-color: var(--auxb-line-strong);
    box-shadow: 0 16px 38px rgba(35, 31, 32, .12);
}

/* لولا: نواری قرمز که با هاور از بالا باز می‌شود */
.auxb-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 2;
    width: 3px;
    background: var(--auxb-red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .35s ease;
}

.auxb-card:hover::before {
    transform: scaleY(1);
}

.auxb-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.auxb-card__media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--auxb-paper);
}

.auxb-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}

.auxb-card:hover .auxb-card__media img {
    transform: scale(1.06);
}

/* کارت بدون تصویر: به‌جای جای خالی، یک پلاک مدرج با نام دسته */
.auxb-card__plate {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background:
        repeating-linear-gradient(to right, var(--auxb-line-strong) 0 1px, transparent 1px 12px) bottom right / 100% 8px no-repeat,
        var(--auxb-paper);
    font-size: 17px;
    font-weight: 800;
    color: var(--auxb-line-strong);
}

.auxb-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 22px 22px 18px;
}

.auxb-card__eyebrow {
    position: relative;
    align-self: flex-start;
    padding-bottom: 9px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--auxb-red);
}

.auxb-card__eyebrow::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 22px;
    height: 2px;
    background: var(--auxb-red);
    transition: width .4s ease;
}

.auxb-card:hover .auxb-card__eyebrow::after {
    width: 46px;
}

.auxb-card__title {
    margin: 16px 0 10px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.85;
    color: var(--auxb-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auxb-card:hover .auxb-card__title {
    color: var(--auxb-red-deep);
}

.auxb-card__excerpt {
    margin: 0 0 20px;
    font-size: 13.5px;
    line-height: 2.05;
    color: var(--auxb-ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* پاورقی کارت: همان خط‌کش سربرگ، در مقیاس کوچک */
.auxb-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--auxb-line);
    font-size: 12px;
    color: var(--auxb-muted);
}

.auxb-card__read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.auxb-card__read::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--auxb-line-strong);
}

/* ============================================================
   حالت خالی
   ============================================================ */

.auxb-empty {
    margin-top: 30px;
    padding: 64px 32px;
    border: 1px dashed var(--auxb-line-strong);
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.auxb-empty h2 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 800;
    color: var(--auxb-ink);
}

.auxb-empty p {
    max-width: 46ch;
    margin: 0 auto 24px;
    font-size: 14px;
    line-height: 2;
    color: var(--auxb-ink-soft);
}

.auxb-empty a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    background: var(--auxb-ink);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease;
}

.auxb-empty a:hover {
    background: var(--auxb-red);
    color: #fff;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */

@media (max-width: 991px) {
    .auxb-lead-card {
        grid-template-columns: 1fr;
    }

    .auxb-lead-card__media {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .auxb-lead-card__media::after,
    .rtl .auxb-lead-card__media::after {
        background: linear-gradient(to top, rgba(35, 31, 32, .6), transparent 55%);
    }

    .auxb-lead-card__body {
        padding: 32px 28px;
    }
}

@media (max-width: 575px) {
    .auxb-masthead {
        padding-top: 32px;
    }

    .auxb-masthead__row {
        align-items: stretch;
    }

    .auxb-search {
        flex: 1 1 100%;
    }

    .auxb-lead-card__body {
        padding: 26px 22px;
    }

    .auxb-lead-card__cta {
        margin-inline-start: 0;
        width: 100%;
        padding-top: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auxb *,
    .auxb *::before,
    .auxb *::after {
        transition: none !important;
    }

    .auxb-card:hover,
    .auxb-lead-card:hover {
        transform: none;
    }

    .auxb-card::before {
        transform: scaleY(1);
        opacity: 0;
    }

    .auxb-card:hover::before {
        opacity: 1;
    }
}
