/* ═══════════════════════════════════════════════════════════════════
   Ahmed Elshamy — Blog Styles (blog.css)
   Loads on blog/post/archive pages. Same dark cinematic identity.
   ═══════════════════════════════════════════════════════════════════ */

/* Layout containers */
.ae-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ae-container--narrow { max-width: 800px; }

.ae-blog, .ae-single { padding-top: 110px; min-height: 100vh; position: relative; z-index: 1; }

/* ════════════════════════════════════════════════════════════════════
   BLOG HEADER
   ════════════════════════════════════════════════════════════════════ */
.ae-blog__header {
  position: relative;
  text-align: center;
  padding: 40px 0 48px;
  overflow: hidden;
}
.ae-blog__header-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(179,0,0,0.18), transparent 68%);
  pointer-events: none; z-index: -1;
}
.ae-blog__eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.ae-blog__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, #eaeaea 55%, var(--glow) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ae-blog__subtitle {
  font-size: 1.02rem; color: var(--muted);
  max-width: 560px; margin: 0 auto 28px;
}

/* Category chips */
.ae-blog__cats {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.ae-blog__cat {
  font-size: 0.83rem; font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  padding: 7px 16px; border-radius: 40px;
  transition: all 0.25s;
}
.ae-blog__cat:hover { color: var(--text); border-color: rgba(179,0,0,0.45); background: rgba(179,0,0,0.1); }
.ae-blog__cat.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ════════════════════════════════════════════════════════════════════
   ARTICLE GRID + CARDS
   ════════════════════════════════════════════════════════════════════ */
.ae-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 56px;
}

.ae-article-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), border-color 0.4s, box-shadow 0.4s;
}
.ae-article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(179,0,0,0.4);
  box-shadow: 0 22px 60px rgba(0,0,0,0.4), 0 0 28px rgba(179,0,0,0.08);
}

/* Featured card spans full width, horizontal on desktop */
.ae-article-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}
.ae-article-card--featured .ae-article-card__thumb { width: 52%; aspect-ratio: auto; min-height: 340px; }
.ae-article-card--featured .ae-article-card__body { width: 48%; justify-content: center; padding: 40px; }
.ae-article-card--featured .ae-article-card__title { font-size: 1.7rem; }
.ae-article-card--featured .ae-article-card__excerpt { -webkit-line-clamp: 4; font-size: 1rem; }

/* Thumb */
.ae-article-card__thumb {
  display: block; position: relative;
  aspect-ratio: 16/10; overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(179,0,0,0.22), transparent 60%),
    linear-gradient(135deg, #170000, #0a0000);
}
.ae-article-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.ae-article-card:hover .ae-article-card__thumb img { transform: scale(1.06); }
.ae-article-card__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.12);
}

/* Body */
.ae-article-card__body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.ae-article-card__top { margin-bottom: 12px; }
.ae-post-cat {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff; background: var(--red);
  padding: 4px 12px; border-radius: 6px;
  transition: background 0.25s;
}
.ae-post-cat:hover { background: var(--glow); }

.ae-article-card__title {
  font-size: 1.12rem; font-weight: 700; line-height: 1.45;
  margin-bottom: 10px;
}
.ae-article-card__title a { color: var(--text); transition: color 0.25s; }
.ae-article-card__title a:hover { color: var(--glow); }

.ae-article-card__excerpt {
  font-size: 0.9rem; color: var(--muted); line-height: 1.75;
  margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

.ae-article-card__meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 0.78rem; color: var(--muted);
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07);
}
.ae-article-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ae-article-card__meta svg { opacity: 0.7; }

.ae-article-card__more {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px;
  font-size: 0.85rem; font-weight: 700; color: var(--red);
  transition: gap 0.25s, color 0.25s;
}
.ae-article-card__more svg { transition: transform 0.25s; }
.ae-article-card__more:hover { color: var(--glow); gap: 11px; }
/* In RTL, the arrow points left; flip on hover nicely */
body:not(.lang-en) .ae-article-card__more svg { transform: scaleX(1); }

/* Small related cards */
.ae-article-card--sm .ae-article-card__title { font-size: 0.98rem; }
.ae-article-card--sm .ae-article-card__body { padding: 16px; }

