/* ==========================================================================
   Mumaken — blog.css
   Styles for /blog/ (index) and /blog/<slug>/ (article), matching
   Blog Page.pdf. Unlike the landing page (a scaled 1728px Figma canvas),
   these pages are normal responsive RTL documents, because article
   length varies.

   Brand tokens (from ui-v1/style.css):
     Navy deep : #081728   (header, footer, dark sections)
     Navy mid  : #0f3460   (buttons, secondary panels)
     Orange    : #d4820a   (accent, headings, CTA)
     Cream     : #fdf8f2 / #f5e6c8
   ========================================================================== */

:root {
  --b-navy: #081728;
  --b-navy-mid: #0f3460;
  --b-orange: #d4820a;
  --b-cream: #fdf8f2;
  --b-cream-2: #f5e6c8;
  --b-white: #ffffff;

  --font-200: "ZainMobVariable200-ZainMobVariable200", "ZainMob", "Zain-Regular", system-ui, sans-serif;
  --font-400: "ZainMobVariable400-ZainMobVariable400", "ZainMob", "Zain-Regular", system-ui, sans-serif;
  --font-600: "ZainMobVariable600-ZainMobVariable600", "ZainMob", "Zain-ExtraBold", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; border: none; cursor: pointer; }

html { scroll-behavior: smooth; }
body {
  background: var(--b-white);
  color: var(--b-navy);
  font-family: var(--font-400);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

.container { width: min(1120px, 92%); margin-inline: auto; }

/* ─── Header (matches the landing navy bar) ────────────────────────── */

.blog-header {
  background: var(--b-navy);
  position: sticky;
  top: 0;
  z-index: 50;
}
.blog-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 84px;
}
.blog-header__logo img { height: 44px; width: auto; }
.blog-header__nav {
  display: flex;
  gap: 20px;
  margin-inline-start: 16px;
}
.blog-header__nav a {
  color: var(--b-white);
  font-family: var(--font-200);
  font-size: 18px;
  white-space: nowrap;
  transition: color .15s ease;
}
.blog-header__nav a:hover,
.blog-header__nav a[aria-current="page"] { color: var(--b-orange); }
.blog-header__cta {
  margin-inline-start: auto;
  background: var(--b-white);
  color: var(--b-orange);
  font-family: var(--font-200);
  font-size: 18px;
  border-radius: 8px;
  padding: 10px 26px;
  white-space: nowrap;
}

/* Mobile nav */
.blog-header__burger {
  display: none;
  margin-inline-start: auto;
  background: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.blog-header__burger span {
  width: 24px; height: 2px; background: var(--b-white); display: block;
}
.blog-mobile-nav {
  display: none;
  background: var(--b-navy);
  padding: 8px 0 20px;
}
.blog-mobile-nav a {
  display: block;
  color: var(--b-white);
  font-family: var(--font-200);
  font-size: 20px;
  padding: 10px 6%;
}
.blog-mobile-nav.is-open { display: block; }

@media (max-width: 900px) {
  .blog-header__nav, .blog-header__cta { display: none; }
  .blog-header__burger { display: flex; }
}

/* ─── Article ──────────────────────────────────────────────────────── */

.article { padding: 56px 0 40px; }

.article__head { text-align: center; margin-bottom: 40px; }
.article__title {
  color: var(--b-orange);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.35;
}
.article__subtitle {
  color: var(--b-navy);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(20px, 2.8vw, 28px);
  margin-top: 6px;
}

.article__body {
  width: min(880px, 100%);
  margin-inline: auto;
  font-size: 19px;
  color: var(--b-navy);
}
.article__body p { margin: 0 0 18px; }
.article__body h2 {
  color: var(--b-orange);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(24px, 3.2vw, 32px);
  margin: 44px 0 16px;
  line-height: 1.4;
}
.article__body h3 {
  color: var(--b-navy-mid);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: 22px;
  margin: 28px 0 10px;
}
.article__body ul, .article__body ol { margin: 0 0 20px; padding-inline-start: 8px; }
.article__body ul li, .article__body ol li { position: relative; padding-inline-start: 26px; margin-bottom: 10px; }
.article__body ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .62em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--b-orange);
}
.article__body ol { counter-reset: item; }
.article__body ol li::before {
  counter-increment: item;
  content: counter(item, arabic-indic) " -";
  color: var(--b-orange);
  font-family: var(--font-600);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
}
.article__body strong { font-family: var(--font-600); font-weight: 400; }
.article__body a { color: var(--b-orange); }
.article__body table { display: block; max-width: 100%; overflow-x: auto; }
.article__body table th,
.article__body table td { min-width: 140px; padding: 10px 12px; text-align: right; }

/* ─── CTA — "جاهز تبدأ رحلتك؟" ────────────────────────────────────── */

