/* ==========================================
   Hero Section Styling
   ========================================== */
.archive-hero {
  position: relative;
  width: 100%;
  min-height: 480px;
  background-image: url("/uploads/icroir/icro/assets/images/arcive-banner.jpg");
  background-position: center 35%;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 130px 48px 65px 48px;
  box-sizing: border-box;
  direction: rtl;
  z-index: 1;
}

/* لایه Overlay تیره سرمه‌ای برای عمق تصویر و خوانایی متن */
.archive-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, #031930 94%, transparent),
    color-mix(in srgb, #031930 65%, transparent) 52%,
    color-mix(in srgb, #031930 35%, transparent)
  );
}

.archive-hero__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

/* ------------------------------------------
   سمت راست: محتوای متنی
   ------------------------------------------ */
.archive-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 650px;
}

/* Breadcrumb */
.archive-hero__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 0.95rem;
  font-weight: 500;
  user-select: none;
}

.breadcrumb-link {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.breadcrumb-link:hover {
  opacity: 1;
  color: var(--accent-color, #d79c34);
}

.breadcrumb-separator {
  color: var(--accent-color, #d79c34);
  font-size: 0.65rem;
  letter-spacing: 2px;
  line-height: 1;
  opacity: 0.95;
}

.breadcrumb-current {
  color: #ffffff;
  font-weight: 600;
  opacity: 1;
}

/* Title & Ornament */
.archive-hero__title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.archive-hero__ornament {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color, #d79c34);
  width: 14px;
  height: 38px;
  flex-shrink: 0;
}

.archive-hero__ornament svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(215, 156, 52, 0.4));
}

.archive-hero__title {
  margin: 0;
  font-size: 3.25rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

/* Description */
.archive-hero__desc {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------
   سمت چپ: جستجو و فیلترهای شیشه‌ای
   ------------------------------------------ */
.archive-hero__controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 440px;
  gap: 16px;
}

/* ظرف باکس جستجو */
.archive-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

/* اینپوت جستجو */
.archive-search-input {
  width: 100%;
  height: 56px;
  /* پدینگ راست برای متن و چپ (54px) برای اینکه متن زیر آیکون نرود */
  padding: 0 24px 0 54px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  text-align: right;
  transition: all 0.25s ease;
}

.archive-search-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.archive-search-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-color, #d79c34);
  box-shadow: 0 0 0 4px
    color-mix(in srgb, var(--accent-color, #d79c34) 22%, transparent);
}

/* آیکون جستجو در سمت چپ باکس */
.archive-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none; /* تا مانع کلیک روی اینپوت نشود */
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

/* تغییر رنگ آیکون هنگام فوکوس روی اینپوت */
.archive-search-box:focus-within .archive-search-icon {
  color: var(--accent-color, #d79c34);
  transform: translateY(-50%) scale(1.05);
}

.archive-search-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.archive-search-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-color, #d79c34);
  box-shadow: 0 0 0 4px rgba(215, 156, 52, 0.2);
}

/* دکمه‌های شیشه‌ای فیلتر */
.archive-filters-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.archive-filter-item {
  flex: 1;
}

.archive-filter-btn {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.archive-filter-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.archive-filter-btn:focus-visible {
  border-color: var(--accent-color, #d79c34);
  box-shadow: 0 0 0 3px rgba(215, 156, 52, 0.25);
}

.filter-chevron {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.8);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  flex-shrink: 0;
}

.archive-filter-btn:hover .filter-chevron {
  color: #ffffff;
}

/* ==========================================
   واکنش‌گرایی (Responsive Design)
   ========================================== */
@media (max-width: 992px) {
  .archive-hero {
    min-height: auto;
    padding: 110px 24px 45px 24px;
  }

  .archive-hero__container {
    flex-direction: column;
    align-items: stretch;
    gap: 36px;
  }

  .archive-hero__content {
    max-width: 100%;
  }

  .archive-hero__title {
    font-size: 2.5rem;
  }

  .archive-hero__controls {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .archive-hero {
    padding: 117px 28px 35px 35px;
  }
  .filter-label {
    font-size: 0.8rem;
  }

  .archive-hero__title {
    font-size: 2rem;
  }

  .archive-hero__desc {
    font-size: 1rem;
    line-height: 1.75;
  }

  .archive-filters-row {
    gap: 10px;
  }

  .archive-search-input {
    height: 50px;
    font-size: 0.9rem;
  }

  .archive-filter-btn {
    height: 44px;
  }
}

.filter-icon {
  padding: 12px;
  margin-left: -11px;
  display: flex;
  border-right: 1px;
  border-color: #ffffff26;
  border-style: solid;
  border-radius: 12px;
}

/* ==========================================
   Filter Items & Dropdown Popup
   ========================================== */

.archive-filter-item {
  position: relative;
  flex: 1;
  min-width: 0;
}

/* آیکون فلش */
.filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.filter-chevron {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.75);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s ease;
}

/* چرخش فلش هنگام باز بودن منو */
.archive-filter-item.is-open .filter-chevron {
  transform: rotate(180deg);
  color: var(--accent-color, #d79c34);
}

.archive-filter-item.is-open .archive-filter-btn {
  border-color: var(--accent-color, #d79c34);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--accent-color, #d79c34) 25%, transparent);
}

/* باکس پاپ‌آپ دراپ‌داون */
.archive-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max(100%, 230px);
  max-height: 280px;

  /* افکت شیشه‌ای متناسب با هیرو */
  background: color-mix(
    in srgb,
    var(--primary-color, #031930) 82%,
    transparent
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;

  padding: 6px;
  box-sizing: border-box;
  z-index: 999;

  /* حالت اولیه مخفی با انیمیشن ورود */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.25s;
  pointer-events: none;
}

/* حالت باز */
.archive-filter-item.is-open .archive-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* اسکرول‌بار نرم داخلی */
.archive-dropdown-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 260px;
  overflow-y: auto;
  padding-left: 2px;
}

.archive-dropdown-inner::-webkit-scrollbar {
  width: 4px;
}
.archive-dropdown-inner::-webkit-scrollbar-track {
  background: transparent;
}
.archive-dropdown-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

/* آیتم‌های داخل دراپ‌داون */
.archive-dropdown-option {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  background: transparent;
  border: none;
  border-radius: 10px;
  outline: none;
  cursor: pointer;

  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-align: right;
  transition: all 0.2s ease;
}

.archive-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* آیتم فعال / انتخاب‌شده */
.archive-dropdown-option.is-selected {
  background: color-mix(in srgb, var(--accent-color, #d79c34) 22%, transparent);
  color: #ffffff;
  font-weight: 600;
}

.archive-dropdown-option.is-selected .option-check {
  opacity: 1;
  transform: scale(1);
  color: var(--accent-color, #d79c34);
}

/* آیکون تیک چک‌مارک */
.option-check {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0.6);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* =========================================
   Archive Layout
   ========================================= */

/* =========================================
   Layout اصلی آرشیو
   ========================================= */

.archive-layout {
  width: min(calc(100% - 48px), 1440px);
  margin: 0 auto;
  padding: 64px 0 96px;
  height: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  box-sizing: border-box;
}

/* =========================================
   سایدبار سمت راست
   ========================================= */

.archive-sidebar {
  width: 100%;
  min-width: 0;
  min-height: 260px;
  border-radius: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* =========================================
   سکشن کارت‌های آرشیو سمت چپ
   ========================================= */

.archive-content {
  width: 100%;
  min-width: 0;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);

  box-sizing: border-box;
}

/* =========================================
   وضعیت خالی هنگام توسعه
   ========================================= */

.archive-sidebar:empty {
  min-height: 260px;
}

.archive-content:empty {
  min-height: 600px;
}

/* در صورت نیاز برای مشخص شدن محدوده‌ها */
.archive-sidebar:empty::before,
.archive-content:empty::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
}

/* =========================================
   دسکتاپ کوچک و تبلت بزرگ
   حداکثر دو کارت در هر ردیف
   ========================================= */

@media (max-width: 1200px) {
  .archive-layout {
    width: min(calc(100% - 40px), 1080px);
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 28px;
  }

  .archive-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-sidebar {
    min-height: 240px;
  }
}

/* =========================================
   تبلت
   ========================================= */

@media (max-width: 900px) {
  .archive-layout {
    width: min(calc(100% - 36px), 760px);
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }

  .archive-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .archive-sidebar {
    min-height: 220px;
    border-radius: 18px;
  }
}

/* =========================================
   موبایل
   یک کارت در هر ردیف
   ========================================= */

@media (max-width: 700px) {
  .archive-layout {
    width: min(calc(100% - 32px), 600px);
    margin: 0 auto;
    padding: 40px 0 64px;
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }

  /*
    در موبایل سایدبار بالای کارت‌ها قرار می‌گیرد
  */
  .archive-sidebar {
    order: 1;
    width: 100%;
    min-height: 220px;
  }

  .archive-content {
    order: 2;
    width: 100%;
    min-height: 500px;

    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* =========================================
   موبایل کوچک
   ========================================= */

@media (max-width: 420px) {
  .archive-layout {
    width: calc(100% - 24px);
    padding-top: 32px;
  }

  .archive-sidebar {
    min-height: 200px;
    border-radius: 16px;
  }

  .archive-content {
    gap: 16px;
  }
}

/* Card Styling */
.news-card {
  position: relative;
  background-color: var(--card-glass);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card-image {
  position: relative;
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: var(--bg-secondary);
  backdrop-filter: blur(4px);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.news-card-title {
  font-size: 1.125rem;
  font-weight: 900;
  margin-bottom: 0.3rem;
  padding: 0 0.5rem;
  color: var(--accent-color);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 0.875rem;
  padding: 0 0.5rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 0.5rem 0.5rem 0 0.5rem;
}

.news-read-more {
  width: 120px;
  background: url(/uploads/icroir/icro-fa/assets/images/more-blog-bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  color: #031930;
  transition: background-color 0.3s ease;
}

.news-date {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 500;
}

/* ==========================================================================
   سایدبار چسبان (Sticky) در دسکتاپ
   ========================================================================== */

.archive-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  z-index: 10;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 156, 52, 0.4) transparent;
}

.archive-sidebar::-webkit-scrollbar {
  width: 5px;
}
.archive-sidebar::-webkit-scrollbar-thumb {
  background: rgba(215, 156, 52, 0.4);
  border-radius: 99px;
}

/* ==========================================================================
   کارت‌های سایدبار 
   ========================================================================== */

.sidebar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  box-shadow:
    0 16px 36px -8px rgba(3, 25, 48, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.sidebar-card:hover {
  box-shadow:
    0 20px 44px -6px rgba(3, 25, 48, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.04);
}

/* هدر کارت‌ها */
.sidebar-card__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  background: transparent;
  border: none;
  cursor: default;
  text-align: right;
  box-sizing: border-box;
}

.sidebar-card__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card__ornament {
  color: var(--accent-color, #d79c34);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-color, #031930);
}

/* چورن آکاردئون (در دسکتاپ مخفی است) */
.sidebar-accordion__chevron {
  display: none;
  color: #64748b;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* بدنه آکاردئون */
.sidebar-accordion__body {
  display: block;
}

.sidebar-accordion__content {
  padding: 0 16px 20px;
}

/* ==========================================================================
   ۱. لیست دسته‌بندی‌ها
   ========================================================================== */

.sidebar-categories__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-categories__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  direction: rtl;
  grid-auto-flow: column;
  gap: 12px;
  min-height: 38px;
  padding: 4px 8px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.22s ease;
  cursor: pointer;
}

.sidebar-categories__item:hover {
  background: rgba(40, 160, 164, 0.08);
  border-color: rgba(40, 160, 164, 0.25);
  transform: translateX(-3px);
}

.category-count {
  grid-column: 3;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #28a0a4;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(40, 160, 164, 0.12);
}

.category-name {
  grid-column: 2;
  text-align: right;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-icon {
  grid-column: 1;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(202, 234, 235, 0.16);
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(40, 160, 164, 0.1);
}

.category-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   ۲. پربازدیدترین نوشته‌ها
   ========================================================================== */

.sidebar-popular__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.sidebar-popular__item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 6px;
  border-radius: 16px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.sidebar-popular__item:hover {
  background: rgba(3, 25, 48, 0.04);
  transform: translateY(-2px);
}

.sidebar-popular__thumb {
  width: 64px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.sidebar-popular__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-popular__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.sidebar-popular__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--primary-color, #031930);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-popular__date {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-color, #d79c34);
}

.sidebar-popular__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-color);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 5px var(--accent-color);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.sidebar-popular__btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ==========================================================================
   ۳. بنر نقل‌قول (سنتی / اسلیمی)
   ========================================================================== */

.sidebar-quote-banner:hover .sidebar-quote-banner__bg {
  transform: scale(1.12);
}

.sidebar-quote-banner__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(3, 25, 48, 0.45) 0%,
    rgba(3, 25, 48, 0.85) 100%
  );
}

.sidebar-quote-banner__content {
  position: relative;
  z-index: 2;
  padding: 24px 16px;
}

.sidebar-quote-banner__text {
  margin: 0;
  color: #ffdf88;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.8;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  font-family: inherit;
}

.sidebar-quote-banner {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background-image: url("/uploads/icroir/icro-fa/assets/images/sidebar-banner.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  box-shadow: 0 12px 30px rgba(3, 25, 48, 0.16);
}

/* لایه سرمه‌ای کم‌رنگ روی عکس */
.sidebar-quote-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 48 99 / 73%);
}

/* تصویر اصلی در مرکز بنر */
.sidebar-quote-banner__image {
  position: relative;
  z-index: 1;

  display: block;
  width: min(68%, 150px);
  height: auto;
  max-height: 110px;

  object-fit: contain;
  object-position: center;

  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
}

/* متن اختیاری روی بنر */
.sidebar-quote-banner__content {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 2;

  text-align: center;
}

.sidebar-quote-banner__content p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   تبلت و موبایل: حالت آکاردئونی و ریست Sticky
   ========================================================================== */

@media (max-width: 900px) {
  .archive-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    gap: 16px;
  }

  .sidebar-card__header {
    cursor: pointer;
    user-select: none;
    padding: 16px 18px;
  }

  .sidebar-accordion__chevron {
    display: flex;
  }

  /* انیمیشن آکاردئون با CSS Grid 0fr -> 1fr */
  .sidebar-accordion .sidebar-accordion__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-accordion .sidebar-accordion__content {
    overflow: hidden;
    padding: 0 16px;
  }

  /* حالت باز بودن در موبایل/تبلت */
  .sidebar-accordion.is-open .sidebar-accordion__body {
    grid-template-rows: 1fr;
  }

  .sidebar-accordion.is-open .sidebar-accordion__content {
    padding-bottom: 18px;
  }

  .sidebar-accordion.is-open .sidebar-accordion__chevron {
    transform: rotate(180deg);
  }
}

.archive-pagination {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;

  margin: 20px auto 0;
  padding: 10px 24px;

  direction: rtl;
  background: var(--bg-secondary);
  border: 1px solid rgba(3, 25, 48, 0.08);
  border-radius: 28px;

  box-shadow:
    0 10px 24px rgba(3, 25, 48, 0.06),
    0 2px 8px rgba(3, 25, 48, 0.04);
}

.pagination-pages {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 24px);
  direction: rtl;
}

.pagination-page,
.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 30px;
  height: 38px;

  color: var(--text-primary);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;

  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.pagination-page:hover {
  color: #c48718;
  transform: translateY(-2px);
}
.pagination-arrow {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #c99432;
  text-decoration: none;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.pagination-arrow__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination-prev:hover {
  color: #a96d08;
  transform: translateX(-3px);
}

.pagination-next:hover {
  color: #a96d08;
  transform: translateX(3px);
}

.pagination-page.is-active {
  min-width: 48px;
  height: 48px;

  color: #fff;
  background: #b87508;
  border-radius: 50%;

  box-shadow: 0 5px 12px rgba(184, 117, 8, 0.25);
}

.pagination-dots {
  min-width: auto;
  color: var(--text-primary);
  letter-spacing: 3px;
  pointer-events: none;
}

.pagination-arrow {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #c99432;
  text-decoration: none;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.pagination-arrow span {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 58px;
  font-weight: 300;
  line-height: 30px;
}

.pagination-prev:hover {
  color: #a96d08;
  transform: translateX(-4px);
}

.pagination-next:hover {
  color: #a96d08;
  transform: translateX(4px);
}
@media (max-width: 768px) {
  .archive-pagination {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 20px;
    gap: 6px;
  }

  .pagination-pages {
    gap: 4px;
  }

  .pagination-page,
  .pagination-dots {
    min-width: 28px;
    height: 34px;
    font-size: 15px;
  }

  .pagination-page:nth-child(n + 6):not(.is-active) {
    display: none;
  }

  .pagination-page.is-active {
    min-width: 38px;
    height: 38px;
  }

  .pagination-arrow {
    flex-basis: 30px;
    width: 30px;
    height: 36px;
  }

  .pagination-arrow span {
    font-size: 44px;
  }
}
