/* =========================================================
   Yooz — فهرست مقالات (archive.php): خانه‌ی مقالات، دسته، برچسب، نویسنده، تاریخ و ۴۰۴
   کارت مقاله، فرم جستجوی بزرگ و صفحه‌بندی در صفحه‌ی جستجو (search.php) هم استفاده می‌شوند.

   بخش‌ها: باکس‌های دسته (.yz-cb) · جستجوی بزرگ (.yz-ba__hero) ·
           عنوان بخش · کارت مقاله (.yz-pc) · صفحه‌بندی (.yz-pg) · حالت خالی
   رنگ‌ها از توکن‌های style.css (حالت تاریک خودکار).
   ========================================================= */

.yz-ba,
.yz-sr {
  --ba-line: var(--yz-ft-line, rgba(16, 24, 40, .08));
  --ba-panel: var(--yz-ft-bg, #f3f4f5);
  --ba-soft: var(--yz-hd-current, rgba(26, 115, 232, .09));
  --ba-radius: 24px;
  --ba-ease: cubic-bezier(.22, .8, .24, 1);

  padding: 18px var(--yz-shell-gap, 14px) 0;
  color: var(--yz-color-text);
  font-family: var(--yz-font, "Vazirmatn", Tahoma, sans-serif);
}
.yz-ba *, .yz-ba *::before, .yz-ba *::after,
.yz-sr *, .yz-sr *::before, .yz-sr *::after { box-sizing: border-box; }

.yz-ba__wrap {
  max-width: var(--yz-shell-width, 1440px);
  margin: 0 auto;
}

.yz-ba a:focus-visible,
.yz-ba button:focus-visible,
.yz-sr a:focus-visible,
.yz-sr button:focus-visible {
  outline: 2px solid var(--yz-color-primary);
  outline-offset: 2px;
}

/* =========================================================
   باکس‌های دسته‌بندی
   ========================================================= */
.yz-ba__cats ul {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yz-cb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--ba-panel);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s ease, background-color .2s ease, transform .25s var(--ba-ease);
}
.yz-cb:hover {
  border-color: var(--ba-line);
  background: var(--yz-color-bg);
  transform: translateY(-2px);
}
.yz-cb.is-active {
  border-color: var(--yz-color-primary);
  background: var(--ba-soft);
}

.yz-cb__name {
  padding-inline-end: 26px; /* جای فلش */
  overflow: hidden;
  color: var(--yz-color-heading);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yz-cb.is-active .yz-cb__name { color: var(--yz-color-primary); }

.yz-cb__count {
  color: var(--yz-color-text-muted);
  font-size: 13px;
}

.yz-cb__arrow {
  position: absolute;
  top: 18px;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--yz-color-gray-400);
  transition: color .2s ease, transform .25s var(--ba-ease);
}
.yz-cb:hover .yz-cb__arrow {
  color: var(--yz-color-primary);
  transform: translate(-2px, -2px);
}

/* =========================================================
   جستجوی بزرگ
   ========================================================= */
.yz-ba__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  padding: 60px 20px 64px;
  border-radius: var(--yz-ft-radius, 28px);
  text-align: center;
  isolation: isolate;
}
/* پس‌زمینه‌ی نقطه‌ای محو — هم‌خانواده‌ی جداکننده‌ی نقطه‌چین صفحه‌ی مقاله */
.yz-ba__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: radial-gradient(var(--yz-color-gray-300) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 75%);
  opacity: .7;
}

.yz-ba__headline {
  margin: 0;
  color: var(--yz-color-heading);
  font-size: clamp(28px, 4.6vw, 40px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -.5px;
}

/* نام سایت: باکس کج، کمی بالاتر، با درخشش
   درخشش با یک لایه‌ی گرادیان متحرک در پس‌زمینه ساخته شده (بدون overflow:hidden
   تا خط پایه‌ی باکس با متن کنارش هم‌تراز بماند). */
.yz-ba__brand {
  position: relative;
  display: inline-block;
  margin: 0 .12em;
  padding: .04em .42em .16em;
  border-radius: .3em;
  line-height: 1.3;
  color: #fff;
  background-color: var(--yz-color-primary);
  background-image: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0;
  transform: translateY(-.12em) rotate(-3deg);
  box-shadow:
    0 .28em .7em -.3em rgba(26, 115, 232, .55),
    inset 0 -.08em 0 rgba(0, 0, 0, .12);
  animation: yz-shine 3.6s ease-in-out infinite;
}
.yz-ba__brand > span { position: relative; z-index: 1; }

/* هاله‌ی ملایم بالای باکس */
.yz-ba__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, .28), transparent 60%);
  pointer-events: none;
}

