/* =====================================================================
   آرشیو ژورنال (home.php) — /journal
   فقط در is_home() / is_front_page() لود می‌شود (memari_amir_enqueue_home_assets).
   همه‌ی کلاس‌های اختصاصی این فایل با پیشوند ja- هستند تا با بقیه‌ی قالب و
   استایل صفحه اصلی (front-page) تداخل نکنند. پالت رنگی هم‌خانواده‌ی
   category.css (بخش ژورنال) است: شرابی + طلایی.
   ===================================================================== */

.ja-archive {
    --ja-wine: #260508;
    --ja-wine-2: #3a0c12;
    --ja-burg: #6d1420;
    --ja-gold: #c69a46;
    --ja-gold-2: #e2c08d;
    --ja-gold-grad: linear-gradient(135deg, #f3d7a8 0%, #c69a46 55%, #b88e4c 100%);
    --ja-cream: #f6ecdc;
    --ja-paper: #fdf9f2;
    --ja-page: #f3eadb;
    --ja-ink: #2b1a16;
    --ja-text: #45332d;
    --ja-muted: #85736a;
    --ja-line: rgba(198, 154, 70, .30);
    --ja-ease: cubic-bezier(.16, 1, .3, 1);

    font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--ja-text);
    background: var(--ja-wine);
    overflow-x: clip;
    line-height: 1.8;
}

.ja-archive *,
.ja-archive *::before,
.ja-archive *::after { box-sizing: border-box; }
/* :where() => specificity صفر. قبلاً `.ja-archive a` رنگ همه‌ی لینک‌های تک‌کلاسه
   (چیپ فیلتر، دکمه‌ی پاک کردن، برچسب پادکست، «ادامه مطلب» کارت ویژه) را به رنگ متن
   تیره برمی‌گرداند و روی زمینه‌ی شرابی نامرئی می‌شدند. */
:where(.ja-archive) a { text-decoration: none; color: inherit; }
.ja-archive ul { list-style: none; margin: 0; padding: 0; }
.ja-archive h1, .ja-archive h2, .ja-archive p { margin: 0; }
.ja-archive img { display: block; max-width: 100%; }
.ja-archive .ma-i { width: 1.2em; height: 1.2em; flex: none; display: block; }
.ja-archive a:focus-visible,
.ja-archive input:focus-visible,
.ja-archive select:focus-visible,
.ja-archive button:focus-visible { outline: 2px solid var(--ja-gold); outline-offset: 3px; border-radius: 8px; }
/* فیلدهای فیلتر (جستجو و سلکت‌ها): بدون outline طلایی هنگام کلیک/فوکوس */
.ja-archive .ja-field__control input:focus,
.ja-archive .ja-field__control input:focus-visible,
.ja-archive .ja-field__control select:focus,
.ja-archive .ja-field__control select:focus-visible { outline: none; box-shadow: none; }

.ja-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* =====================================================================
   HERO
   ===================================================================== */
.ja-hero {
    position: relative;
    isolation: isolate;
    padding: 138px 0 128px;
    color: var(--ja-cream);
    background: var(--ja-wine);
    overflow: hidden;
}
.ja-hero__bg {
    position: absolute; inset: -60px; z-index: -3;
    background: var(--ja-cover) center / cover no-repeat;
    filter: blur(46px) saturate(1.25) brightness(.55);
    transform: scale(1.15);
    opacity: .55;
}
.ja-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(60% 70% at 15% 35%, rgba(198, 154, 70, .18), transparent 70%),
        radial-gradient(70% 80% at 90% 100%, rgba(109, 20, 32, .55), transparent 70%),
        linear-gradient(180deg, rgba(38, 5, 8, .55) 0%, rgba(38, 5, 8, .9) 100%);
}
.ja-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e2c08d' stroke-width='1'%3E%3Cpath d='M20 120V52a40 40 0 0 1 80 0v68'/%3E%3Cpath d='M36 120V56a24 24 0 0 1 48 0v64'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 65%);
    mask-image: linear-gradient(270deg, transparent 0%, #000 65%);
}