/* ════════════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════════════ */
.ae-blog__pagination {
  display: flex; justify-content: center; gap: 8px;
  margin: 0 0 70px; flex-wrap: wrap;
}
.ae-blog__pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px; font-size: 0.9rem; font-weight: 600;
  color: var(--muted); transition: all 0.25s;
}
.ae-blog__pagination .page-numbers:hover,
.ae-blog__pagination .page-numbers.current {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 0 18px rgba(179,0,0,0.3);
}

.ae-blog__empty { text-align: center; padding: 80px 20px; color: var(--muted); }

/* ════════════════════════════════════════════════════════════════════
   SINGLE ARTICLE
   ════════════════════════════════════════════════════════════════════ */
.ae-single__hero { position: relative; text-align: center; padding: 20px 0 36px; overflow: hidden; }
.ae-single__hero-glow {
  position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 640px; height: 420px;
  background: radial-gradient(circle, rgba(179,0,0,0.16), transparent 68%);
  pointer-events: none; z-index: -1;
}
.ae-single__crumb {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  flex-wrap: wrap;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 20px;
}
.ae-single__crumb a { color: var(--muted); transition: color 0.2s; }
.ae-single__crumb a:hover { color: var(--glow); }
.ae-single__crumb span { color: rgba(255,255,255,0.25); }

.ae-single__cat { margin-bottom: 16px; }

.ae-single__title {
  font-size: clamp(1.7rem, 4.5vw, 2.9rem);
  font-weight: 700; line-height: 1.25;
  margin-bottom: 22px; color: var(--text);
}

.ae-single__meta {
  display: flex; align-items: center; gap: 20px; justify-content: center;
  flex-wrap: wrap;
  font-size: 0.84rem; color: var(--muted);
}
.ae-single__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ae-single__meta svg { opacity: 0.7; }