@keyframes yz-shine {
  0%, 50%   { background-position: 130% 0; }
  85%, 100% { background-position: -30% 0; }
}

[data-theme="dark"] .yz-ba__brand { color: #0b1626; }

/* کادر جستجوی بزرگ (پایه‌ی .yz-sf در front.css) */
.yz-sf--hero {
  width: 100%;
  max-width: 680px;
  height: 64px;
  margin-top: 30px;
  padding: 7px;
  padding-inline-start: 0;
  border-radius: 20px;
  background: var(--yz-color-bg);
  border-color: var(--ba-line);
  box-shadow: 0 18px 40px -26px rgba(16, 24, 40, .35);
}
.yz-sf--hero .yz-sf__icon { width: 56px; }
.yz-sf--hero .yz-sf__icon svg { width: 22px; height: 22px; }
.yz-sf--hero .yz-sf__input { font-size: 16px; }
.yz-sf--hero .yz-sf__btn {
  height: 100%;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 15px;
}

/* =========================================================
   عنوان بخش مقالات
   ========================================================= */
.yz-ba__posts { margin-top: 8px; }

.yz-ba__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 22px;
  padding: 0 4px 18px;
  border-bottom: 2px dotted var(--yz-color-gray-300);
}
.yz-ba__head-text { min-width: 0; }

.yz-ba__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--yz-color-primary);
  font-size: 13px;
  font-weight: 700;
}
.yz-ba__title {
  margin: 0;
  color: var(--yz-color-heading);
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 900;
  line-height: 1.6;
}
.yz-ba__lead {
  max-width: 70ch;
  margin: 6px 0 0;
  color: var(--yz-color-gray-600);
  font-size: 14.5px;
  line-height: 2;
}
.yz-ba__found {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ba-panel);
  color: var(--yz-color-text-muted);
  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   کارت مقاله (.yz-pc)
   ========================================================= */
.yz-ba__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.yz-pc {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ba-line);
  border-radius: var(--ba-radius);
  background: var(--yz-color-bg);
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--ba-ease);
}
.yz-pc:hover {
  border-color: transparent;
  box-shadow: 0 0 0 1px var(--ba-line), 0 22px 44px -28px rgba(16, 24, 40, .4);
  transform: translateY(-3px);
}
.yz-pc:focus-within { border-color: var(--yz-color-primary); }

.yz-pc__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--ba-radius) - 8px);
  background: var(--ba-panel);
  overflow: hidden;
}
.yz-pc__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ba-ease);
}
.yz-pc:hover .yz-pc__img { transform: scale(1.04); }

.yz-pc__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    radial-gradient(circle at 75% 25%, var(--ba-soft), transparent 55%),
    var(--ba-panel);
  color: var(--yz-color-gray-400);
  font-size: 54px;
  font-weight: 900;
}

.yz-pc__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 10px 6px;
}

.yz-pc__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.yz-pc__cat {
  position: relative;
  z-index: 2; /* بالای لینک کشیده‌ی عنوان */
  max-width: 65%;
  padding: 3px 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ba-soft);
  color: var(--yz-color-primary);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yz-pc__cat:hover { background: var(--yz-color-primary); color: #fff; }
[data-theme="dark"] .yz-pc__cat:hover { color: #0b1626; }

.yz-pc__time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--yz-color-text-muted);
  font-size: 12.5px;
}
.yz-pc__time svg { width: 15px; height: 15px; }

.yz-pc__title {
  margin: 12px 0 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.75;
}
.yz-pc__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--yz-color-heading);
  text-decoration: none;
  transition: color .15s ease;
}
/* کل کارت قابل کلیک */
.yz-pc__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--ba-radius);
}
.yz-pc__title a:focus-visible { outline: 0; }
.yz-pc:hover .yz-pc__title a { color: var(--yz-color-primary); }

.yz-pc__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--yz-color-gray-600);
  font-size: 14px;
  line-height: 2;
}

.yz-pc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 2px dotted var(--yz-color-gray-300);
  font-size: 13px;
}
/* فوتر همیشه پایین کارت (هم‌تراز در یک ردیف)؛ فاصله‌ی حداقل از محتوای بالا */
.yz-pc__excerpt,
.yz-pc__title:not(:has(+ .yz-pc__excerpt)) { margin-bottom: 16px; }