.ja-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    margin-bottom: 34px;
    font-size: .84rem; color: rgba(246, 236, 220, .62);
}
.ja-crumbs a { transition: color .3s; }
.ja-crumbs a:hover { color: var(--ja-gold-2); }
.ja-crumbs__sep { opacity: .45; }
.ja-crumbs [aria-current] { color: var(--ja-gold-2); font-weight: 600; }

.ja-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .62fr);
    gap: 56px;
    align-items: center;
}

.ja-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 18px 7px 16px; border-radius: 999px;
    font-size: .86rem; font-weight: 700; letter-spacing: .2px;
    color: var(--ja-gold-2);
    background: rgba(198, 154, 70, .12);
    border: 1px solid rgba(226, 192, 141, .32);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.ja-eyebrow .ma-i { width: 16px; height: 16px; }

.ja-title {
    margin: 20px 0 16px !important;
    font-size: clamp(2.1rem, 4.6vw, 3.9rem);
    font-weight: 800; line-height: 1.3; color: #fff;
    letter-spacing: -.4px;
    text-wrap: balance;
    overflow-wrap: anywhere;
    text-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.ja-title::after {
    content: ""; display: block; width: 92px; height: 3px; margin-top: 20px; border-radius: 3px;
    background: var(--ja-gold-grad);
    box-shadow: 0 0 16px rgba(226, 192, 141, .55);
}

.ja-desc {
    max-width: 640px;
    font-size: 1.04rem; line-height: 2.05;
    color: rgba(246, 236, 220, .82);
}

.ja-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px !important; }
.ja-facts li {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    font-size: .84rem; color: rgba(246, 236, 220, .86);
    background: rgba(255, 244, 226, .07);
    border: 1px solid rgba(226, 192, 141, .22);
}
.ja-facts .ma-i { width: 16px; height: 16px; color: var(--ja-gold-2); }