.blog-cta { text-align: center; padding: 48px 0 72px; }
.blog-cta__title {
  color: var(--b-navy);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
}
.blog-cta__lede { color: var(--b-navy-mid); font-size: 18px; margin-top: 6px; }
.blog-cta__stores {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--b-navy);
  color: var(--b-white);
  border-radius: 10px;
  padding: 10px 22px;
  min-width: 190px;
  justify-content: center;
}
.store-btn img { height: 30px; width: auto; }
.store-btn__text { text-align: center; line-height: 1.25; }
.store-btn__text small { display: block; font-size: 13px; font-family: var(--font-200); }
.store-btn__text b { font-family: var(--font-600); font-weight: 400; font-size: 18px; }

/* ─── Dark wrapper: contact band + form ───────────────────────────── */

.blog-contact-wrap { background: var(--b-navy-mid); padding: 64px 0; }

.contact-band {
  background: var(--b-orange);
  border-radius: 40px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center;
  color: var(--b-white);
}
.contact-band__title {
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px);
  color: var(--b-navy);
}
.contact-band__lede { margin: 10px 0 26px; font-size: 18px; }
.contact-band__rows { display: grid; gap: 16px; }
.contact-band__row { display: flex; align-items: flex-start; gap: 14px; }
.contact-band__icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.contact-band__row b { display: block; font-family: var(--font-600); font-weight: 400; }
.contact-band__row span { direction: ltr; unicode-bidi: embed; }
.contact-band__row span.ar { direction: rtl; }
.contact-band__img { border-radius: 24px; overflow: hidden; }
.contact-band__img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .contact-band { grid-template-columns: 1fr; }
  .contact-band__img { order: -1; max-height: 320px; }
}

/* ─── Contact form ─────────────────────────────────────────────────── */

