/*
 * آرشیو مطالب سایت (برگرفته از category.css طرح Karun2026؛ ویژگی‌های چپ/راست به منطقی تبدیل شده‌اند)
 * دکمه‌های دسته‌بندی، کارت بزرگ ابتدای صفحه اول، شبکه سه‌ستونه و صفحه‌بندی شماره‌دار
 */
.ka-page{padding:14px 0 70px;color:#354f54}
.ka-page .wrap{max-width:1240px}
.ar-label{font-size:11px;font-weight:700;color:#897647;letter-spacing:.2px}

/* ---------------------------------------------------------------- سرتیتر */
.ka-title{position:relative;margin-bottom:28px;padding:4px 0 22px;border-bottom:1px solid #dce7df}
.ka-title:after{content:'';position:absolute;inset-inline-start:0;bottom:-2px;width:90px;height:3px;border-radius:3px;background:linear-gradient(90deg,#b9a26c 24%,var(--brand) 24%)}
[dir=ltr] .ka-title:after{background:linear-gradient(90deg,var(--brand) 76%,#b9a26c 76%)}
.ka-title h1{margin:8px 0 6px;font-size:clamp(26px,2.6vw,34px);line-height:1.7;color:#164c55}
.ka-title p{max-width:760px;margin:6px 0 10px;font-size:14px;line-height:2.1;color:#637a78}
.ka-total{font-size:12px;color:#80988d}

/* ---------------------------------------------------------------- دسته‌بندی‌ها */
.ka-categories{margin-bottom:34px;padding:22px 24px;border:1px solid #d8e5dc;border-radius:18px;background:#f5f8f6}
.ka-category-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.ka-category-heading h2{font-size:16px;color:var(--brand)}
.ka-category-heading p{margin:0;font-size:11px;color:#6f877e}
.ka-category-list{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0;list-style:none}
.ka-category-list a{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 16px;border:1px solid #d0e0d6;border-radius:10px;background:#fff;color:#42675f;font-size:13px;transition:background .2s,color .2s,border-color .2s}
.ka-category-list small{padding:1px 7px;border-radius:999px;background:#edf4f1;font-size:11px;color:#6f877e}
.ka-category-list a:hover{background:#e3efe7;border-color:#8fb5a2}
.ka-category-list a[aria-current=page]{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 4px 12px #075b6918}
.ka-category-list a[aria-current=page] small{background:#ffffff26;color:#fff}

/* ---------------------------------------------------------------- کارت‌ها */
.ka-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.ka-card{min-width:0;overflow:hidden;border:1px solid #d9e5dd;border-radius:18px;background:#fff;transition:box-shadow .25s,border-color .25s,transform .25s}
.ka-card>a{display:flex;flex-direction:column;height:100%}
.ka-image{position:relative;height:210px;overflow:hidden;background:repeating-linear-gradient(135deg,#e3eeeb 0 12px,#dbe8e4 12px 24px)}
.ka-image img{width:100%;height:100%;object-fit:cover;transition:transform .45s}
.ka-kind{position:absolute;inset-inline-start:14px;bottom:14px;max-width:calc(100% - 28px);padding:5px 12px;border-radius:8px;background:#ffffffed;color:var(--brand);font-size:11px;line-height:1.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ka-badge{position:absolute;top:12px;inset-inline-end:12px;display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:8px;background:#042f36cc;color:#fff;font:12px Arial,sans-serif}
.ka-badge svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.ka-play{position:absolute;top:50%;left:50%;display:grid;place-items:center;width:58px;height:58px;margin:-29px 0 0 -29px;border-radius:50%;background:linear-gradient(135deg,#f1dfab,var(--gold));box-shadow:0 10px 26px #0006;transition:transform .3s}
.ka-play svg{width:24px;height:24px;margin-inline-start:3px;fill:#2c2107}
.ka-copy{display:flex;flex-direction:column;align-items:flex-start;flex:1;padding:22px}
.ka-date{font-size:11px;color:#7d938a}
.ka-copy h2{margin:10px 0;font-size:16px;line-height:1.9;color:#224e53;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ka-copy p{margin:0 0 20px;font-size:12px;line-height:2.1;color:#6d827b;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ka-read{margin-top:auto;padding:8px 14px;border:1px solid #d6e4da;border-radius:9px;background:#f1f7f3;font-size:11px;font-weight:700;color:var(--brand);transition:background .2s,color .2s,border-color .2s}
.ka-card:hover{border-color:#9ebeb0;box-shadow:0 14px 32px #174a3d12;transform:translateY(-3px)}
.ka-card:hover img{transform:scale(1.04)}
.ka-card:hover .ka-play{transform:scale(1.08)}
.ka-card:hover .ka-read{background:var(--brand);border-color:var(--brand);color:#fff}
.ka-card>a:focus-visible{outline:2px solid var(--brand);outline-offset:-4px}

/* کارت بزرگ ابتدای صفحه اول */
.ka-grid.has-feature .ka-card:first-child{grid-column:1/-1}
.ka-grid.has-feature .ka-card:first-child>a{display:grid;grid-template-columns:1.15fr 1fr}
.ka-grid.has-feature .ka-card:first-child .ka-image{height:auto;min-height:340px}
/* تصویر کارت بزرگ ارتفاع ردیف را تعیین نمی‌کند (هم‌قد متن کنار آن با حداقل ۳۴۰ پیکسل) */
.ka-grid.has-feature .ka-card:first-child .ka-image img{position:absolute;inset:0}
.ka-grid.has-feature .ka-card:first-child .ka-copy{justify-content:center;padding:34px;background:linear-gradient(135deg,#f5f9f6,#fff)}
.ka-grid.has-feature .ka-card:first-child h2{font-size:24px}
.ka-grid.has-feature .ka-card:first-child p{font-size:13px;-webkit-line-clamp:4}
.ka-grid.has-feature .ka-card:first-child .ka-play{width:76px;height:76px;margin:-38px 0 0 -38px}

/* ---------------------------------------------------------------- خالی و صفحه‌بندی */
.ka-empty{padding:48px 24px;border:1px dashed #bacfc2;border-radius:16px;text-align:center}
.ka-empty h2{font-size:20px;color:var(--brand)}
.ka-empty p{margin-top:12px;font-size:13px}
.ka-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:36px}
.ka-pagination a,.ka-pagination .is-current{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px 13px;border:1px solid #d3e2d8;border-radius:10px;font-size:13px;color:var(--brand);transition:background .2s}
.ka-pagination a:hover{background:#eaf3ed}
.ka-pagination .is-current{border-color:var(--brand);background:var(--brand);color:#fff}
.ka-pagination .ka-step{padding-inline:16px;font-weight:600}
.ka-gap{color:#9aada7}
.ka-page a:focus-visible{outline:2px solid var(--brand);outline-offset:4px}

/* ---------------------------------------------------------------- واکنش‌گرا */
@media(max-width:1000px){
  .ka-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .ka-grid.has-feature .ka-card:first-child h2{font-size:21px}
  .ka-grid.has-feature .ka-card:first-child .ka-copy{padding:25px}
}
@media(max-width:600px){
  .ka-categories{margin-bottom:26px;padding:16px}
  .ka-category-heading{flex-direction:column;align-items:flex-start;gap:4px}
  .ka-category-list{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
  .ka-category-list a{white-space:nowrap;font-size:12px;padding:7px 12px}
  .ka-grid{grid-template-columns:1fr;gap:18px}
  .ka-grid.has-feature .ka-card:first-child>a{display:flex}
  .ka-grid.has-feature .ka-card:first-child .ka-image{min-height:0;height:220px}
  .ka-grid.has-feature .ka-card:first-child .ka-image img{position:static}
  .ka-grid.has-feature .ka-card:first-child h2{font-size:19px}
  .ka-copy,.ka-grid.has-feature .ka-card:first-child .ka-copy{padding:20px}
  .ka-pagination a,.ka-pagination .is-current{min-width:40px;min-height:40px}
}
@media(prefers-reduced-motion:reduce){
  .ka-card,.ka-image img,.ka-category-list a,.ka-play{transition:none}
  .ka-card:hover,.ka-card:hover img{transform:none}
}
