/* ── Language switching ─────────────────────────────── */
.lang-en, .lang-ar { display: none; }
[data-lang="en"] .lang-en { display: block; }
[data-lang="ar"] .lang-ar { display: block; }
[data-lang="en"] .lang-en.inline,
[data-lang="ar"] .lang-ar.inline { display: inline; }

/* ── Blog page hero: one compact title only ─────────── */
.blog-page-hero h1 { font-size: 1.45rem; font-weight: 700; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.blog-page-hero p  { font-size: 0.92rem; opacity: 0.82; margin-bottom: 1.3rem; }

/* =====================================================
   blog.css — Sahihli Blog — Modern Design System
   Loads alongside styles.css (inherits CSS variables)
   ===================================================== */

/* ── Blog index hero ───────────────────────────────── */
.blog-page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.blog-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}



/* ── Blog index layout ─────────────────────────────── */
.blog-index-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 2rem;
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* ── Blog card ─────────────────────────────────────── */
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,0.12); }
.blog-card.coming-soon { opacity: 0.6; pointer-events: none; }

/* Card image area */
.blog-card-img-wrap {
  width: 100%;
  aspect-ratio: 16/8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 4rem;
  color: white;
}
.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.04); }
.blog-card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 60%);
}

/* Card body */
.blog-card-body {
  padding: 1.4rem 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  direction: rtl;
  text-align: right;
}
[data-lang="en"] .blog-card-body { direction: ltr; text-align: left; }
.blog-card-cat {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}
.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--foreground);
  margin-bottom: 0.55rem;
  flex: 1;
}
.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted-foreground);
  background: var(--muted);
}
.blog-card-footer .read-more { color: var(--primary); font-weight: 600; font-size: 0.85rem; }
.coming-soon-badge {
  background: var(--muted-foreground);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
}

/* ── Article page ──────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 9999;
  width: 0%;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* Hero */
.article-hero-wrap {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 5rem;
  color: white;
}
.article-hero-wrap svg[style*="position:absolute"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.article-hero-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-hero-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent 50%);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.83rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
[data-lang="ar"] .breadcrumb { direction: rtl; }
[data-lang="en"] .breadcrumb { direction: ltr; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: 0.35; }

/* Article header */
[data-lang="ar"] .article-header { direction: rtl; text-align: right; }
[data-lang="en"] .article-header { direction: ltr; text-align: left; }
.article-category {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
}
.article-title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-bottom: 1rem;
}
.article-subtitle {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.83rem;
  color: var(--muted-foreground);
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.article-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.article-meta svg { width: 13px; height: 13px; opacity: 0.7; }

/* Article body */
.article-body { font-size: 1.05rem; line-height: 2; color: var(--foreground); }
[data-lang="ar"] .article-body { direction: rtl; text-align: right; }
[data-lang="en"] .article-body { direction: ltr; text-align: left; }

.article-body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2.5rem 0 0.9rem;
  letter-spacing: -0.02em;
}
[data-lang="ar"] .article-body h2 {
  border-right: 4px solid var(--primary);
  padding-right: 0.85rem;
}
[data-lang="en"] .article-body h2 {
  border-left: 4px solid var(--primary);
  padding-left: 0.85rem;
}
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin: 0.75rem 0 1.25rem; padding-inline-start: 1.5rem; }
.article-body li { margin-bottom: 0.55rem; }
.article-body a { color: var(--primary); }

/* Callout boxes */
.callout {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.97rem;
  color: #1e3a8a;
  line-height: 1.7;
}
.callout-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 0.1rem; }
.callout.green { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.callout.yellow { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.callout.red { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.93rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
[data-lang="ar"] .comparison-table { direction: rtl; text-align: right; }
[data-lang="en"] .comparison-table { direction: ltr; text-align: left; }
.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
}
.comparison-table td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.comparison-table tr:nth-child(even) td { background: #f9fafb; }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .wrong { color: #dc2626; text-decoration: line-through; opacity: 0.85; }
.comparison-table .right { color: #16a34a; font-weight: 600; }

/* CTA */
.article-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: white;
  border-radius: 14px;
  padding: 2.25rem 2rem;
  text-align: center;
  margin: 3rem 0 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.article-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.12), transparent 60%);
  pointer-events: none;
}
.article-cta h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.6rem; }
.article-cta p { opacity: 0.9; margin-bottom: 1.4rem; font-size: 1rem; }
.cta-btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-family: inherit;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* Tags */
.article-tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
[data-lang="ar"] .article-tags { direction: rtl; }
.article-tags .tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: var(--muted);
  font-size: 0.82rem;
  color: var(--muted-foreground);
  font-weight: 500;
  cursor: default;
}

/* Related */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
[data-lang="ar"] .related-section { direction: rtl; }
.related-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.1rem; }






/* Responsive */
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.45rem; }
  .article-body { font-size: 1rem; }
  .comparison-table { font-size: 0.83rem; }
  .comparison-table th, .comparison-table td { padding: 0.55rem 0.7rem; }
  .article-cta { padding: 1.5rem 1.25rem; }
  .article-page { padding: 1.5rem 1rem 3rem; }
}

/* ── Aliases for article-container / article-hero ── */
.article-container { max-width: 780px; margin: 0 auto; padding: 2rem 1.25rem 5rem; }
.article-hero { width: 100%; aspect-ratio: 16/7; border-radius: 14px; overflow: hidden;
  margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; position: relative; }
.article-hero svg { width: 100%; height: 100%; }




/* ── Related cards look like blog cards ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), box-shadow 0.22s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.11); }
.related-card-img {
  width: 100%; aspect-ratio: 16/7;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: white; overflow: hidden;
}
.related-card-body { padding: 1rem 1.1rem 0.75rem; flex: 1; }
.related-card .rc-cat {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 0.35rem; display: block;
}
.related-card .rc-title { font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.related-card-footer {
  padding: 0.6rem 1.1rem; border-top: 1px solid var(--border);
  font-size: 0.75rem; color: var(--muted-foreground);
  background: var(--muted);
}