/* ============================================================
   Blocksy Theme — Articles Archive
   Classes match archive-articles.php exactly
   ============================================================ */

/* ── Hero Section ── */
.articles-hero {
  position: relative;
  background: linear-gradient(135deg, var(--blk-color-dark, #0f172a) 0%, #1e3a8a 60%, #312e81 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.articles-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.articles-hero-content {
  position: relative;
  text-align: center;
}

.articles-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.articles-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.articles-hero-content > p {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.articles-hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.articles-hero-stat {
  text-align: center;
}

.articles-hero-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.articles-hero-stat-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ── Filters Bar ── */
.articles-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: var(--blk-color-surface, #fff);
  border: 1px solid var(--blk-color-border, #e2e8f0);
  border-radius: var(--blk-radius-xl, 16px);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.articles-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.articles-search-wrap .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blk-color-text-muted, #94a3b8);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.articles-search-input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border: 1.5px solid var(--blk-color-border, #e2e8f0);
  border-radius: var(--blk-radius-lg, 12px);
  font-size: 0.875rem;
  background: var(--blk-color-bg, #f8fafc);
  color: var(--blk-color-text, #1e293b);
  transition: border-color 0.2s;
  direction: rtl;
}

.articles-search-input:focus {
  outline: none;
  border-color: var(--blk-color-primary, #1e40af);
  background: #fff;
}

.articles-filter-select {
  padding: 10px 14px;
  border: 1.5px solid var(--blk-color-border, #e2e8f0);
  border-radius: var(--blk-radius-lg, 12px);
  font-size: 0.875rem;
  background: var(--blk-color-bg, #f8fafc);
  color: var(--blk-color-text, #1e293b);
  cursor: pointer;
  direction: rtl;
  min-width: 150px;
}

.articles-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--blk-color-primary, #1e40af);
  color: #fff;
  border: none;
  border-radius: var(--blk-radius-lg, 12px);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.articles-filter-btn:hover {
  background: var(--blk-color-primary-hover, #1d3ba0);
}

/* ── Active Filters ── */
.articles-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.articles-active-filters-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blk-color-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.articles-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--blk-color-primary-light, #dbeafe);
  color: var(--blk-color-primary, #1e40af);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}

.articles-filter-chip a {
  color: inherit !important;
  text-decoration: none;
  opacity: 0.7;
}

.articles-filter-chip a:hover { opacity: 1; }

.articles-clear-filters {
  font-size: 0.78rem;
  color: var(--blk-color-text-muted, #64748b);
  text-decoration: underline;
}

/* ── Results Info ── */
.articles-results-info {
  margin-bottom: 1.5rem;
}

.articles-results-count {
  font-size: 0.875rem;
  color: var(--blk-color-text-muted, #64748b);
}

/* ── Articles Grid ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* ── Article Card ── */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--blk-color-surface, #fff);
  border: 1px solid var(--blk-color-border, #e2e8f0);
  border-radius: var(--blk-radius-xl, 16px);
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.article-card:hover {
  box-shadow: 0 8px 30px rgba(30,64,175,0.12);
  transform: translateY(-3px);
  border-color: var(--blk-color-primary-light, #bfdbfe);
}

.article-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.article-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.article-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--blk-color-bg, #f1f5f9);
  color: var(--blk-color-text-muted, #64748b);
  border: 1px solid var(--blk-color-border, #e2e8f0);
}

.article-card-badge.category {
  background: var(--blk-color-primary-light, #dbeafe);
  color: var(--blk-color-primary, #1e40af);
  border-color: transparent;
}

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blk-color-text, #1e293b);
  line-height: 1.4;
  margin: 0;
}

.article-card:hover .article-card-title {
  color: var(--blk-color-primary, #1e40af);
}

.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--blk-color-text-muted, #64748b);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--blk-color-border-light, #f1f5f9);
  font-size: 0.75rem;
  color: var(--blk-color-text-muted, #94a3b8);
  flex-wrap: wrap;
}

.article-card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
}

.article-card-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.article-card-author-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.article-card-author-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blk-color-primary, #1e40af);
}

/* ── Empty State ── */
.articles-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.articles-empty .empty-icon {
  font-size: 3.5rem;
  color: var(--blk-color-border, #cbd5e1);
  display: block;
  margin-bottom: 1rem;
}

.articles-empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--blk-color-text, #1e293b);
}

.articles-empty p {
  color: var(--blk-color-text-muted, #64748b);
  margin-bottom: 1.5rem;
  max-width: 420px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .articles-filters-bar { flex-direction: column; align-items: stretch; }
  .articles-search-wrap { min-width: unset; }
}
