/* ─── Blog (مدونة) ─────────────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, #0f2744 0%, #1a3a5c 55%, #0d2137 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
}

.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.blog-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0;
  line-height: 1.7;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.blog-cat-pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  background: #f1f5f9;
  color: #334155;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.blog-cat-pill:hover,
.blog-cat-pill.active {
  background: #0f2744;
  color: #fff;
  border-color: #0f2744;
}

.blog-featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 12px 32px rgba(15, 39, 68, 0.12);
  transform: translateY(-2px);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #e8eef5, #d4dce8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}

.blog-card-image img,
.blog-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image[style*="display: none"],
.blog-article-cover[style*="display: none"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden;
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: #c9a227;
  text-transform: none;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f2744;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #1a5fb4;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card.featured {
  border-color: #c9a227;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.15);
}

/* Article page */
.blog-article-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.blog-breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.blog-breadcrumb a {
  color: #1a5fb4;
  text-decoration: none;
}

.blog-article-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: #0f2744;
  line-height: 1.35;
  margin: 0 0 1rem;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.875rem;
  color: #64748b;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8ecf1;
  margin-bottom: 2rem;
}

.blog-article-cover {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
}

.blog-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-article-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #1e293b;
}

.blog-article-content h2,
.blog-article-content h3 {
  color: #0f2744;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.blog-article-content h2 {
  font-size: 1.35rem;
}

.blog-article-content h3 {
  font-size: 1.15rem;
}

.blog-article-content p {
  margin: 0 0 1.25rem;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: 0 0 1.25rem;
  padding-right: 1.5rem;
}

.blog-article-content li {
  margin-bottom: 0.5rem;
}

.blog-article-content strong {
  color: #0f2744;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8ecf1;
}

.blog-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.blog-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e8ecf1;
}

.blog-related h2 {
  font-size: 1.25rem;
  color: #0f2744;
  margin-bottom: 1.25rem;
}

.blog-search-bar {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.blog-search-bar .form-input {
  flex: 1;
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 2rem 0 1.5rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
