/* ================================================================
   blog.css — Blog article styles for hamzabenmalek.com
   ================================================================ */

/* ── Article layout ── */
.blog-page main {
  padding-top: 80px;
}

.article-hero {
  background: linear-gradient(180deg, rgba(108,71,255,0.06) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 60px 24px 48px;
}

.article-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
  font-weight: 500;
}
.article-back:hover { color: var(--text, #f0f0f0); }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.article-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(108,71,255,0.15);
  border: 1px solid rgba(108,71,255,0.3);
  color: #9B7BFF;
}

.article-tag.tag-green {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.3);
  color: #34D399;
}

.article-h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  margin-top: 20px;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Article body ── */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  font-size: 1rem;
  line-height: 1.8;
  color: #d0d0d0;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #f0f0f0;
  margin: 48px 0 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(108,71,255,0.2);
  line-height: 1.3;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0e0e0;
  margin: 28px 0 12px;
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.article-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c0c0c0;
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.82rem;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-body strong {
  color: #f0f0f0;
  font-weight: 600;
}

.article-body em {
  font-style: italic;
  color: #aaa;
}

.article-body a {
  color: #9B7BFF;
  text-decoration: underline;
  text-decoration-color: rgba(155,123,255,0.3);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-body a:hover {
  color: #bba3ff;
  text-decoration-color: rgba(155,123,255,0.6);
}

.article-body a.green-link {
  color: #34D399;
  text-decoration-color: rgba(52,211,153,0.3);
}
.article-body a.green-link:hover {
  color: #6ee7b7;
  text-decoration-color: rgba(52,211,153,0.6);
}

/* ── Highlight box ── */
.highlight-box {
  background: rgba(108,71,255,0.08);
  border: 1px solid rgba(108,71,255,0.25);
  border-left: 3px solid #6C47FF;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 0.92rem;
  color: #c0b8ff;
  line-height: 1.7;
}

.highlight-box.green {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.25);
  border-left-color: #10B981;
  color: #86efac;
}

.highlight-box.yellow {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.2);
  border-left-color: #FBBF24;
  color: #fde68a;
}

.highlight-box.red {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
  border-left-color: #EF4444;
  color: #fca5a5;
}

/* ── Comparison table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.875rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.comparison-table thead tr {
  background: rgba(108,71,255,0.15);
}

.comparison-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9B7BFF;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.comparison-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #c0c0c0;
  vertical-align: middle;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

.comparison-table tbody tr.winner td {
  background: rgba(16,185,129,0.05);
}

.comparison-table tbody tr.winner td:first-child {
  font-weight: 700;
  color: #34D399;
}

.check { color: #10B981; font-weight: 700; }
.cross { color: #EF4444; font-weight: 700; }
.partial { color: #FBBF24; font-weight: 700; }

/* ── Additif status badges ── */
.status-halal {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16,185,129,0.15);
  color: #34D399;
  border: 1px solid rgba(16,185,129,0.25);
}

.status-haram {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
}

.status-douteux {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(251,191,36,0.12);
  color: #fcd34d;
  border: 1px solid rgba(251,191,36,0.25);
}

/* ── CTA box ── */
.article-cta {
  background: linear-gradient(135deg, rgba(108,71,255,0.2) 0%, rgba(16,185,129,0.15) 100%);
  border: 1px solid rgba(108,71,255,0.3);
  border-radius: 16px;
  padding: 36px 32px;
  margin: 48px 0 0;
  text-align: center;
}

.article-cta h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #f0f0f0;
  letter-spacing: -0.4px;
}

.article-cta p {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-cta-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10B981;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-cta-green:hover {
  background: #0ea271;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.btn-cta-purple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #6C47FF;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-cta-purple:hover {
  background: #5535e0;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

/* ── Related articles ── */
.related-articles {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 52px 24px 60px;
  max-width: 720px;
  margin: 0 auto;
}

.related-articles h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 18px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
  display: block;
}
.related-card:hover {
  border-color: rgba(108,71,255,0.3);
  background: rgba(108,71,255,0.05);
  color: inherit;
  text-decoration: none;
}

.related-card .related-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9B7BFF;
  margin-bottom: 8px;
}

.related-card p {
  font-size: 0.875rem;
  font-weight: 600;
  color: #d0d0d0;
  line-height: 1.4;
  margin: 0;
}

/* ── Table of contents ── */
.toc {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 14px;
}

.toc ol {
  padding-left: 20px;
  margin: 0;
}

.toc li {
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.toc a {
  color: #9B7BFF;
  text-decoration: none;
  transition: color 0.2s;
}
.toc a:hover { color: #bba3ff; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .article-body {
    padding: 36px 18px 60px;
    font-size: 0.95rem;
  }
  .article-hero { padding: 48px 18px 36px; }
  .article-cta { padding: 28px 20px; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th,
  .comparison-table td { padding: 10px 10px; }
}