/* ---------- نشان قوسی ---------- */
.ja-emblem {
    position: relative;
    width: min(290px, 100%);
    aspect-ratio: 1 / 1.22;
    margin-inline: auto;
}
.ja-emblem > i {
    position: absolute; inset: 0;
    border: 1px solid rgba(226, 192, 141, .42);
    border-radius: 999px 999px 26px 26px;
}
.ja-emblem > i:nth-child(2) { inset: 16px; border-style: dashed; border-color: rgba(226, 192, 141, .28); border-radius: 999px 999px 18px 18px; }
.ja-emblem > i:nth-child(3) {
    inset: 32px; border-color: rgba(226, 192, 141, .5); border-radius: 999px 999px 12px 12px;
    background: linear-gradient(170deg, rgba(255, 244, 226, .13), rgba(255, 244, 226, .03));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.ja-emblem__core {
    position: absolute; inset: 32px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding-top: 14%;
    text-align: center; line-height: 1.15;
}
.ja-emblem__core .ma-i { width: 26px; height: 26px; color: var(--ja-gold-2); margin-bottom: 8px; }
.ja-emblem__core strong {
    font-size: clamp(3rem, 5.6vw, 4.6rem); font-weight: 800;
    background: var(--ja-gold-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.ja-emblem__core small { font-size: .88rem; letter-spacing: 1px; color: rgba(246, 236, 220, .72); }

/* =====================================================================
   BODY
   ===================================================================== */
.ja-page {
    position: relative; z-index: 3;
    margin-top: -56px;
    background: var(--ja-page);
    border-radius: 48px 48px 0 0;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M50 0 L100 50 L50 100 L0 50 Z' fill='none' stroke='%234a3319' stroke-width='.6' opacity='.06'/%3E%3Cpath d='M50 20 L80 50 L50 80 L20 50 Z' fill='none' stroke='%234a3319' stroke-width='.5' opacity='.05'/%3E%3C/svg%3E"),
        radial-gradient(90% 60% at 50% 0, #f9f2e6, var(--ja-page));
    box-shadow: 0 -30px 60px rgba(0, 0, 0, .25);
}
.ja-body { position: relative; padding: 54px 0 40px; }

/* ---------- ناوبری دسته‌ها ---------- */
.ja-nav {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 22px; padding: 10px 12px 10px 10px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid var(--ja-line);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(74, 40, 20, .06);
}
.ja-nav__label {
    flex: none; display: inline-flex; align-items: center; gap: 8px;
    padding: 0 12px 0 6px;
    font-size: .88rem; font-weight: 700; color: var(--ja-burg);
}
.ja-nav__label .ma-i { width: 16px; height: 16px; color: var(--ja-gold); }
.ja-nav__scroll {
    flex: 1; min-width: 0;
    display: flex; gap: 8px; padding: 4px 4px 22px; margin-bottom: -18px; /* جا برای سایه‌ی پیل‌ها، تا بریده نشود */
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ja-nav__scroll::-webkit-scrollbar { display: none; }

.ja-pill {
    flex: none; display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
    font-size: .9rem; font-weight: 600; color: #5b4032;
    background: #fff; border: 1px solid var(--ja-line);
    transition: background .3s, color .3s, border-color .3s, transform .3s var(--ja-ease), box-shadow .3s;
}
.ja-pill em {
    font-style: normal; font-size: .72rem; font-weight: 700;
    min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
    display: inline-grid; place-items: center;
    color: var(--ja-burg); background: rgba(109, 20, 32, .08);
    transition: background .3s, color .3s;
}
.ja-pill:hover { transform: translateY(-2px); border-color: var(--ja-gold); box-shadow: 0 6px 14px rgba(198, 154, 70, .28); }
.ja-pill.is-active {
    color: var(--ja-gold-2); border-color: transparent;
    background: linear-gradient(135deg, var(--ja-burg), var(--ja-wine-2));
    box-shadow: 0 6px 14px rgba(109, 20, 32, .28);
}
.ja-pill.is-active em { background: rgba(226, 192, 141, .2); color: var(--ja-gold-2); }

/* =====================================================================
   پنل فیلتر
   ===================================================================== */
.ja-filters {
    position: relative; isolation: isolate; overflow: hidden;
    margin-bottom: 40px; padding: 24px;
    background:
        radial-gradient(60% 120% at 100% 0, rgba(198, 154, 70, .16), transparent 60%),
        linear-gradient(135deg, var(--ja-wine) 0%, #3d0d14 100%);
    border: 1px solid rgba(226, 192, 141, .3);
    border-radius: 28px;
    box-shadow: 0 26px 56px rgba(38, 5, 8, .32), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ja-filters::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e2c08d' stroke-width='1'%3E%3Cpath d='M20 120V52a40 40 0 0 1 80 0v68'/%3E%3Cpath d='M36 120V56a24 24 0 0 1 48 0v64'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%);
    mask-image: linear-gradient(90deg, #000, transparent 70%);
}
/* نوار باریک بارگذاری بالای پنل، هنگام جستجوی زنده */
.ja-filters::after {
    content: ""; position: absolute; top: 0; right: 0; height: 3px; width: 40%;
    background: var(--ja-gold-grad); border-radius: 0 0 3px 3px;
    opacity: 0; transform: translateX(0);
}
.ja-filters.is-loading::after { opacity: 1; animation: ja-bar 1s ease-in-out infinite alternate; }
@keyframes ja-bar { from { transform: translateX(0); } to { transform: translateX(-150%); } }

.ja-filters__row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)) auto;
    gap: 16px; align-items: end;
}

.ja-field { min-width: 0; }
.ja-field label {
    display: block; margin: 0 4px 8px;
    font-size: .78rem; font-weight: 700; letter-spacing: .2px; color: var(--ja-gold-2);
}
.ja-field__control {
    position: relative; display: flex; align-items: center;
    background: rgba(255, 244, 226, .07);
    border: 1px solid rgba(226, 192, 141, .28);
    border-radius: 16px;
    transition: border-color .3s, background .3s, box-shadow .3s;
}
.ja-field__control:hover { border-color: rgba(226, 192, 141, .5); }
.ja-field__control:focus-within {
    border-color: rgba(226, 192, 141, .28); /* بدون کادر طلایی هنگام کلیک */
    background: rgba(255, 244, 226, .1);
    box-shadow: none;
}
.ja-field__control .ma-i { flex: none; width: 17px; height: 17px; color: var(--ja-gold); margin: 0 14px; }
.ja-field__control input[type="search"] {
    flex: 1; min-width: 0; height: 50px; padding: 0 4px 0 6px; border: 0; background: transparent;
    color: var(--ja-cream); font-size: .95rem; font-family: inherit; outline: 0;
    -webkit-appearance: none; appearance: none;
}
.ja-field__control input[type="search"]::placeholder { color: rgba(246, 236, 220, .45); }
.ja-field__control input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0 4px; cursor: pointer; opacity: .75;
    background: center / 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2c08d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}

/* اسپینر جستجوی زنده */
.ja-spinner {
    flex: none; width: 16px; height: 16px; margin: 0 12px 0 4px; border-radius: 50%;
    border: 2px solid rgba(226, 192, 141, .25); border-top-color: var(--ja-gold-2);
    opacity: 0; transition: opacity .2s;
}
.ja-filters.is-loading .ja-spinner { opacity: 1; animation: ja-spin .7s linear infinite; }
@keyframes ja-spin { to { transform: rotate(360deg); } }

.ja-field__control--select select {
    flex: 1; min-width: 0; height: 50px; padding: 0 14px 0 12px; border: 0; background: transparent;
    color: var(--ja-cream); font-size: .9rem; font-family: inherit; outline: 0;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    text-overflow: ellipsis;
}
.ja-field__control--select select option { background: var(--ja-wine-2); color: var(--ja-cream); }
.ja-field__control--select .ma-i:last-child { margin-inline-start: 0; width: 14px; height: 14px; transform: rotate(-90deg); }

.ja-filters__actions { display: flex; align-items: center; gap: 10px; }
.ja-btn-submit {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 50px; padding: 0 26px; border: 0; border-radius: 16px; cursor: pointer; white-space: nowrap;
    font-family: inherit; font-size: .92rem; font-weight: 800; color: var(--ja-wine);
    background: var(--ja-gold-grad);
    box-shadow: 0 10px 24px rgba(198, 154, 70, .35);
    transition: transform .3s var(--ja-ease), box-shadow .3s;
}
.ja-btn-submit .ma-i { width: 16px; height: 16px; }
.ja-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(198, 154, 70, .5); }
/* وقتی سلکتی عوض شده ولی هنوز اعمال نشده، دکمه ملایم می‌تپد */
.ja-btn-submit.is-dirty { animation: ja-pulse 1.6s ease-out infinite; }
@keyframes ja-pulse {
    0%   { box-shadow: 0 10px 24px rgba(198, 154, 70, .35), 0 0 0 0 rgba(226, 192, 141, .55); }
    70%  { box-shadow: 0 10px 24px rgba(198, 154, 70, .35), 0 0 0 12px rgba(226, 192, 141, 0); }
    100% { box-shadow: 0 10px 24px rgba(198, 154, 70, .35), 0 0 0 0 rgba(226, 192, 141, 0); }
}

.ja-btn-clear {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 50px; padding: 0 18px; border-radius: 16px; white-space: nowrap;
    font-size: .86rem; font-weight: 600; color: rgba(246, 236, 220, .85);
    border: 1px solid rgba(226, 192, 141, .3);
    transition: color .3s, border-color .3s, background .3s;
}
.ja-btn-clear .ma-i { width: 14px; height: 14px; }
.ja-btn-clear:hover { color: var(--ja-gold-2); border-color: var(--ja-gold); background: rgba(198, 154, 70, .12); }

/* ---------- چیپ‌های فیلتر فعال ---------- */
.ja-chips {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin-top: 20px; padding-top: 20px;
    border-top: 1px dashed rgba(226, 192, 141, .28);
}
.ja-chips__count {
    display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
    font-size: .82rem; font-weight: 800; color: var(--ja-wine); background: var(--ja-gold-grad);
}
.ja-chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 34px; padding: 3px 8px 3px 14px; border-radius: 999px;
    font-size: .82rem; font-weight: 600; line-height: 1.6; color: #fff;
    background: rgba(255, 244, 226, .12);
    border: 1px solid rgba(226, 192, 141, .45);
    transition: background .3s, border-color .3s;
}
.ja-chip > span { overflow-wrap: anywhere; }
.ja-chip .ma-i {
    width: 20px; height: 20px; padding: 4px; border-radius: 50%; color: var(--ja-gold-2);
    background: rgba(255, 255, 255, .12); transition: background .3s, color .3s;
}
.ja-chip:hover { background: rgba(198, 154, 70, .28); border-color: var(--ja-gold); }
.ja-chip:hover .ma-i { background: var(--ja-gold); color: var(--ja-wine); }

/* ---------- نتایج (جایگزینی زنده) ---------- */
.ja-results { transition: opacity .25s; }
.ja-filters.is-loading ~ .ja-results { opacity: .45; pointer-events: none; }

/* ---------- تیتر بخش ---------- */
.ja-headline {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 30px;
}
.ja-h2 {
    display: flex; align-items: center; gap: 16px;
    font-size: 1.5rem; font-weight: 800; color: var(--ja-wine); line-height: 1.5;
}
.ja-h2::before {
    content: ""; width: 11px; height: 11px; flex: none; transform: rotate(45deg);
    background: var(--ja-gold-grad); box-shadow: 0 0 0 4px rgba(198, 154, 70, .18);
}
.ja-headline__count {
    flex: none; font-size: .82rem; font-weight: 700; color: var(--ja-burg);
    padding: 6px 16px; border-radius: 999px;
    background: rgba(109, 20, 32, .08); border: 1px solid var(--ja-line);
}

/* ---------- شبکه‌ی کارت‌ها ---------- */
.ja-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.ja-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 10px;
    background: var(--ja-paper);
    border: 1px solid var(--ja-line);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(74, 40, 20, .07), inset 0 1px 0 #fff;
    transition: transform .5s var(--ja-ease), box-shadow .5s var(--ja-ease), border-color .4s;
}
.ja-card::after {
    content: ""; position: absolute; right: 34px; left: 34px; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--ja-gold), transparent);
    opacity: 0; transition: opacity .4s;
}
@media (hover: hover) {
    .ja-card:hover { transform: translateY(-8px); border-color: rgba(198, 154, 70, .6); box-shadow: 0 34px 70px rgba(74, 40, 20, .16); }
}
.ja-card:hover::after { opacity: 1; }

