/* ===================================================
   article.css  —  المقالات  (mobile-first)
=================================================== */

:root {
  --sage:     #6f8f7d;
  --sageDark: #4f6f5f;
  --wrap:     min(680px, 92vw);
}

.page { background: #fff; }

/* ---- Outer wrapper ---- */
.articlePage {
  background: #fff;
}

.articlePage__inner {
  width: var(--wrap);
  margin: 0 auto;
  padding: 36px 0 48px;
  display: flex;
  flex-direction: column;
  text-align: right;
}

/* ---- Page title ---- */
.articlePage__title {
  font-size: 24px;
  font-weight: 800;
  color: #111;
  margin-bottom: 32px;
  line-height: 1.4;
}

/* ---- Blocks ---- */
.articleBlock {
  margin-bottom: 44px;
}

/* ---- Headings that appear above the image ---- */
.articleBlock__heading--standalone {
  font-size: 20px;
  font-weight: 700;
  color: var(--sageDark);
  margin-bottom: 18px;
}

/* ---- Images (mobile: full width) ---- */
.articleBlock__figure {
  margin: 0 0 20px;
}

.articleBlock__img {
  width: 100%;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

/* ---- Body text ---- */
.articleBlock__body p {
  font-size: 14px;
  color: #3f3f3f;
  line-height: 2.1;
  margin-bottom: 16px;
}

.articleBlock__lead {
  font-size: 15px !important;
  font-weight: 600;
  color: #2f2f2f !important;
}

.articleBlock__heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--sageDark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.articleBlock__subheading {
  font-size: 16px;
  font-weight: 600;
  color: #3f3f3f;
  margin-bottom: 14px;
}

/* ---- Signature block ---- */
.articleBlock__signature {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f0ede8;
}

.articleBlock__brand {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.articleBlock__signature p {
  font-size: 13px !important;
  color: #7a7a7a !important;
  line-height: 2.0 !important;
}

/* ===================================================
   Desktop (≥ 860px) — square images, alternating sides
=================================================== */
@media (min-width: 860px) {

  :root {
    --wrap: min(1100px, 92vw);
  }

  .articlePage__inner {
    padding: 52px 0 64px;
  }

  .articlePage__title {
    font-size: 32px;
    margin-bottom: 48px;
  }

  /* Each block: two-column grid */
  .articleBlock {
    display: grid;
    grid-template-columns: 1fr 2fr;   /* even blocks: image col1 (narrow), text col2 (wide) */
    grid-template-rows: auto 1fr;
    column-gap: 52px;
    align-items: start;
    margin-bottom: 0;
    padding: 44px 0;
    border-top: 1px solid #f0ede8;
  }

  .articleBlock:nth-child(odd) {
    grid-template-columns: 2fr 1fr;   /* odd blocks: text col1 (wide), image col2 (narrow) */
  }

  /* Standalone headings (blocks 4 & 5) span full width above image */
  .articleBlock__heading--standalone {
    grid-column: 1 / -1;
    font-size: 22px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0ede8;
  }

  /* Square images */
  .articleBlock__img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: cover;
  }

  /* Even blocks: image col1, text col2 */
  .articleBlock:nth-child(even) .articleBlock__figure {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
  }

  .articleBlock:nth-child(even) .articleBlock__body {
    grid-column: 2;
    grid-row: 2;
  }

  /* Odd blocks: text col1, image col2 */
  .articleBlock:nth-child(odd) .articleBlock__figure {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }

  .articleBlock:nth-child(odd) .articleBlock__body {
    grid-column: 1;
    grid-row: 2;
  }

  /* Blocks 4 & 5 have a standalone heading (row 1 spans full width) */
  .articleBlock:nth-child(even) .articleBlock__heading--standalone {
    grid-row: 1;
  }

  .articleBlock:nth-child(odd) .articleBlock__heading--standalone {
    grid-row: 1;
  }

  .articleBlock__body p {
    font-size: 15px;
  }
}
