/* ═══════════════════════════════════════════
   blog.css — صفحات المدونة
═══════════════════════════════════════════ */

/* ── Hero ── */
.blog-hero {
  padding: 9rem 0 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--bg);
}
.blog-hero-content { position: relative; z-index: 1; }
.blog-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 1rem 0;
  line-height: 1.1;
}
.blog-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Search ── */
.blog-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.blog-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.blog-search svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.blog-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  direction: rtl;
}
.blog-search input::placeholder { color: var(--text-dim); }

/* ── Content ── */
.blog-content {
  padding: 3rem 0 5rem;
  background: var(--bg);
}

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

.blog-count {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* ── Full Grid ── */
.blog-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── Blog Card Full ── */
.blog-card-full {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.blog-card-full:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(99,102,241,0.14);
  border-color: rgba(99,102,241,0.3);
}

.bcf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bcf-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.bcf-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bcf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* ── Empty ── */
.blog-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-dim);
}
.blog-empty span { font-size: 3.5rem; display: block; margin-bottom: 1rem; }
.blog-empty h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-muted); }
.blog-empty p { margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ══════════════════════════════════════════════
   POST PAGE
══════════════════════════════════════════════ */
.post-page {
  padding: 7rem 0 5rem;
  min-height: 100vh;
  background: var(--bg);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.2s, gap 0.2s;
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { color: var(--accent-light); gap: 0.75rem; }

.post-article {
  padding: 2.5rem;
  margin-bottom: 3rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.post-header { margin-bottom: 1.5rem; }

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.post-divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* محتوى المقال */
.post-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-muted);
  direction: rtl;
}
.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 1rem;
}
.post-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}
.post-body p { margin-bottom: 1.25rem; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body ul, .post-body ol {
  padding-right: 1.5rem;
  margin-bottom: 1.25rem;
}
.post-body li { margin-bottom: 0.5rem; }
.post-body a { color: var(--accent-light); text-decoration: underline; }

/* الكاتب */
.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.post-author-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--neon));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: white;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow);
}
.post-author strong { display: block; font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.post-author p { font-size: 0.8rem; color: var(--text-muted); }

/* مقالات ذات صلة */
.related-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .post-article { padding: 1.5rem; }
  .blog-grid-full { grid-template-columns: 1fr; }
}