.ja-card__media {
    position: relative; display: block; overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 4 / 3;
    background: var(--ja-wine-2);
}
.ja-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .9s var(--ja-ease);
}
.ja-card:hover .ja-card__media img { transform: scale(1.07); }
.ja-card__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(38, 5, 8, .35));
    pointer-events: none;
}

.ja-card__flag,
.ja-card__pod {
    position: absolute; z-index: 2; top: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 13px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; line-height: 1.6;
}
.ja-card__flag { right: 12px; color: var(--ja-wine); background: var(--ja-gold-grad); box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.ja-card__pod {
    left: 12px; color: var(--ja-cream);
    background: rgba(24, 4, 8, .7);
    border: 1px solid rgba(226, 192, 141, .35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.ja-card__pod .ma-i { width: 13px; height: 13px; color: var(--ja-gold-2); }

.ja-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 14px 12px; }

.ja-card__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .78rem; color: var(--ja-muted); }
.ja-card__meta li { display: inline-flex; align-items: center; gap: 6px; }
.ja-card__meta .ma-i { width: 14px; height: 14px; color: var(--ja-gold); }
.ja-card__meta .ja-card__cat {
    padding: 1px 11px; border-radius: 999px; font-weight: 700; color: var(--ja-burg);
    background: rgba(109, 20, 32, .08);
}

.ja-card__title {
    margin-top: 12px !important;
    font-size: 1.16rem; font-weight: 800; line-height: 1.75; color: var(--ja-wine);
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ja-card__title a { transition: color .3s; }
.ja-card__title a:hover { color: var(--ja-burg); }

.ja-card__excerpt {
    margin-top: 8px !important;
    font-size: .93rem; line-height: 2; color: var(--ja-text);
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.ja-card__more {
    margin-top: auto; padding-top: 16px; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 700; color: var(--ja-burg);
    transition: gap .3s, color .3s;
}
.ja-card__more .ma-i {
    width: 32px; height: 32px; padding: 8px; border-radius: 50%;
    border: 1px solid var(--ja-line); background: #fff; color: var(--ja-burg);
    transition: background .3s, color .3s, border-color .3s, transform .3s var(--ja-ease);
}
.ja-card__more:hover { gap: 12px; }
.ja-card:hover .ja-card__more .ma-i { background: var(--ja-burg); border-color: var(--ja-burg); color: var(--ja-gold-2); transform: translateX(-3px); }

/* ---------- کارت ویژه (اولین مطلب) ---------- */
.ja-card--feature {
    grid-column: 1 / -1;
    flex-direction: row; align-items: center;
    gap: 10px; padding: 10px;
    background: linear-gradient(135deg, #fffaf1, var(--ja-paper));
}
.ja-card--feature .ja-card__media { flex: 0 0 40%; aspect-ratio: 16 / 10; min-height: 0; border-radius: 20px; }
.ja-card--feature .ja-card__body { flex: 1; min-width: 0; justify-content: center; padding: 8px 28px 8px 20px; }
.ja-card--feature .ja-card__title { margin-top: 10px !important; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.65; -webkit-line-clamp: 2; line-clamp: 2; }
.ja-card--feature .ja-card__excerpt { margin-top: 8px !important; font-size: .96rem; -webkit-line-clamp: 2; line-clamp: 2; }
.ja-card--feature .ja-card__more {
    margin-top: 16px; padding: 0 22px; height: 44px; border-radius: 999px; font-size: .88rem;
    color: var(--ja-cream); background: linear-gradient(135deg, var(--ja-burg), var(--ja-wine-2));
    box-shadow: 0 10px 22px rgba(109, 20, 32, .28);
}
.ja-card--feature .ja-card__more .ma-i { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; color: var(--ja-gold-2); }
.ja-card--feature:hover .ja-card__more .ma-i { background: transparent; color: var(--ja-gold-2); }

/* ---------- صفحه‌بندی ---------- */
.ja-pagination { margin-top: 56px; }
.ja-pagination ul.page-numbers { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.ja-pagination .page-numbers li { display: block; }
.ja-pagination a.page-numbers,
.ja-pagination span.page-numbers {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 46px; height: 46px; padding: 0 14px; border-radius: 999px;
    font-size: .95rem; font-weight: 700; color: #5b4032;
    background: #fff; border: 1px solid var(--ja-line);
    font-variant-numeric: tabular-nums;
    transition: background .3s, color .3s, border-color .3s, transform .3s var(--ja-ease), box-shadow .3s;
}
.ja-pagination a.page-numbers:hover { transform: translateY(-3px); border-color: var(--ja-gold); box-shadow: 0 10px 22px rgba(198, 154, 70, .3); }
.ja-pagination span.current {
    color: var(--ja-gold-2); border-color: transparent;
    background: linear-gradient(135deg, var(--ja-burg), var(--ja-wine-2));
    box-shadow: 0 10px 22px rgba(109, 20, 32, .3);
}
.ja-pagination span.dots { background: transparent; border-color: transparent; min-width: 26px; padding: 0; }
.ja-pagination .prev .ma-i { transform: scaleX(-1); }
.ja-pagination .prev, .ja-pagination .next { color: var(--ja-burg); }
.ja-pagination .ma-i { width: 16px; height: 16px; }

/* ---------- حالت خالی ---------- */
.ja-empty {
    max-width: 560px; margin: 20px auto 30px; padding: 54px 34px 48px; text-align: center;
    background: var(--ja-paper); border: 1px solid var(--ja-line); border-radius: 30px;
    box-shadow: 0 24px 60px rgba(74, 40, 20, .08), inset 0 1px 0 #fff;
}
.ja-empty__arch {
    width: 96px; height: 118px; margin: 0 auto 26px;
    display: grid; place-items: center;
    border-radius: 999px 999px 16px 16px;
    color: var(--ja-gold);
    background: linear-gradient(170deg, rgba(198, 154, 70, .16), rgba(198, 154, 70, .03));
    border: 1px solid var(--ja-line);
    box-shadow: 0 0 0 8px rgba(198, 154, 70, .07);
}
.ja-empty__arch .ma-i { width: 34px; height: 34px; margin-top: 18px; }
.ja-empty h2 { font-size: 1.4rem; font-weight: 800; color: var(--ja-wine); margin-bottom: 10px; }
.ja-empty p { color: var(--ja-muted); line-height: 2; margin-bottom: 26px; }

/* =====================================================================
   CTA
   ===================================================================== */
.ja-cta-wrap { padding: 44px 0 90px; position: relative; }
.ja-cta {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; justify-content: space-between; gap: 28px;
    padding: 52px 56px; border-radius: 32px; color: var(--ja-cream);
    background: linear-gradient(120deg, var(--ja-wine) 0%, #4a0e16 55%, var(--ja-burg) 100%);
    border: 1px solid rgba(226, 192, 141, .3);
    box-shadow: 0 30px 70px rgba(38, 5, 8, .35);
}
.ja-cta::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e2c08d' stroke-width='1'%3E%3Cpath d='M20 120V52a40 40 0 0 1 80 0v68'/%3E%3Cpath d='M36 120V56a24 24 0 0 1 48 0v64'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
}
.ja-cta::after {
    content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; left: -120px; top: -160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(226, 192, 141, .28), transparent 70%);
}
.ja-cta__eyebrow { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 700; letter-spacing: 3px; color: var(--ja-gold-2); }
.ja-cta h2 { margin-bottom: 6px !important; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: #fff; }
.ja-cta p { color: rgba(246, 236, 220, .8); }

.ja-btn-gold {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    height: 56px; padding: 0 34px; border-radius: 999px;
    font-weight: 800; color: var(--ja-wine) !important; background: var(--ja-gold-grad);
    box-shadow: 0 12px 30px rgba(198, 154, 70, .4);
    transition: transform .35s var(--ja-ease), box-shadow .35s, gap .3s;
}
.ja-btn-gold .ma-i { width: 1.15em; height: 1.15em; }
.ja-btn-gold:hover { transform: translateY(-3px); gap: 16px; box-shadow: 0 18px 40px rgba(198, 154, 70, .55); }

/* =====================================================================
   ریسپانسیو
   ===================================================================== */
@media (max-width: 1100px) {
    .ja-hero__grid { gap: 36px; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); }
    .ja-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .ja-card--feature .ja-card__media { flex-basis: 42%; }
    .ja-card--feature .ja-card__body { padding: 6px 20px 6px 14px; }

    /* فیلتر: جستجو یک ردیف کامل، سه سلکت زیرش، دکمه‌ها ردیف آخر */
    .ja-filters__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ja-field--search { grid-column: 1 / -1; }
    .ja-filters__actions { grid-column: 1 / -1; }
    .ja-btn-submit { flex: 1; }
}

@media (max-width: 900px) {
    .ja-hero { padding: 116px 0 104px; }
    .ja-crumbs { margin-bottom: 26px; }
    .ja-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .ja-emblem { display: none; }
    .ja-desc { font-size: 1rem; }
    .ja-cta { flex-direction: column; align-items: flex-start; padding: 40px 30px; }
}

@media (max-width: 767px) {
    .ja-card--feature { flex-direction: column; gap: 0; padding: 10px; align-items: stretch; }
    .ja-card--feature .ja-card__media { flex: none; aspect-ratio: 16 / 11; border-radius: 20px; }
    .ja-card--feature .ja-card__body { padding: 18px 14px 12px; }
    .ja-card--feature .ja-card__title { font-size: 1.2rem; }
    .ja-card--feature .ja-card__excerpt { -webkit-line-clamp: 3; line-clamp: 3; }
    .ja-card--feature .ja-card__more { align-self: stretch; justify-content: center; }
    .ja-headline { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* دسته‌ها در گوشی نمایش داده نمی‌شوند (همان فیلتر «دسته‌بندی» کافی است) */
    .ja-nav { display: none; }

    /* فیلتر در گوشی: جستجو و دسته‌بندی تمام‌عرض، «نوع» و «مرتب‌سازی» کنار هم */
    .ja-filters__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
    .ja-field--search, .ja-field--cat, .ja-filters__actions { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .ja-container { padding: 0 16px; }
    .ja-hero { padding: 108px 0 92px; }
    .ja-title { font-size: 2rem; margin-top: 16px !important; }
    .ja-title::after { width: 72px; margin-top: 16px; }
    .ja-facts { gap: 8px; margin-top: 22px !important; }
    .ja-facts li { padding: 6px 13px; font-size: .78rem; }
    .ja-page { border-radius: 32px 32px 0 0; margin-top: -40px; }
    .ja-body { padding: 36px 0 24px; }

    .ja-filters { padding: 18px 16px; border-radius: 22px; margin-bottom: 30px; }
    .ja-field label { margin-bottom: 6px; }
    .ja-field__control { border-radius: 14px; }
    .ja-field__control input[type="search"],
    .ja-field__control--select select { height: 48px; font-size: 16px; } /* ۱۶px: جلوگیری از زوم خودکار iOS */
    .ja-field__control .ma-i { margin: 0 11px; }
    .ja-btn-submit, .ja-btn-clear { height: 48px; border-radius: 14px; }
    .ja-chips { gap: 8px; margin-top: 16px; padding-top: 16px; }

    .ja-h2 { font-size: 1.22rem; gap: 12px; }
    .ja-headline { margin-bottom: 22px; }
    .ja-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .ja-card { border-radius: 24px; }
    .ja-card__media { aspect-ratio: 16 / 11; }
    .ja-card__title { font-size: 1.1rem; }

    .ja-pagination { margin-top: 40px; }
    .ja-pagination a.page-numbers,
    .ja-pagination span.page-numbers { min-width: 42px; height: 42px; padding: 0 12px; }
    .ja-pagination .prev span, .ja-pagination .next span { display: none; }
    .ja-pagination .prev, .ja-pagination .next { padding: 0; width: 42px; }

    .ja-empty { padding: 40px 22px 36px; border-radius: 24px; }
    .ja-cta-wrap { padding: 30px 0 64px; }
    .ja-cta { padding: 34px 22px; border-radius: 24px; }
    .ja-btn-gold { width: 100%; }
}

@media (max-width: 400px) {
    .ja-title { font-size: 1.75rem; }
    .ja-crumbs { font-size: .78rem; }
    .ja-eyebrow { font-size: .8rem; padding: 6px 14px 6px 12px; }
}

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