.blog-form { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.blog-form__panel h2 {
  color: var(--b-white);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 24px;
}
.blog-form label { display: block; margin-bottom: 18px; color: var(--b-white); }
.blog-form label > span { display: block; margin-bottom: 6px; font-family: var(--font-200); }
.blog-form input, .blog-form textarea {
  width: 100%;
  background: var(--b-white);
  border: 1px solid rgba(8, 23, 40, .15);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--b-navy);
}
.blog-form textarea { min-height: 130px; resize: vertical; }
.blog-form__submit {
  background: var(--b-orange);
  color: var(--b-white);
  font-family: var(--font-600);
  font-size: 19px;
  border-radius: 10px;
  padding: 12px 40px;
}
.blog-form__img { border-radius: 24px; overflow: hidden; min-height: 320px; }
.blog-form__img img { width: 100%; height: 100%; object-fit: cover; }
.field-error { color: #ffd7d7; font-size: 14px; margin-top: 4px; }
.alert-success {
  grid-column: 1 / -1;
  background: #e8f7ee;
  color: #14532d;
  border-radius: 10px;
  padding: 12px 16px;
}

@media (max-width: 820px) {
  .blog-form { grid-template-columns: 1fr; }
  .blog-form__img { min-height: 220px; }
}

/* Honeypot — keep out of the layout without RTL overflow */
.hp-field { position: absolute; opacity: 0; height: 0; width: 0; overflow: hidden; pointer-events: none; }

/* ─── Footer ───────────────────────────────────────────────────────── */

.blog-footer { background: var(--b-navy); color: var(--b-white); padding: 58px 0 28px; }
.blog-footer__grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.8fr) minmax(220px, .7fr);
  gap: clamp(54px, 8vw, 110px);
  align-items: start;
}
.blog-footer__brand { min-width: 0; }
.blog-footer__logo {
  align-items: center;
  display: flex;
  gap: clamp(30px, 4vw, 58px);
  max-width: 540px;
  width: 100%;
}
.blog-footer__logo-mark {
  flex: 0 0 auto;
  height: auto;
  width: clamp(104px, 11vw, 136px);
}
.blog-footer__logo-wordmark {
  height: auto;
  min-width: 0;
  width: clamp(245px, 24vw, 294px);
}
.blog-footer h4 {
  color: var(--b-white);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(26px, 2.5vw, 32px);
  line-height: 1.15;
  margin-bottom: 18px;
}
.blog-footer ul {
  list-style: disc;
  margin: 0;
  padding-inline-start: 1.1em;
}
.blog-footer li {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 4px;
  padding-inline-start: 3px;
}
.blog-footer li::marker { color: var(--b-white); }
.blog-footer a:hover { color: var(--b-orange); }
.blog-footer__stores {
  display: flex;
  gap: 12px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.blog-footer__stores .store-btn {
  background: var(--b-white);
  border-radius: 16px;
  color: #0f3460;
  display: flex;
  flex-direction: row-reverse;
  flex: 1 1 230px;
  justify-content: center;
  min-height: 74px;
  min-width: 230px;
  padding: 10px 24px;
}
.blog-footer__stores .store-btn:hover {
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
  color: #0f3460;
  transform: translateY(-2px);
}
.blog-footer__stores .store-btn img { height: 44px; width: auto; }
.blog-footer__stores .store-btn__text small { font-size: 15px; line-height: 1; }
.blog-footer__stores .store-btn__text b { font-size: 19px; line-height: 1.05; }
.blog-footer__bottom {
  align-items: center;
  border-top: 1px solid rgba(253, 248, 242, .15);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 14px;
  color: rgba(253, 248, 242, .7);
  text-align: center;
}
.blog-footer__legal-inline { display: flex; gap: 18px; }

@media (max-width: 820px) {
  .blog-footer__grid { grid-template-columns: 1fr; }
}

/* Shared app CTA + responsive hardening.
   The landing and content pages now use the same visual language for the
   primary download action while keeping each page's layout independent. */
.app-download-cta {
  align-items: center;
  border: 1px solid transparent;
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.blog-header__cta.app-download-cta {
  background: var(--b-white);
  border-radius: 8px;
  color: var(--b-orange);
  font-family: var(--font-200);
  font-size: 20px;
  padding: 10px 24px;
  white-space: nowrap;
}
.blog-header__cta.app-download-cta:hover,
.blog-header__cta.app-download-cta:focus-visible {
  background: var(--b-cream);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
  color: var(--b-orange);
  transform: translateY(-1px);
}
.blog-mobile-nav__cta {
  background: var(--b-orange);
  border-radius: 8px;
  color: var(--b-white) !important;
  margin: 10px 6%;
  padding: 12px 18px !important;
  text-align: center;
}
.blog-mobile-nav__cta:hover,
.blog-mobile-nav__cta:focus-visible { background: #b86e08; }

/* Prevent long Arabic questions and technical URLs from creating a second
   horizontal scroll container at intermediate widths. */
.article,
.answers-page { overflow-wrap: anywhere; }
.article__body img,
.answers-page img { height: auto; max-width: 100%; }

@media (max-width: 1100px) {
  .blog-header__inner { gap: 18px; }
  .blog-header__nav { gap: 18px; margin-inline-start: 0; }
  .blog-header__nav a { font-size: 17px; }
  .blog-header__cta.app-download-cta { font-size: 18px; padding-inline: 18px; }
  .article { padding-top: 44px; }
  .blog-cta { padding-block: 44px 60px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1120px); }
  .blog-header__inner { min-height: 68px; padding-block: 8px; }
  .blog-header__logo img { height: 36px; }
  .blog-header__burger { padding: 7px 2px; }
  .article { padding: 34px 0 28px; }
  .article__head { margin-bottom: 28px; }
  .article__body { font-size: 17px; }
  .article__body h2 { margin-top: 34px; }
  .blog-cta__stores,
  .blog-footer__stores { align-items: stretch; flex-direction: column; }
  .store-btn,
  .blog-footer__stores .store-btn { min-height: 52px; width: 100%; }
  .contact-band { border-radius: 24px; padding: 24px 18px; }
  .blog-contact-wrap { padding-block: 42px; }
  .blog-form { gap: 28px; margin-top: 40px; }
  .blog-form__img { min-height: 190px; }
  .blog-footer { padding-top: 42px; }
  .blog-footer__logo { gap: 22px; justify-content: center; }
  .blog-footer__logo-mark { width: 86px; }
  .blog-footer__logo-wordmark { width: min(230px, calc(100% - 108px)); }
  .blog-footer h4 { font-size: 27px; }
  .blog-footer li { font-size: 20px; }
  .blog-footer__stores { margin-top: 34px; }
  .blog-footer__stores .store-btn { flex: 0 0 auto; }
  .blog-footer__bottom { flex-direction: column; }
  .blog-footer__legal-inline { flex-wrap: wrap; justify-content: center; }
}

/* ─── Blog index cards ─────────────────────────────────────────────── */

.blog-index { padding: 56px 0 72px; }
.blog-index__title {
  color: var(--b-navy);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 44px);
  text-align: center;
}
.blog-index__title em { color: var(--b-orange); font-style: normal; }
.blog-index__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 28px;
}
.post-card {
  background: var(--b-cream);
  border: 1px solid rgba(8, 23, 40, .08);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(8, 23, 40, .1); }
.post-card__cover { border-radius: 12px; overflow: hidden; margin: -8px -8px 16px; }
.post-card h2 {
  color: var(--b-navy);
  font-family: var(--font-600);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.45;
}
.post-card p { color: var(--b-navy-mid); margin-top: 10px; flex: 1; }
.post-card__more { color: var(--b-orange); font-family: var(--font-600); margin-top: 16px; }

/* ─── Legal pages ──────────────────────────────────────────────────── */

.legal { padding-bottom: 80px; }
.legal__updated {
  font-family: var(--font-200);
  font-size: 17px;
  color: var(--b-navy-mid);
}
.legal .article__body h2 { font-size: clamp(21px, 2.6vw, 26px); margin-top: 36px; }