.yz-pc__author {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.yz-pc__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.yz-pc__by {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.55;
}
.yz-pc__by strong {
  overflow: hidden;
  color: var(--yz-color-gray-700);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yz-pc__by time { color: var(--yz-color-text-muted); font-size: 12px; }

/* دکمه‌ی «مشاهده» */
.yz-pc__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 12px 0 14px;
  border-radius: 11px;
  background: var(--ba-soft);
  color: var(--yz-color-primary);
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color .2s ease, color .2s ease, gap .25s var(--ba-ease);
}
.yz-pc__more svg { width: 16px; height: 16px; }
.yz-pc:hover .yz-pc__more {
  gap: 10px;
  background: var(--yz-color-primary);
  color: #fff;
}
[data-theme="dark"] .yz-pc:hover .yz-pc__more { color: #0b1626; }

/* =========================================================
   صفحه‌بندی (.yz-pg)
   ========================================================= */
.yz-pg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
}
.yz-pg__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: var(--ba-panel);
}
.yz-pg .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  color: var(--yz-color-gray-700);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.yz-pg a.page-numbers:hover { background: var(--yz-color-bg); color: var(--yz-color-heading); }
.yz-pg .page-numbers.current {
  background: var(--yz-color-primary);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(26, 115, 232, .7);
}
[data-theme="dark"] .yz-pg .page-numbers.current { color: #0b1626; }
.yz-pg .page-numbers.dots { min-width: 24px; padding: 0; color: var(--yz-color-text-muted); }
.yz-pg .prev,
.yz-pg .next { padding: 0 16px; background: var(--yz-color-bg); }
.yz-pg .prev svg,
.yz-pg .next svg { width: 17px; height: 17px; }
.yz-pg__status { color: var(--yz-color-text-muted); font-size: 13px; }

/* =========================================================
   حالت خالی
   ========================================================= */
.yz-ba__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px;
  border: 2px dotted var(--yz-color-gray-300);
  border-radius: var(--ba-radius);
  text-align: center;
}
.yz-ba__empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--ba-soft);
  color: var(--yz-color-primary);
}
.yz-ba__empty-icon svg { width: 28px; height: 28px; }
.yz-ba__empty h3 {
  margin: 18px 0 0;
  color: var(--yz-color-heading);
  font-size: 19px;
  font-weight: 800;
}
.yz-ba__empty p { margin: 6px 0 0; color: var(--yz-color-gray-600); font-size: 14.5px; }
.yz-ba__empty-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-top: 20px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--yz-color-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.yz-ba__empty-btn:hover { background: var(--yz-color-primary-dark); color: #fff; }
[data-theme="dark"] .yz-ba__empty-btn,
[data-theme="dark"] .yz-ba__empty-btn:hover { color: #0b1626; }

/* =========================================================
   واکنش‌گرا
   ========================================================= */
@media (max-width: 1199px) {
  .yz-ba__cats ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yz-ba__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .yz-ba, .yz-sr { padding-top: 12px; }
  .yz-ba__cats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .yz-cb { padding: 14px 16px; border-radius: 16px; }
  .yz-cb__name { font-size: 14.5px; }
  .yz-cb__arrow { top: 15px; left: 13px; width: 16px; height: 16px; }

  .yz-ba__hero { padding: 48px 4px 52px; }
  .yz-ba__headline { line-height: 1.7; }

  .yz-sf--hero { height: 56px; margin-top: 22px; padding: 5px; padding-inline-start: 0; border-radius: 16px; }
  .yz-sf--hero .yz-sf__icon { width: 44px; }
  .yz-sf--hero .yz-sf__btn { padding: 0 16px; border-radius: 12px; }

  .yz-ba__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .yz-ba__head { align-items: flex-start; flex-direction: column; gap: 10px; }

  .yz-pg .prev .yz-pg__label,
  .yz-pg .next .yz-pg__label { display: none; }
  .yz-pg .prev,
  .yz-pg .next { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .yz-ba__brand { animation: none; }
  .yz-cb, .yz-cb__arrow, .yz-pc, .yz-pc__img, .yz-pc__more { transition: none; }
  .yz-pc:hover, .yz-cb:hover { transform: none; }
  .yz-pc:hover .yz-pc__img { transform: none; }
}
