/* =========================================================================
   آرشیو اخبار و مقالات — از همان Design Tokens صفحه اصلی استفاده می‌کند
   ========================================================================= */

/* --- Hero + Breadcrumb --- */
.hz-news-hero { position: relative; min-block-size: 300px; display: flex; align-items: center; overflow: hidden; }
.hz-news-hero__media { position: absolute; inset: 0; }
.hz-news-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hz-news-hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(4,26,15,0.82) 0%, rgba(4,26,15,0.55) 100%); }
.hz-news-hero__content { position: relative; z-index: 2; color: #fff; padding-block: 48px; max-width: 720px; }
.hz-news-hero__content h1 { font-size: clamp(24px, 3vw, 36px); margin-block: 12px; }
.hz-news-hero__content p { color: rgba(255,255,255,0.9); font-size: 15px; }

.hz-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.75); }
.hz-breadcrumb a { color: rgba(255,255,255,0.9); }
.hz-breadcrumb a:hover { text-decoration: underline; }
.hz-breadcrumb span[aria-current] { color: #fff; }
.hz-breadcrumb--on-dark { margin-block-end: 14px; }

/* --- Category Tabs --- */
.hz-category-tabs { background: #fff; border-block-end: 1px solid var(--color-border); position: sticky; inset-block-start: 0; z-index: 40; }
.hz-category-tabs__scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-block: 14px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.hz-category-tabs__scroll::-webkit-scrollbar { display: none; }
.hz-category-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--color-border); font-size: 13.5px; font-weight: 600; color: var(--color-text);
  white-space: nowrap; flex-shrink: 0; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.hz-category-tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.hz-category-tab.is-active, .hz-category-tab--all.is-active {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}

/* --- Featured --- */
.hz-news-featured { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; padding-block: 40px 32px; }
.hz-news-featured__main { position: relative; border-radius: var(--radius-base); overflow: hidden; box-shadow: var(--shadow-md); }
.hz-news-featured__main-link { position: relative; min-block-size: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
.hz-news-featured__main-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hz-news-featured__overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,26,15,0.92) 0%, rgba(4,26,15,0.3) 55%, rgba(4,26,15,0.15) 100%); }
.hz-news-featured__badges { position: absolute; inset-block-start: 16px; inset-inline-start: 16px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.hz-news-featured__text { position: relative; z-index: 2; color: #fff; padding: 28px; }
.hz-news-featured__text h2 { font-size: clamp(19px, 2.2vw, 26px); margin-block-end: 10px; line-height: 1.5; }
.hz-news-featured__text p { color: rgba(255,255,255,0.88); font-size: 14px; margin-block-end: 16px; max-width: 90%; }
.hz-news-featured__meta { display: flex; gap: 16px; font-size: 12.5px; color: rgba(255,255,255,0.8); margin-block-end: 16px; }

.hz-news-featured__side { display: flex; flex-direction: column; gap: 16px; }
.hz-news-side-card { display: flex; gap: 12px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-base); overflow: hidden; flex: 1; box-shadow: var(--shadow-sm); }
.hz-news-side-card__media { position: relative; flex-shrink: 0; width: 130px; }
.hz-news-side-card__media img { width: 100%; height: 100%; object-fit: cover; min-block-size: 100px; }
.hz-news-side-card__body { padding: 12px 14px 12px 4px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hz-news-side-card__body h3 { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.hz-news-side-card__body h3 a:hover { color: var(--color-accent); }
.hz-news-side-card__date { font-size: 12px; color: var(--color-text-muted); }

/* --- Badges (نوع محتوا + دسته‌بندی) --- */
.hz-news-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; color: #fff; backdrop-filter: blur(3px);
}
.hz-news-badge--news { background: rgba(14,84,45,0.88); }
.hz-news-badge--article { background: #7c3aed; box-shadow: 0 2px 8px rgba(124,58,237,0.4); } /* واضح‌ترین Badge طبق بریف */
.hz-news-badge--report { background: rgba(14,116,144,0.9); }
.hz-news-badge--announcement { background: rgba(217,119,6,0.9); }
.hz-news-badge--sm { font-size: 10.5px; padding: 4px 8px; }

/* دسته‌بندی‌ها: ۶ رنگ چرخشی خودکار بر اساس شناسه دسته (بدون نیاز به تنظیم دستی) */
.hz-news-badge--cat-1 { background: rgba(20,83,45,0.9); }
.hz-news-badge--cat-2 { background: rgba(14,116,144,0.9); }
.hz-news-badge--cat-3 { background: rgba(120,53,15,0.85); }
.hz-news-badge--cat-4 { background: rgba(30,142,86,0.9); }
.hz-news-badge--cat-5 { background: rgba(190,24,93,0.85); }
.hz-news-badge--cat-6 { background: rgba(202,138,4,0.9); }

.hz-news-card__category {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  padding: 3px 0; margin-block-end: 8px; color: var(--color-accent);
}
.hz-news-card__category--cat-1 { color: #14532d; }
.hz-news-card__category--cat-2 { color: #0e7490; }
.hz-news-card__category--cat-3 { color: #78350f; }
.hz-news-card__category--cat-4 { color: #1e8e56; }
.hz-news-card__category--cat-5 { color: #be185d; }
.hz-news-card__category--cat-6 { color: #ca8a04; }

/* --- Search + Filters --- */
.hz-news-filters {
  display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius-base); padding: 14px 16px; margin-block-end: 32px;
}
.hz-news-search { display: flex; align-items: center; gap: 8px; flex: 1 1 180px; min-width: 160px; color: var(--color-text-muted); padding-inline: 4px; }
.hz-news-search input { flex: 1; min-width: 0; border: none; outline: none; font-family: inherit; font-size: 14px; background: transparent; }
.hz-news-filters select {
  padding: 9px 10px; border: 1px solid var(--color-border); border-radius: 8px; font-family: inherit; font-size: 12.5px; background: #fff; min-width: 0; flex-shrink: 1;
}
.hz-news-filters__submit { flex-shrink: 0; }
.hz-news-filters__clear { font-size: 12.5px; color: var(--color-text-muted); text-decoration: underline; flex-shrink: 0; }

/* --- Grid + Layout --- */
.hz-news-archive__layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; padding-block-end: 60px; }
.hz-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.hz-news-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-base);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s ease, transform .25s ease;
  display: flex; flex-direction: column;
}
.hz-news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.hz-news-card__media { position: relative; display: block; aspect-ratio: 4/2.6; overflow: hidden; }
.hz-news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hz-news-card:hover .hz-news-card__media img { transform: scale(1.06); }
.hz-news-card__badges { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; }
.hz-news-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.hz-news-card__body h3 { font-size: 15.5px; line-height: 1.6; margin: 0 0 8px; }
.hz-news-card__body h3 a:hover { color: var(--color-accent); }
.hz-news-card__excerpt { font-size: 13px; color: var(--color-text-muted); margin-block-end: 14px; flex: 1; }
.hz-news-card__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-text-muted); padding-block-start: 12px; border-block-start: 1px dashed var(--color-border); margin-block-start: auto; }

/* --- Sidebar Widgets --- */
.hz-news-archive__sidebar { display: flex; flex-direction: column; gap: 20px; }
.hz-news-widget { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-base); padding: 20px; }
.hz-news-widget__title { font-size: 15px; color: var(--color-primary); margin: 0 0 16px; }

.hz-popular-list { display: grid; gap: 14px; }
.hz-popular-list__item { display: flex; align-items: center; gap: 10px; }
.hz-popular-list__rank { font-size: 22px; font-weight: 800; color: var(--color-bg-alt); -webkit-text-stroke: 1px var(--color-accent); flex-shrink: 0; width: 32px; }
.hz-popular-list__thumb { flex-shrink: 0; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; }
.hz-popular-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hz-popular-list__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hz-popular-list__text a { font-size: 13px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hz-popular-list__text a:hover { color: var(--color-accent); }
.hz-popular-list__date { font-size: 11.5px; color: var(--color-text-muted); }

.hz-latest-articles { display: grid; gap: 14px; }
.hz-latest-articles__item { display: flex; gap: 10px; }
.hz-latest-articles__thumb { flex-shrink: 0; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; }
.hz-latest-articles__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hz-latest-articles__text { min-width: 0; }
.hz-latest-articles__text > a { font-size: 13px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hz-latest-articles__text > a:hover { color: var(--color-accent); }
.hz-latest-articles__meta { display: flex; gap: 6px; font-size: 11px; color: var(--color-text-muted); margin-block-start: 4px; }

.hz-newsletter-widget { background: var(--color-primary-dark); color: #fff; }
.hz-newsletter-widget .hz-news-widget__title { color: #fff; }
.hz-newsletter-widget p { font-size: 13px; color: rgba(255,255,255,0.8); margin-block-end: 16px; }
.hz-newsletter-form input { width: 100%; padding: 11px 14px; border-radius: 8px; border: none; margin-block-end: 10px; font-family: inherit; }
.hz-newsletter-form__msg { font-size: 12.5px; margin-block-start: 10px; }

/* --- Pagination --- */
.hz-archive-pagination { display: flex; justify-content: center; gap: 8px; margin-block-start: 36px; flex-wrap: wrap; }
.hz-archive-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding-inline: 10px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 13.5px; color: var(--color-text); background: #fff; }
.hz-archive-pagination .page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.hz-archive-pagination .page-numbers:hover:not(.current) { background: var(--color-bg-alt); }
.hz-archive-pagination .dots { border: none; }

/* --- Empty State --- */
.hz-news-empty-state { text-align: center; padding-block: 60px; }
.hz-news-empty-state__icon { font-size: 40px; display: block; margin-block-end: 16px; }
.hz-news-empty-state h3 { color: var(--color-primary); font-size: 18px; margin-block-end: 8px; }
.hz-news-empty-state p { color: var(--color-text-muted); margin-block-end: 20px; }

/* --- Skeleton Loading (برای توسعه آینده جستجوی AJAX — بخش ۲۳ بریف) --- */
.hz-news-card--skeleton .hz-news-card__media,
.hz-news-card--skeleton .hz-skeleton-line {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, #eef3ef 37%, var(--color-bg-alt) 63%);
  background-size: 400% 100%; animation: hz-skeleton-shimmer 1.4s ease infinite;
}
.hz-news-card--skeleton .hz-skeleton-line { height: 12px; border-radius: 4px; margin-block-end: 8px; }
@keyframes hz-skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --- صفحه اختصاصی خبر/مقاله --- */
.hz-single-news-hero { min-block-size: 340px; }
.hz-single-news-meta { display: flex; gap: 18px; flex-wrap: wrap; color: rgba(255,255,255,0.85); font-size: 13px; margin-block-start: 8px; }
.hz-single-news-content { font-size: 16px; }
.hz-single-news-content p { margin-block-end: 16px; }
.hz-single-news-content img { border-radius: var(--radius-base); margin-block: 16px; }

.hz-share-bar { display: flex; align-items: center; gap: 10px; margin-block-start: 32px; padding-block-start: 24px; border-block-start: 1px solid var(--color-border); }
.hz-share-bar__label { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.hz-share-btn {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; border: none; cursor: pointer;
}
.hz-share-btn--whatsapp { background: #25d366; }
.hz-share-btn--telegram { background: #229ed9; }
.hz-share-btn--facebook { background: #1877f2; }
.hz-share-btn--x { background: #000; }
.hz-share-btn--copy { background: var(--color-bg-alt); color: var(--color-text); font-size: 14px; }

/* =========================================================================
   Responsive — بخش ۲۷، ۲۸، ۲۹ بریف
   ========================================================================= */
@media (max-width: 1023px) {
  .hz-news-featured { grid-template-columns: 1fr; }
  .hz-news-featured__side { flex-direction: row; }
  .hz-news-grid { grid-template-columns: repeat(2, 1fr); }
  .hz-news-archive__layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .hz-news-hero { min-block-size: 220px; }
  .hz-news-featured__side { flex-direction: column; }
  .hz-news-side-card { flex-direction: row; }
  .hz-news-grid { grid-template-columns: 1fr; }
  .hz-news-filters { flex-direction: column; align-items: stretch; }
  .hz-news-filters select { width: 100%; }
  .hz-news-featured__text { padding: 20px; }
  .hz-single-news-hero { min-block-size: 260px; }
}