.ae-single__featured {
  margin: 0 0 40px;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.ae-single__featured img { width: 100%; height: auto; display: block; }

/* ── Article body typography ── */
.ae-article-body {
  font-size: 1.08rem; line-height: 2;
  color: rgba(234,234,234,0.9);
}
/* Keep the SAME font in both languages so the article look never changes.
   Cairo renders Latin text well, so English posts stay visually consistent. */
.ae-article-body,
body.lang-en .ae-article-body,
.ae-single__title,
body.lang-en .ae-single__title {
  font-family: 'Cairo', sans-serif;
}
.ae-article-body > * { margin-bottom: 1.5em; }
.ae-article-body h2 {
  font-size: 1.7rem; font-weight: 700; line-height: 1.4;
  margin: 1.8em 0 0.7em; color: #fff;
  padding-right: 16px; border-right: 4px solid var(--red);
}
body.lang-en .ae-article-body h2 { padding-right: 0; padding-left: 16px; border-right: none; border-left: 4px solid var(--red); }
.ae-article-body h3 {
  font-size: 1.35rem; font-weight: 700;
  margin: 1.6em 0 0.6em; color: #fff;
}
.ae-article-body h4 { font-size: 1.12rem; font-weight: 700; margin: 1.4em 0 0.5em; color: var(--text); }
.ae-article-body p { margin-bottom: 1.4em; }
.ae-article-body a { color: var(--glow); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.ae-article-body a:hover { color: var(--red); }
.ae-article-body strong { color: #fff; font-weight: 700; }
.ae-article-body ul, .ae-article-body ol { padding-inline-start: 26px; margin-bottom: 1.5em; }
.ae-article-body li { margin-bottom: 0.6em; }
.ae-article-body ul li::marker { color: var(--red); }
.ae-article-body ol li::marker { color: var(--red); font-weight: 700; }
.ae-article-body img, .ae-article-body figure { border-radius: var(--radius); margin: 1.8em auto; max-width: 100%; height: auto; }
.ae-article-body blockquote {
  border-right: 4px solid var(--red);
  background: rgba(179,0,0,0.07);
  padding: 18px 24px; margin: 1.8em 0;
  border-radius: 0 12px 12px 0;
  font-size: 1.1rem; font-style: italic; color: var(--text);
}
body.lang-en .ae-article-body blockquote { border-right: none; border-left: 4px solid var(--red); border-radius: 12px 0 0 12px; }
.ae-article-body code {
  background: rgba(255,255,255,0.08); padding: 3px 8px; border-radius: 5px;
  font-family: 'Courier New', monospace; font-size: 0.9em; color: var(--glow);
}
.ae-article-body pre {
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 22px; overflow-x: auto;
  margin: 1.8em 0; font-size: 0.92em; line-height: 1.7; direction: ltr; text-align: left;
}
.ae-article-body pre code { background: none; padding: 0; color: #e0e0e0; }
.ae-article-body hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 2.4em 0; }
.ae-article-body table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.95rem; }
.ae-article-body th, .ae-article-body td { border: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; text-align: start; }
.ae-article-body th { background: rgba(179,0,0,0.15); font-weight: 700; color: #fff; }

/* ── Tags ── */
.ae-single__tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 36px 0 0; }
.ae-single__tag {
  font-size: 0.8rem; color: var(--muted);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  padding: 6px 14px; border-radius: 40px; transition: all 0.25s;
}
.ae-single__tag:hover { color: var(--text); border-color: rgba(179,0,0,0.45); }

/* ── Share row ── */
.ae-single__share {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 32px 0; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ae-single__share-label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.ae-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--text);
  cursor: pointer; font-family: inherit; font-size: 0.78rem;
  transition: all 0.25s;
}
.ae-share-btn--wa:hover { background: #25D366; border-color: #25D366; color: #fff; transform: translateY(-2px); }
.ae-share-btn--x:hover  { background: #000; border-color: #555; color: #fff; transform: translateY(-2px); }
.ae-share-btn--fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; transform: translateY(-2px); }
.ae-share-btn--copy { width: auto; padding: 0 16px; font-weight: 600; color: var(--muted); }
.ae-share-btn--copy:hover { border-color: var(--red); color: var(--text); }

/* ════════════════════════════════════════════════════════════════════
   AUTO WHATSAPP CARD
   ════════════════════════════════════════════════════════════════════ */
.ae-wa-card {
  position: relative;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  margin: 48px 0;
  padding: 32px 34px;
  background: linear-gradient(135deg, rgba(37,211,102,0.10), rgba(179,0,0,0.06));
  border: 1px solid rgba(37,211,102,0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ae-wa-card__glow {
  position: absolute; top: -80px; inset-inline-end: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(37,211,102,0.18), transparent 70%);
  pointer-events: none;
}
.ae-wa-card__icon {
  flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  box-shadow: 0 8px 28px rgba(37,211,102,0.35);
  position: relative; z-index: 1;
}
.ae-wa-card__body { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.ae-wa-card__title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.ae-wa-card__desc { font-size: 0.92rem; color: rgba(234,234,234,0.8); line-height: 1.6; }
.ae-wa-card__btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 50px;
  background: #25D366; color: #fff;
  font-size: 0.92rem; font-weight: 700; white-space: nowrap;
  position: relative; z-index: 1;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.ae-wa-card__btn:hover {
  background: #1ebe5b; transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37,211,102,0.45);
}

/* ════════════════════════════════════════════════════════════════════
   RELATED POSTS
   ════════════════════════════════════════════════════════════════════ */
.ae-related { margin: 56px 0 40px; }
.ae-related__title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 26px;
  display: flex; align-items: center; gap: 12px;
}
.ae-related__title::before {
  content: ''; display: block; width: 5px; height: 26px;
  background: linear-gradient(180deg, var(--red), var(--glow));
  border-radius: 3px; box-shadow: 0 0 12px rgba(179,0,0,0.5);
}
.ae-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ── Comments ── */
.ae-single__comments { margin: 56px 0 80px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.08); }
.ae-single__comments input[type="text"],
.ae-single__comments input[type="email"],
.ae-single__comments input[type="url"],
.ae-single__comments textarea {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; color: var(--text); font-family: inherit; font-size: 0.95rem;
  outline: none; transition: border-color 0.25s; margin-bottom: 14px;
}
.ae-single__comments input:focus, .ae-single__comments textarea:focus { border-color: var(--red); }
.ae-single__comments .submit {
  background: var(--red); color: #fff; border: none;
  padding: 12px 30px; border-radius: 50px; font-family: inherit;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.25s;
}
.ae-single__comments .submit:hover { background: var(--glow); box-shadow: 0 0 20px rgba(255,42,42,0.4); }
.ae-single__comments .comment-list { list-style: none; padding: 0; }
.ae-single__comments .comment-list li { margin-bottom: 20px; }
.ae-single__pagelinks { margin-top: 24px; display: flex; gap: 8px; }

/* ════════════════════════════════════════════════════════════════════
   REVEAL animation (reuse)
   ════════════════════════════════════════════════════════════════════ */
.ae-blog .ae-reveal, .ae-single .ae-reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.ae-blog .ae-reveal.is-visible, .ae-single .ae-reveal.is-visible { opacity: 1; transform: none; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .ae-blog__grid { grid-template-columns: repeat(2, 1fr); }
  .ae-related__grid { grid-template-columns: repeat(2, 1fr); }
  .ae-article-card--featured { flex-direction: column; }
  .ae-article-card--featured .ae-article-card__thumb,
  .ae-article-card--featured .ae-article-card__body { width: 100%; }
  .ae-article-card--featured .ae-article-card__thumb { aspect-ratio: 16/9; min-height: 0; }
  .ae-article-card--featured .ae-article-card__body { padding: 26px; }
  .ae-article-card--featured .ae-article-card__title { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .ae-blog, .ae-single { padding-top: 90px; }
  .ae-container { padding: 0 18px; }
  .ae-wa-card { padding: 26px 22px; gap: 18px; }
  .ae-wa-card__btn { width: 100%; justify-content: center; }
  .ae-article-body { font-size: 1.02rem; line-height: 1.9; }
  .ae-article-body h2 { font-size: 1.4rem; }
  .ae-article-body h3 { font-size: 1.2rem; }
}

@media (max-width: 600px) {
  .ae-blog__grid { grid-template-columns: 1fr; }
  .ae-related__grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   STANDARD PAGES (About / Contact / Privacy / Terms)
   ═══════════════════════════════════════════════════════════════════ */
.ae-page { padding-top: 110px; min-height: 100vh; position: relative; z-index: 1; }

.ae-page__hero {
  position: relative; text-align: center;
  padding: 30px 0 40px; overflow: hidden;
}
.ae-page__hero-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 380px;
  background: radial-gradient(circle, rgba(179,0,0,0.16), transparent 68%);
  pointer-events: none; z-index: -1;
}
.ae-page__eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.12em; color: var(--red); margin-bottom: 14px;
}
.ae-page__title {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.2;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, #eaeaea 55%, var(--glow) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.ae-page__subtitle {
  font-size: 1.02rem; color: var(--muted); max-width: 560px; margin: 0 auto;
}
.ae-page__content { padding: 20px 0 40px; }

/* ═══════════════════════════════════════════════════════════════════
   CONTACT METHODS (Contact page)
   ═══════════════════════════════════════════════════════════════════ */
.ae-contact-methods {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  margin: 30px 0 10px;
}
.ae-contact-method {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 24px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
a.ae-contact-method:hover {
  transform: translateY(-4px);
  border-color: rgba(179,0,0,0.4);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35), 0 0 24px rgba(179,0,0,0.08);
  background: rgba(255,255,255,0.05);
}
.ae-contact-method__icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--deep-red));
  color: #fff; margin-bottom: 6px;
  box-shadow: 0 6px 20px rgba(179,0,0,0.3);
}
.ae-contact-method__label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.ae-contact-method__value { font-size: 1rem; color: var(--text); font-weight: 700; word-break: break-word; }

@media (max-width: 600px) {
  .ae-contact-methods { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   BILINGUAL PAGE CONTENT (About/Contact/Privacy/Terms default content)
   Show Arabic by default, English when body has .lang-en
   ═══════════════════════════════════════════════════════════════════ */
.ae-lang-en { display: none; }
body.lang-en .ae-lang-ar { display: none; }
body.lang-en .ae-lang-en { display: block; }
/* Keep English page content in Cairo too, so the look stays consistent */
body.lang-en .ae-page__content,
body.lang-en .ae-page__content * { font-family: 'Cairo', sans-serif; }
