/* =========================================================
   POST ARTICLE
   Professional / Clean / Lightweight
   Full replacement for:
   public_html/css/post-article.css
   ========================================================= */


/* =========================================================
   00. VARIABLES
   ========================================================= */

:root {
  --post-bg: #f5f8fd;
  --post-bg-soft: #edf4ff;
  --post-surface: #ffffff;
  --post-surface-soft: #f8fbff;

  --post-text: #10233f;
  --post-text-soft: #3f5c7e;
  --post-muted: #71849d;

  --post-primary: #1858d8;
  --post-primary-dark: #1046b4;
  --post-primary-light: #4f8cff;
  --post-primary-soft: rgba(24, 88, 216, 0.08);

  --post-border: rgba(16, 35, 63, 0.10);
  --post-border-blue: rgba(24, 88, 216, 0.16);

  --post-shadow-sm: 0 10px 28px rgba(16, 35, 63, 0.055);
  --post-shadow-md: 0 18px 46px rgba(16, 35, 63, 0.085);
  --post-shadow-lg: 0 26px 70px rgba(16, 35, 63, 0.11);

  --post-radius-sm: 12px;
  --post-radius-md: 18px;
  --post-radius-lg: 24px;
  --post-radius-xl: 30px;

  --post-container: 1280px;
  --post-sidebar: 340px;
}


/* =========================================================
   01. SAFE PAGE BASE
   ========================================================= */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 92px) + 24px);
}

.articlePage,
.articlePage *,
.articlePage *::before,
.articlePage *::after {
  box-sizing: border-box;
}

.articlePage {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;

  color: var(--post-text);

  background:
    radial-gradient(
      48rem 24rem at 5% 2%,
      rgba(79, 140, 255, 0.08),
      transparent 66%
    ),
    radial-gradient(
      44rem 22rem at 96% 1%,
      rgba(24, 88, 216, 0.07),
      transparent 68%
    ),
    linear-gradient(
      180deg,
      #f8fbff 0%,
      #ffffff 34%,
      var(--post-bg) 100%
    );
}

.articlePage .container {
  width: min(var(--post-container), calc(100% - 48px));
  margin-inline: auto;
}

.articlePage img {
  display: block;
  max-width: 100%;
}

.articlePage a {
  text-decoration: none;
}

.articlePage button,
.articlePage input,
.articlePage select,
.articlePage textarea {
  font: inherit;
}

.articlePage section[id],
.articlePage h2[id],
.articlePage h3[id],
.articlePage h4[id],
.articlePage h5[id] {
  scroll-margin-top: calc(var(--header-h, 92px) + 28px);
}


/* =========================================================
   02. HEADER SCROLL STATE
   ========================================================= */

.header {
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    backdrop-filter 180ms ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.07);
  backdrop-filter: blur(14px);
}


/* =========================================================
   03. ARTICLE HERO
   Text right / image left
   ========================================================= */

/* =========================================================
   03. ARTICLE HERO
   Bigger image / bigger content / smaller top spacing
   ========================================================= */

.a3Hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  padding: 0 0 54px;

  border-bottom: 1px solid rgba(24, 88, 216, 0.08);
}

.a3Hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;

  background:
    radial-gradient(
      40rem 24rem at 8% 18%,
      rgba(79, 140, 255, 0.15),
      transparent 68%
    ),
    radial-gradient(
      42rem 26rem at 92% 10%,
      rgba(24, 88, 216, 0.11),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #f7faff 0%,
      #eef4ff 60%,
      #f9fbff 100%
    );

  pointer-events: none;
}

.a3Hero__container {
  position: relative;
  z-index: 1;

  /*
   * الهيدر موجود بالفعل فوق الهيرو داخل تدفق الصفحة،
   * لذلك لا نضيف ارتفاع الهيدر مرة ثانية.
   */
  padding-top: 28px;
}


/* =========================================================
   HERO BREADCRUMB
   ========================================================= */

.a3Breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;

  /*
   * تقليل المسافة أسفل الـ Breadcrumb
   */
  margin: 0 0 22px;

  color: var(--post-muted);

  font-size: 0.94rem;
  line-height: 1.7;
}

.a3Breadcrumb a {
  color: var(--post-text-soft);

  transition: color 160ms ease;
}

.a3Breadcrumb a:hover {
  color: var(--post-primary);
}

.a3Breadcrumb span[aria-current="page"] {
  max-width: min(720px, 68vw);

  overflow: hidden;

  color: var(--post-text);
  font-weight: 850;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   HERO GRID
   مساحة أكبر للصورة ومسافة أقل بين العمودين
   ========================================================= */

.a3Hero__grid {
  display: grid;

  /*
   * العمود الثاني هو عمود الصورة في ترتيب الهيرو الحالي.
   * أعطيناه مساحة أكبر من عمود النص.
   */
  grid-template-columns:
    minmax(0, 0.92fr)
    minmax(420px, 1.08fr);

  gap: clamp(30px, 3.5vw, 54px);
  align-items: center;
}

.a3Hero__copy {
  min-width: 0;
  padding-block: 10px;

  text-align: right;
}

.a3Hero__pillRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-bottom: 18px;
}

.a3Pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 0 15px;

  border: 1px solid var(--post-border-blue);
  border-radius: 999px;

  color: var(--post-primary-dark);
  background: rgba(255, 255, 255, 0.78);

  box-shadow: 0 8px 20px rgba(24, 88, 216, 0.055);

  font-size: 0.86rem;
  font-weight: 900;

  backdrop-filter: blur(8px);
}

.a3Dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: rgba(16, 35, 63, 0.28);
}

.a3Meta {
  color: var(--post-muted);

  font-size: 0.93rem;
  font-weight: 800;
}


/* =========================================================
   HERO TITLE
   ========================================================= */

.a3Hero__title {
  max-width: 880px;
  margin: 0;

  color: var(--post-text);

  font-size: clamp(2.9rem, 5vw, 4.9rem);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: -0.038em;

  text-wrap: balance;
}

.a3Hero__title::after {
  content: "";

  display: block;

  width: 86px;
  height: 5px;

  margin-top: 18px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      var(--post-primary),
      var(--post-primary-light)
    );

  box-shadow: 0 7px 18px rgba(24, 88, 216, 0.18);
}


/* =========================================================
   HERO AUTHOR AND DATE
   ========================================================= */

.a3Hero__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-top: 20px;

  color: var(--post-muted);

  font-size: 1rem;
  font-weight: 780;
}

.a3By,
.a3Date {
  color: var(--post-muted);
}

.a3Author {
  color: var(--post-primary);
  font-weight: 900;
}

.a3Author:hover {
  color: var(--post-primary-dark);
}

.a3Sep {
  color: rgba(16, 35, 63, 0.25);
}

.a3Hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 25px;
}


/* =========================================================
   HERO IMAGE
   أكبر وأوضح
   ========================================================= */

.a3Hero__media {
  position: relative;

  min-width: 0;
  margin: 0;

  overflow: hidden;

  border: 1px solid rgba(24, 88, 216, 0.14);
  border-radius: var(--post-radius-xl);

  background: #eef4ff;

  box-shadow: var(--post-shadow-lg);
}

.a3Hero__media::before {
  content: "محتوى متخصص";

  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;
  padding: 0 13px;

  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;

  color: #ffffff;
  background: rgba(16, 35, 63, 0.56);

  font-size: 0.78rem;
  font-weight: 900;

  backdrop-filter: blur(10px);
}

.a3Hero__img {
  display: block;

  width: 100%;
  min-height: 500px;

  aspect-ratio: 5 / 4;

  object-fit: cover;
  object-position: center;

  background: #eef4ff;

  transition: transform 500ms ease;
}

.a3Hero__media:hover .a3Hero__img {
  transform: scale(1.018);
}

.a3Hero__cap {
  min-height: 0;
  padding: 12px 15px 14px;

  border-top: 1px solid rgba(24, 88, 216, 0.08);

  color: var(--post-muted);

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fbff
    );

  font-size: 0.86rem;
  line-height: 1.75;
}

.a3Hero__cap:empty {
  display: none;
}


/* =========================================================
   04. BUTTONS
   ========================================================= */

.a2Btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 54px;
  padding: 0 23px;

  border: 1px solid transparent;
  border-radius: 14px;

  font-size: 1rem;
  font-weight: 900;
  line-height: 1;

  cursor: pointer;

  transition:
    color 170ms ease,
    background-color 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.a2Btn:hover {
  transform: translateY(-2px);
}

.a2Btn:focus-visible {
  outline: 3px solid rgba(24, 88, 216, 0.22);
  outline-offset: 3px;
}

.a2Btn--primary {
  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--post-primary),
      var(--post-primary-dark)
    );

  box-shadow: 0 13px 28px rgba(24, 88, 216, 0.20);
}

.a2Btn--primary:hover {
  color: #ffffff;

  box-shadow: 0 17px 34px rgba(24, 88, 216, 0.26);
}

.a2Btn--ghost {
  color: var(--post-primary-dark);

  border-color: var(--post-border-blue);

  background: rgba(255, 255, 255, 0.90);
}

.a2Btn--ghost:hover {
  color: var(--post-primary);

  background: #ffffff;

  border-color: rgba(24, 88, 216, 0.30);
}

.a2Btn--block {
  width: 100%;
}


/* =========================================================
   HERO TABLET
   ========================================================= */

@media (max-width: 1020px) {
  .a3Hero__container {
    padding-top: 22px;
  }

  .a3Hero__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .a3Hero__copy {
    order: 1;
  }

  .a3Hero__media {
    order: 2;
  }

  .a3Hero__img {
    min-height: 390px;
    aspect-ratio: 16 / 9;
  }
}


/* =========================================================
   HERO MOBILE
   ========================================================= */

@media (max-width: 680px) {
  .a3Hero {
    padding-bottom: 36px;
  }

  .a3Hero__container {
    padding-top: 16px;
  }

  .a3Breadcrumb {
    flex-wrap: nowrap;

    margin-bottom: 16px;
    padding-bottom: 4px;

    overflow-x: auto;

    font-size: 0.78rem;

    white-space: nowrap;

    scrollbar-width: none;
  }

  .a3Breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .a3Breadcrumb span[aria-current="page"] {
    max-width: none;

    overflow: visible;

    text-overflow: clip;
  }

  .a3Hero__grid {
    gap: 23px;
  }

  .a3Hero__copy {
    padding-block: 2px;
  }

  .a3Hero__pillRow {
    gap: 7px;
    margin-bottom: 14px;
  }

  .a3Pill {
    min-height: 31px;
    padding: 0 10px;

    font-size: 0.72rem;
  }

  .a3Meta {
    font-size: 0.75rem;
  }

  .a3Hero__title {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
    line-height: 1.18;
  }

  .a3Hero__title::after {
    width: 62px;
    height: 4px;

    margin-top: 15px;
  }

  .a3Hero__byline {
    margin-top: 16px;

    font-size: 0.82rem;
  }

  .a3Hero__actions {
    display: grid;
    grid-template-columns: 1fr;

    margin-top: 20px;
  }

  .a3Hero__actions .a2Btn {
    width: 100%;
  }

  .a3Hero__media {
    border-radius: 21px;
  }

  .a3Hero__media::before {
    top: 12px;
    right: 12px;

    min-height: 30px;

    font-size: 0.69rem;
  }

  .a3Hero__img {
    min-height: 275px;
    aspect-ratio: 16 / 10;
  }

  .a3Hero__cap {
    padding: 10px 12px 12px;

    font-size: 0.77rem;
  }

  .a2Btn {
    min-height: 50px;

    font-size: 0.93rem;
  }
}

/* =========================================================
   05. MAIN ARTICLE LAYOUT
   ========================================================= */

.a2Layout {
  position: relative;

  padding: 64px 0 94px;
}

.a2Layout__grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(300px, var(--post-sidebar));

  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.a2Article {
  min-width: 0;

  padding: clamp(26px, 4vw, 52px);

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-xl);

  background: rgba(255, 255, 255, 0.97);

  box-shadow: var(--post-shadow-md);

  overflow-wrap: anywhere;
}

/* إخفاء Table of Contents من الموبايل فقط */
@media (max-width: 680px) {
  .a2Toc {
    display: none !important;
  }
}


/* =========================================================
   06. GENERATED ARTICLE SECTIONS
   ========================================================= */

.a2Article > .a2Section,
.a2Article > .faq-section {
  position: relative;

  margin: 0 0 52px;
}

.a2Article > .a2Section:last-of-type {
  margin-bottom: 48px;
}

.a2Article > p,
.a2Article > ul > li,
.a2Article > ol > li,
.a2Article > .a2Section p,
.a2Article > .a2Section li,
.a2Article > .faq-section p {
  color: var(--post-text-soft);

  font-size: clamp(1rem, 1.08vw, 1.07rem);
  line-height: 2;
}

.a2Article > p,
.a2Article > .a2Section p,
.a2Article > .faq-section p {
  margin: 0 0 18px;
}

.a2Article > p:last-child,
.a2Article > .a2Section p:last-child,
.a2Article > .faq-section p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   H2
   Large blue line
   ========================================================= */

.a2Article > h2,
.a2Article .a2Section > h2,
.a2Article .faq-section > h2 {
  position: relative;

  margin: 0 0 22px;
  padding-inline-start: 23px;

  color: var(--post-text);

  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
  font-weight: 950;
  line-height: 1.38;
  letter-spacing: -0.025em;

  text-wrap: balance;
}

.a2Article > h2::before,
.a2Article .a2Section > h2::before,
.a2Article .faq-section > h2::before {
  content: "";

  position: absolute;

  top: 0.12em;
  bottom: 0.12em;
  inset-inline-start: 0;

  width: 5px;

  border-radius: 999px;

  background:
    linear-gradient(
      180deg,
      var(--post-primary),
      var(--post-primary-light)
    );

  box-shadow: 0 7px 16px rgba(24, 88, 216, 0.16);
}

/* Editor output is inserted directly inside .a2Article. */
.a2Article > h2 {
  margin-top: 44px;
}

.a2Article > h2:first-child {
  margin-top: 0;
}


/* =========================================================
   H3
   Smaller and visually different
   ========================================================= */

.a2Article > h3,
.a2Article .a2Section > h3,
.a2Article .faq-item > h3 {
  position: relative;

  margin: 30px 0 13px;
  padding-inline-start: 19px;

  color: var(--post-text);

  font-size: clamp(1.2rem, 1.65vw, 1.48rem);
  font-weight: 900;
  line-height: 1.55;

  text-wrap: balance;
}

.a2Article > h3::before,
.a2Article .a2Section > h3::before,
.a2Article .faq-item > h3::before {
  content: "";

  position: absolute;

  top: 0.42em;
  inset-inline-start: 0;

  width: 3px;
  height: 1.15em;

  border-radius: 999px;

  background: var(--post-primary-light);
}


/* =========================================================
   H4
   Clear inner subsection
   ========================================================= */

.a2Article > h4,
.a2Article .a2Section > h4,
.a2Article .faq-section h4 {
  position: relative;

  margin: 26px 0 11px;
  padding-inline-start: 18px;

  color: #173d74;

  font-size: clamp(1.08rem, 1.35vw, 1.24rem);
  font-weight: 900;
  line-height: 1.62;
  letter-spacing: -0.01em;

  text-wrap: balance;
}

.a2Article > h4::before,
.a2Article .a2Section > h4::before,
.a2Article .faq-section h4::before {
  content: "";

  position: absolute;
  top: 0.72em;
  inset-inline-start: 1px;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--post-primary);
  box-shadow: 0 0 0 4px rgba(24, 88, 216, 0.09);
}


/* =========================================================
   H5
   Fine-grained article heading
   ========================================================= */

.a2Article > h5,
.a2Article .a2Section > h5,
.a2Article .faq-section h5 {
  position: relative;

  margin: 22px 0 9px;
  padding-inline-start: 20px;

  color: var(--post-text);

  font-size: clamp(1rem, 1.08vw, 1.1rem);
  font-weight: 900;
  line-height: 1.7;

  text-wrap: balance;
}

.a2Article > h5::before,
.a2Article .a2Section > h5::before,
.a2Article .faq-section h5::before {
  content: "";

  position: absolute;
  top: 0.88em;
  inset-inline-start: 0;

  width: 12px;
  height: 2px;

  border-radius: 999px;

  background: rgba(24, 88, 216, 0.72);
}




/* =========================================================
   07. LISTS
   ========================================================= */

.a2Article > ul,
.a2Article > ol,
.a2Article .a2Section ul,
.a2Article .a2Section ol {
  display: grid;
  gap: 10px;

  margin: 18px 0 24px;
  padding-inline-start: 26px;
}

.a2Article > ul li::marker,
.a2Article > ol li::marker,
.a2Article .a2Section li::marker {
  color: var(--post-primary);
  font-weight: 900;
}

.a2Article > ul li strong,
.a2Article > ol li strong,
.a2Article .a2Section li strong {
  color: var(--post-text);
}


/* =========================================================
   08. ARTICLE LINKS
   ========================================================= */

.a2Article > p a,
.a2Article > ul a,
.a2Article > ol a,
.a2Article > blockquote a,
.a2Article .a2Section a,
.a2Article .faq-section a {
  color: var(--post-primary);

  font-weight: 800;

  text-decoration: underline;
  text-decoration-color: rgba(24, 88, 216, 0.28);
  text-underline-offset: 4px;

  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.a2Article > p a:hover,
.a2Article > ul a:hover,
.a2Article > ol a:hover,
.a2Article > blockquote a:hover,
.a2Article .a2Section a:hover,
.a2Article .faq-section a:hover {
  color: var(--post-primary-dark);
  text-decoration-color: currentColor;
}


/* =========================================================
   09. FAQ
   Current HTML structure supported
   ========================================================= */

.a2Article > .faq-section {
  margin-top: 8px;
}

.a2Article .faq-item {
  margin-top: 14px;
  padding: 20px 22px;

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-md);

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fbff
    );

  box-shadow: var(--post-shadow-sm);
}

.a2Article .faq-item > h3 {
  margin-top: 0;
}

.a2Article .faq-item p {
  padding-inline-start: 19px;
}


/* =========================================================
   10. QUOTES / IMAGES / TABLES
   ========================================================= */

.a2Article blockquote,
.a2Quote {
  margin: 30px 0;
  padding: 22px 24px;

  border: 1px solid var(--post-border-blue);
  border-inline-start: 5px solid var(--post-primary);
  border-radius: var(--post-radius-lg);

  color: var(--post-text);

  background:
    linear-gradient(
      180deg,
      #f8fbff,
      #edf4ff
    );

  box-shadow: var(--post-shadow-sm);

  font-weight: 750;
  line-height: 1.95;
}

.a2Article img {
  width: auto;
  height: auto;
}

.a2Article > img,
.a2Article .a2Section > img,
.a2Article figure {
  max-width: 100%;
  margin: 28px 0;

  overflow: hidden;

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-lg);

  background: #ffffff;

  box-shadow: var(--post-shadow-sm);
}

.a2Article figure {
  width: 100%;
}

.a2Article figure img {
  width: 100%;
}

.a2Article figcaption {
  padding: 11px 15px 14px;

  border-top: 1px solid var(--post-border);

  color: var(--post-muted);
  background: var(--post-surface-soft);

  font-size: 0.86rem;
  line-height: 1.75;
}

.a2Article table {
  width: 100%;

  margin: 28px 0;

  border-collapse: collapse;

  color: var(--post-text-soft);
  background: #ffffff;

  font-size: 0.94rem;
}

.a2Article th,
.a2Article td {
  padding: 14px 16px;

  border: 1px solid var(--post-border);

  text-align: start;
  vertical-align: top;

  line-height: 1.7;
}

.a2Article th {
  color: var(--post-text);
  background: var(--post-bg-soft);
  font-weight: 900;
}


/* =========================================================
   11. AUTHOR CARD
   ========================================================= */

.a2Author {
  display: grid;

  grid-template-columns:
    92px minmax(0, 1fr);

  gap: 20px;
  align-items: center;

  margin-top: 54px;
  padding: 22px;

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-lg);

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f7faff
    );

  box-shadow: var(--post-shadow-sm);
}

.a2Author__avatar {
  display: grid;
  place-items: center;

  width: 92px;
  height: 92px;

  overflow: hidden;

  border: 1px solid var(--post-border-blue);
  border-radius: 22px;

  background: var(--post-bg-soft);
}

.a2Author__avatar img {
  width: 72%;
  height: 72%;

  object-fit: contain;
}

.a2Author__label {
  display: inline-block;

  margin-bottom: 5px;

  color: var(--post-muted);

  font-size: 0.8rem;
  font-weight: 800;
}

.a2Author h2 {
  margin: 0 0 8px;

  color: var(--post-text);

  font-size: 1.3rem;
  font-weight: 950;
}

.a2Author p {
  margin: 0;

  color: var(--post-text-soft);

  font-size: 0.96rem;
  line-height: 1.85;
}

.a2Author a {
  display: inline-flex;

  margin-top: 11px;

  color: var(--post-primary);
  font-weight: 900;
}


/* =========================================================
   12. SIDEBAR
   ========================================================= */

.a2Sidebar {
  position: sticky;
  top: calc(var(--header-h, 92px) + 20px);

  display: flex;
  flex-direction: column;
  gap: 18px;

  min-width: 0;
}

.a2SideCard {
  min-width: 0;
  padding: 20px;

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-lg);

  background: rgba(255, 255, 255, 0.97);

  box-shadow: var(--post-shadow-sm);
}


/* =========================================================
   13. TABLE OF CONTENTS
   ========================================================= */

.a2Toc h3,
.a2ContactQuick h3 {
  margin: 0 0 14px;

  color: var(--post-text);

  font-size: 1.08rem;
  font-weight: 950;
}

.a2Toc nav {
  display: grid;
  gap: 7px;

  max-height: 370px;
  overflow-y: auto;

  padding-inline-end: 3px;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(24, 88, 216, 0.22)
    transparent;
}

.a2Toc nav::-webkit-scrollbar {
  width: 5px;
}

.a2Toc nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(24, 88, 216, 0.22);
}

.a2Toc a {
  display: block;

  padding: 10px 12px;

  border: 1px solid transparent;
  border-radius: 11px;

  color: var(--post-text-soft);
  background: var(--post-surface-soft);

  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.55;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.a2Toc a:hover,
.a2Toc a.is-active {
  color: var(--post-primary-dark);

  border-color: var(--post-border-blue);

  background: var(--post-primary-soft);

  transform: translateX(-2px);
}

.a2Toc a.is-active {
  font-weight: 900;
}

/* Fallback for older generated TOC markup. */
.a2Toc a.toc-sub {
  margin-inline-start: 13px;

  color: var(--post-muted);

  font-size: 0.8rem;
}

/* New H2-H5 hierarchy generated by generator.php. */
.a2Toc a.toc-level-2 {
  margin-inline-start: 0;

  color: var(--post-text-soft);
  background: var(--post-surface-soft);

  font-size: 0.85rem;
  font-weight: 850;
}

.a2Toc a.toc-level-3 {
  margin-inline-start: 12px;

  color: var(--post-muted);
  background: rgba(248, 251, 255, 0.82);

  font-size: 0.80rem;
  font-weight: 780;
}

.a2Toc a.toc-level-4 {
  margin-inline-start: 24px;
  padding-block: 9px;

  color: #7c8da4;
  background: rgba(248, 251, 255, 0.60);

  font-size: 0.77rem;
  font-weight: 750;
}

.a2Toc a.toc-level-5 {
  margin-inline-start: 36px;
  padding-block: 8px;
  padding-inline-start: 10px;

  border-inline-start: 2px solid rgba(24, 88, 216, 0.13);
  border-radius: 8px;

  color: #8796aa;
  background: transparent;

  font-size: 0.74rem;
  font-weight: 730;
}

.a2Toc a.toc-level-3:hover,
.a2Toc a.toc-level-4:hover,
.a2Toc a.toc-level-5:hover,
.a2Toc a.toc-level-3.is-active,
.a2Toc a.toc-level-4.is-active,
.a2Toc a.toc-level-5.is-active {
  color: var(--post-primary-dark);
  border-color: var(--post-border-blue);
  background: var(--post-primary-soft);
}


/* =========================================================
   14. LEAD FORM
   Simple / no square / no rotating border
   ========================================================= */

.a2Lead--premium {
  position: relative;
  isolation: isolate;

  overflow: hidden;

  padding: 22px;

  border-color: rgba(24, 88, 216, 0.16);

  background:
    radial-gradient(
      22rem 13rem at 100% 0%,
      rgba(79, 140, 255, 0.11),
      transparent 68%
    ),
    linear-gradient(
      180deg,
      #ffffff,
      #f3f7ff
    );

  box-shadow: 0 18px 44px rgba(24, 88, 216, 0.10);
}

/* تعطيل أي مؤثرات قديمة */
.a2Lead--premium::before,
.a2Lead--premium::after {
  content: none;
}

.a2Lead__glow,
.a2Lead__fxDots {
  display: none !important;
}

.a2Lead__head {
  position: relative;

  margin-bottom: 18px;
}

.a2Lead__eyebrow {
  display: inline-flex;
  align-items: center;

  min-height: 30px;
  padding: 0 10px;

  margin-bottom: 11px;

  border: 1px solid rgba(24, 88, 216, 0.13);
  border-radius: 999px;

  color: var(--post-primary-dark);
  background: var(--post-primary-soft);

  font-size: 0.75rem;
  font-weight: 900;
}

.a2Lead__title {
  margin: 0;

  color: var(--post-text);

  font-size: 1.34rem;
  font-weight: 950;
  line-height: 1.5;

  text-wrap: balance;
}

.a2Lead__desc {
  margin: 10px 0 0;

  color: var(--post-text-soft);

  font-size: 0.9rem;
  line-height: 1.82;
}

.a2Lead__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin-top: 13px;
}

.a2Lead__chip {
  display: inline-flex;
  align-items: center;

  min-height: 30px;
  padding: 0 9px;

  border: 1px solid rgba(24, 88, 216, 0.11);
  border-radius: 999px;

  color: var(--post-primary-dark);
  background: rgba(255, 255, 255, 0.82);

  font-size: 0.72rem;
  font-weight: 800;
}


/* =========================================================
   FORM FIELDS
   ========================================================= */

.a2Lead__form {
  position: relative;

  display: grid;
  gap: 13px;
}

.a2Field {
  display: grid;
  gap: 7px;
}

.a2Field label {
  color: var(--post-text);

  font-size: 0.83rem;
  font-weight: 900;
}

.a2Field input,
.a2Field select,
.a2Field textarea {
  width: 100%;
  min-height: 50px;

  padding: 0 14px;

  border: 1px solid rgba(24, 88, 216, 0.16);
  border-radius: 13px;

  outline: none;

  color: var(--post-text);
  background: rgba(255, 255, 255, 0.94);

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.a2Field textarea {
  min-height: 120px;
  padding-block: 12px;

  resize: vertical;
}

.a2Field input::placeholder,
.a2Field textarea::placeholder {
  color: #8ca0b8;
}

.a2Field input:hover,
.a2Field select:hover,
.a2Field textarea:hover {
  border-color: rgba(24, 88, 216, 0.28);
}

.a2Field input:focus,
.a2Field select:focus,
.a2Field textarea:focus {
  border-color: var(--post-primary);

  background: #ffffff;

  box-shadow: 0 0 0 4px rgba(24, 88, 216, 0.10);
}

.a2Lead__submit {
  min-height: 52px;
  margin-top: 2px;

  border-radius: 13px;

  animation: none !important;
  transform: none;
}

.a2Lead__submit::before,
.a2Lead__submit::after {
  content: none;
}

.a2Lead__submit:hover {
  transform: translateY(-2px);
}


/* =========================================================
   15. DIRECT CONTACT
   ========================================================= */

.a2ContactQuick {
  display: grid;
  gap: 9px;
}

.a2ContactQuick h3 {
  margin-bottom: 5px;
}

.a2ContactQuick a {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 0 12px;

  border: 1px solid var(--post-border-blue);
  border-radius: 12px;

  color: var(--post-primary-dark);
  background: var(--post-surface-soft);

  font-size: 0.86rem;
  font-weight: 900;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.a2ContactQuick a:hover {
  background: #ffffff;
  border-color: rgba(24, 88, 216, 0.28);

  transform: translateY(-2px);
}


/* =========================================================
   16. OPTIONAL GALLERY
   ========================================================= */

.a2Gallery__viewport {
  position: relative;

  overflow: hidden;

  border: 1px solid var(--post-border);
  border-radius: var(--post-radius-lg);

  background: var(--post-bg-soft);

  box-shadow: var(--post-shadow-sm);
}

.a2Gallery__track {
  position: relative;
  min-height: 360px;
}

.a2Gallery__slide {
  position: absolute;
  inset: 0;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 400ms ease,
    visibility 400ms ease;
}

.a2Gallery__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.a2Gallery__slide img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.a2Gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 3;

  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;

  color: #ffffff;
  background: rgba(16, 35, 63, 0.52);

  cursor: pointer;

  transform: translateY(-50%);

  backdrop-filter: blur(8px);
}

.a2Gallery__nav--prev {
  inset-inline-start: 12px;
}

.a2Gallery__nav--next {
  inset-inline-end: 12px;
}

.a2Gallery__dots {
  display: flex;
  justify-content: center;
  gap: 7px;

  margin-top: 12px;
}

.a2Gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;

  border: 0;
  border-radius: 999px;

  background: #c8d7ed;

  cursor: pointer;

  transition:
    width 160ms ease,
    background-color 160ms ease;
}

.a2Gallery__dot.is-active {
  width: 22px;
  background: var(--post-primary);
}


/* =========================================================
   17. FINAL CTA
   ========================================================= */

.a2CtaStrip {
  padding: 0 0 48px;
}

.a2CtaStrip__inner {
  position: relative;
  isolation: isolate;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  padding: clamp(28px, 4vw, 44px);

  border-radius: var(--post-radius-xl);

  color: #ffffff;

  background:
    radial-gradient(
      30rem 16rem at 0% 0%,
      rgba(255, 255, 255, 0.16),
      transparent 68%
    ),
    linear-gradient(
      135deg,
      var(--post-primary),
      var(--post-primary-dark)
    );

  box-shadow: 0 24px 58px rgba(24, 88, 216, 0.20);
}

.a2CtaStrip__inner h2 {
  margin: 0 0 8px;

  color: #ffffff;

  font-size: clamp(1.55rem, 2.7vw, 2.3rem);
  font-weight: 950;
  line-height: 1.4;
}

.a2CtaStrip__inner p {
  margin: 0;

  color: rgba(255, 255, 255, 0.88);

  line-height: 1.8;
}

.a2CtaStrip .a2Btn--primary {
  flex: 0 0 auto;

  color: var(--post-primary-dark);
  background: #ffffff;

  box-shadow: 0 13px 30px rgba(5, 31, 80, 0.17);
}


/* =========================================================
   18. TABLET
   ========================================================= */

@media (max-width: 1020px) {
  .a3Hero {
    padding-bottom: 48px;
  }

  .a3Hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .a3Hero__copy {
    order: 1;
  }

  .a3Hero__media {
    order: 2;
  }

  .a3Hero__img {
    aspect-ratio: 16 / 8.5;
  }

  .a2Layout__grid {
    grid-template-columns: 1fr;
  }

  .a2Sidebar {
    position: static;

    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .a2Toc {
    grid-column: 1 / -1;
  }
}


/* =========================================================
   19. MOBILE
   ========================================================= */

@media (max-width: 680px) {
  html {
    scroll-padding-top: calc(var(--header-h, 76px) + 16px);
  }

  .articlePage .container {
    width: min(100% - 24px, var(--post-container));
  }

  .a3Hero {
    padding-bottom: 36px;
  }

  .a3Hero__container {
    padding-top: calc(var(--header-h, 76px) + 14px);
  }

  .a3Breadcrumb {
    flex-wrap: nowrap;
    gap: 7px;

    margin-bottom: 20px;
    padding-bottom: 5px;

    overflow-x: auto;

    font-size: 0.76rem;

    white-space: nowrap;

    scrollbar-width: none;
  }

  .a3Breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .a3Breadcrumb span[aria-current="page"] {
    max-width: none;

    overflow: visible;

    text-overflow: clip;
  }

  .a3Hero__grid {
    gap: 24px;
  }

  .a3Hero__copy {
    padding-block: 4px;
  }

  .a3Hero__pillRow {
    gap: 7px;
    margin-bottom: 14px;
  }

  .a3Pill {
    min-height: 30px;
    padding: 0 10px;

    font-size: 0.72rem;
  }

  .a3Meta {
    font-size: 0.73rem;
  }

  .a3Hero__title {
    font-size: clamp(2rem, 10vw, 3.15rem);
    line-height: 1.2;
  }

  .a3Hero__title::after {
    width: 60px;
    height: 4px;

    margin-top: 16px;
  }

  .a3Hero__byline {
    margin-top: 16px;

    font-size: 0.8rem;
  }

  .a3Hero__actions {
    display: grid;
    grid-template-columns: 1fr;

    margin-top: 20px;
  }

  .a3Hero__actions .a2Btn {
    width: 100%;
  }

  .a3Hero__media {
    border-radius: 21px;
  }

  .a3Hero__media::before {
    top: 12px;
    right: 12px;

    min-height: 30px;

    font-size: 0.68rem;
  }

  .a3Hero__img {
    aspect-ratio: 16 / 10;
  }

  .a3Hero__cap {
    padding: 10px 12px 12px;

    font-size: 0.76rem;
  }

  .a2Layout {
    padding: 32px 0 62px;
  }

  .a2Article {
    padding: 23px 17px;

    border-radius: 21px;
  }

  .a2Article > .a2Section,
  .a2Article > .faq-section {
    margin-bottom: 42px;
  }

  .a2Article > p,
  .a2Article > ul > li,
  .a2Article > ol > li,
  .a2Article > .a2Section p,
  .a2Article > .a2Section li,
  .a2Article > .faq-section p {
    font-size: 0.98rem;
    line-height: 1.95;
  }

  .a2Article > h2,
  .a2Article .a2Section > h2,
  .a2Article .faq-section > h2 {
    margin-bottom: 18px;
    padding-inline-start: 18px;

    font-size: clamp(1.45rem, 7vw, 1.95rem);
    line-height: 1.45;
  }

  .a2Article > h2::before,
  .a2Article .a2Section > h2::before,
  .a2Article .faq-section > h2::before {
    width: 4px;
  }

  .a2Article > h2 {
    margin-top: 36px;
  }

  .a2Article > h2:first-child {
    margin-top: 0;
  }

  .a2Article > h3,
  .a2Article .a2Section > h3,
  .a2Article .faq-item > h3 {
    margin-top: 26px;

    font-size: 1.16rem;
  }

  .a2Article > h4,
  .a2Article .a2Section > h4,
  .a2Article .faq-section h4 {
    margin-top: 23px;
    margin-bottom: 9px;
    padding-inline-start: 17px;

    font-size: 1.07rem;
    line-height: 1.6;
  }

  .a2Article > h4::before,
  .a2Article .a2Section > h4::before,
  .a2Article .faq-section h4::before {
    top: 0.68em;

    width: 7px;
    height: 7px;
  }

  .a2Article > h5,
  .a2Article .a2Section > h5,
  .a2Article .faq-section h5 {
    margin-top: 20px;
    margin-bottom: 8px;
    padding-inline-start: 18px;

    font-size: 0.99rem;
    line-height: 1.7;
  }

  .a2Article .faq-item {
    padding: 18px 16px;
  }

  .a2Article table {
    display: block;

    width: 100%;
    overflow-x: auto;

    white-space: nowrap;

    -webkit-overflow-scrolling: touch;
  }

  .a2Author {
    grid-template-columns: 1fr;

    justify-items: center;

    text-align: center;
  }

  .a2Author__avatar {
    width: 82px;
    height: 82px;
  }

  .a2Sidebar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .a2SideCard,
  .a2Lead--premium {
    padding: 18px;

    border-radius: 20px;
  }

  .a2Toc nav {
    max-height: 320px;
  }

  .a2Lead__title {
    font-size: 1.22rem;
  }

  .a2CtaStrip {
    padding-bottom: 30px;
  }

  .a2CtaStrip__inner {
    display: grid;
    grid-template-columns: 1fr;

    padding: 25px 19px;

    border-radius: 21px;

    text-align: center;
  }

  .a2CtaStrip .a2Btn {
    width: 100%;
  }

  .a2Gallery__track {
    min-height: 280px;
  }
}


/* =========================================================
   20. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .articlePage *,
  .articlePage *::before,
  .articlePage *::after {
    animation: none !important;
    transition: none !important;
  }

  .a3Hero__media:hover .a3Hero__img,
  .a2Btn:hover,
  .a2ContactQuick a:hover,
  .a2Toc a:hover {
    transform: none !important;
  }
}

/* =========================================================
   21. COMPACT ARTICLE HERO — SAFE FINAL OVERRIDE
   ---------------------------------------------------------
   Scope:
   - Hero only (.a3Hero...)
   - No template/backend changes
   - No article body/sidebar/TOC/form changes
   ========================================================= */

/* -------------------------
   Desktop
   ------------------------- */

.a3Hero {
  padding: 0 0 36px;

  border-bottom: 1px solid rgba(24, 88, 216, 0.08);
}

.a3Hero__bg {
  background:
    radial-gradient(
      34rem 19rem at 4% 8%,
      rgba(79, 140, 255, 0.105),
      transparent 70%
    ),
    radial-gradient(
      36rem 20rem at 96% 4%,
      rgba(24, 88, 216, 0.085),
      transparent 72%
    ),
    linear-gradient(
      180deg,
      #f8fbff 0%,
      #f2f6ff 58%,
      #fbfdff 100%
    );
}

.a3Hero__container {
  padding-top: 20px;
}

/* Breadcrumb becomes a compact utility row instead of taking hero space. */
.a3Breadcrumb {
  gap: 7px;

  margin: 0 0 15px;

  font-size: 0.79rem;
  line-height: 1.6;
}

.a3Breadcrumb span[aria-current="page"] {
  max-width: min(760px, 62vw);
}

/*
 * Force a predictable editorial composition:
 * image on the left, article information on the right,
 * regardless of RTL grid auto-placement.
 */
.a3Hero__grid {
  direction: ltr;

  display: grid;
  grid-template-columns:
    minmax(350px, 0.92fr)
    minmax(0, 1.08fr);
  grid-template-areas: "media copy";

  gap: clamp(30px, 3.25vw, 48px);
  align-items: center;
}

.a3Hero__copy {
  grid-area: copy;
  direction: rtl;

  min-width: 0;
  padding: 4px 0;

  text-align: right;
}

.a3Hero__media {
  grid-area: media;
  direction: rtl;

  min-width: 0;
}

/* Meta is visually quieter so the title remains the clear focal point. */
.a3Hero__pillRow {
  gap: 8px;

  margin-bottom: 13px;
}

.a3Pill {
  min-height: 32px;
  padding: 0 12px;

  border-color: rgba(24, 88, 216, 0.14);

  box-shadow: none;

  font-size: 0.76rem;
}

.a3Dot {
  width: 5px;
  height: 5px;

  background: rgba(16, 35, 63, 0.22);
}

.a3Meta {
  font-size: 0.82rem;
  font-weight: 760;
}

/*
 * Main size correction:
 * the old hero could reach ~4.9rem and dominate the entire viewport.
 * Keep it editorial, strong and readable without becoming a landing-page hero.
 */
.a3Hero__title {
  max-width: 760px;

  font-size: clamp(2.25rem, 3.35vw, 3.55rem);
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: -0.032em;
}

.a3Hero__title::after {
  width: 68px;
  height: 4px;

  margin-top: 14px;

  box-shadow: 0 5px 14px rgba(24, 88, 216, 0.14);
}

/* Compact author/date row. */
.a3Hero__byline {
  gap: 8px;

  margin-top: 15px;

  font-size: 0.88rem;
  font-weight: 760;
}

.a3Hero__actions {
  gap: 10px;

  margin-top: 18px;
}

.a3Hero__actions .a2Btn {
  min-height: 47px;
  padding-inline: 19px;

  border-radius: 12px;

  font-size: 0.91rem;
}

/* Featured image becomes a balanced editorial visual instead of a huge block. */
.a3Hero__media {
  overflow: hidden;

  border-color: rgba(24, 88, 216, 0.13);
  border-radius: 24px;

  background: #eef4ff;

  box-shadow:
    0 18px 48px rgba(16, 35, 63, 0.095),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.a3Hero__media::before {
  top: 14px;
  right: 14px;

  min-height: 31px;
  padding-inline: 11px;

  font-size: 0.70rem;
}

.a3Hero__img {
  width: 100%;
  height: clamp(320px, 27vw, 405px);
  min-height: 0;

  aspect-ratio: auto;

  object-fit: cover;
  object-position: center;

  transition: transform 420ms ease;
}

.a3Hero__media:hover .a3Hero__img {
  transform: scale(1.012);
}

.a3Hero__cap {
  padding: 9px 13px 11px;

  font-size: 0.78rem;
  line-height: 1.65;
}


/* -------------------------
   Tablet
   ------------------------- */

@media (max-width: 1020px) {
  .a3Hero {
    padding-bottom: 34px;
  }

  .a3Hero__container {
    padding-top: 18px;
  }

  .a3Hero__grid {
    direction: rtl;

    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "media";

    gap: 24px;
  }

  .a3Hero__copy,
  .a3Hero__media {
    direction: rtl;
  }

  .a3Hero__copy {
    padding: 0;
  }

  .a3Hero__title {
    max-width: 860px;

    font-size: clamp(2.2rem, 5.4vw, 3.25rem);
    line-height: 1.18;
  }

  .a3Hero__media {
    width: 100%;
  }

  .a3Hero__img {
    height: clamp(320px, 47vw, 430px);

    aspect-ratio: auto;
  }
}


/* -------------------------
   Mobile
   ------------------------- */

@media (max-width: 680px) {
  .a3Hero {
    padding-bottom: 26px;
  }

  /*
   * Override the older duplicated mobile rule that added header height again.
   * The site header already occupies its own space in the document flow.
   */
  .a3Hero__container {
    padding-top: 12px;
  }

  .a3Breadcrumb {
    gap: 6px;

    margin-bottom: 13px;
    padding-bottom: 2px;

    font-size: 0.72rem;
  }

  .a3Hero__grid {
    gap: 18px;
  }

  .a3Hero__pillRow {
    gap: 6px;

    margin-bottom: 10px;
  }

  .a3Pill {
    min-height: 28px;
    padding-inline: 9px;

    font-size: 0.68rem;
  }

  .a3Meta {
    font-size: 0.69rem;
  }

  .a3Dot {
    width: 4px;
    height: 4px;
  }

  .a3Hero__title {
    max-width: none;

    font-size: clamp(1.9rem, 8.6vw, 2.65rem);
    line-height: 1.22;
    letter-spacing: -0.024em;
  }

  .a3Hero__title::after {
    width: 52px;
    height: 3px;

    margin-top: 12px;
  }

  .a3Hero__byline {
    gap: 7px;

    margin-top: 13px;

    font-size: 0.76rem;
  }

  .a3Hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 9px;

    margin-top: 16px;
  }

  .a3Hero__actions .a2Btn {
    width: 100%;
    min-height: 45px;
    padding-inline: 10px;

    border-radius: 11px;

    font-size: 0.82rem;
  }

  .a3Hero__media {
    border-radius: 18px;
  }

  .a3Hero__media::before {
    top: 10px;
    right: 10px;

    min-height: 27px;
    padding-inline: 9px;

    font-size: 0.63rem;
  }

  .a3Hero__img {
    height: auto;
    min-height: 0;

    aspect-ratio: 16 / 10;
  }

  .a3Hero__cap {
    padding: 8px 10px 9px;

    font-size: 0.70rem;
    line-height: 1.6;
  }
}


/* Very small phones: keep actions comfortable and avoid squeezed labels. */
@media (max-width: 420px) {
  .a3Hero__actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   22. GLOBAL ARTICLE HEADING LADDER + BODY IMAGE POLISH
   ---------------------------------------------------------
   Global behavior for all current and future articles:

   H2
     H3
       H4
         H5
           Paragraph / plain list

   Design rules:
   - Compact indentation matching the approved article look.
   - No vertical tree lines.
   - No horizontal branch connectors.
   - H2/H3/H4/H5 semantics and IDs stay unchanged.
   - TOC stays unchanged.
   - Stored article HTML stays unchanged.
   - Custom components, FAQ, author, tables and media stay safe.
   - Plain text flow uses data attributes already added by
     /js/post-article.js at runtime.
   ========================================================= */


/* =========================================================
   22.1 DESKTOP — DIRECT HEADING LADDER
   ========================================================= */

/* H2 — root */
.a2Article > h2 {
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* H3 — one step inward */
.a2Article > h3 {
  margin-right: 12px !important;
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
}

/* H4 — two steps inward */
.a2Article > h4 {
  margin-right: 24px !important;
  width: calc(100% - 24px) !important;
  max-width: calc(100% - 24px) !important;
}

/* H5 — three steps inward */
.a2Article > h5 {
  margin-right: 36px !important;
  width: calc(100% - 36px) !important;
  max-width: calc(100% - 36px) !important;
}


/* =========================================================
   22.2 PLAIN CONTENT FOLLOWS THE CURRENT HEADING
   ---------------------------------------------------------
   post-article.js decorates plain paragraphs/lists with:
   data-a2-tree-kind="content"
   data-a2-tree-depth="1..4"
   ========================================================= */

/* Content after H2 */
.a2Article >
.a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="1"] {
  margin-right: 12px !important;
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
}

/* Content after H3 */
.a2Article >
.a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="2"] {
  margin-right: 24px !important;
  width: calc(100% - 24px) !important;
  max-width: calc(100% - 24px) !important;
}

/* Content after H4 */
.a2Article >
.a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="3"] {
  margin-right: 36px !important;
  width: calc(100% - 36px) !important;
  max-width: calc(100% - 36px) !important;
}

/* Content after H5 */
.a2Article >
.a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="4"] {
  margin-right: 48px !important;
  width: calc(100% - 48px) !important;
  max-width: calc(100% - 48px) !important;
}


/* =========================================================
   22.3 HARD REMOVE ANY OLD TREE DRAWING
   ========================================================= */

.a2Article > .a2HierarchyItem[data-a2-tree-depth] {
  background-image: none !important;
  background-size: auto !important;
  background-repeat: initial !important;
  background-position: initial !important;
}

.a2Article > h2.a2HierarchyItem::after,
.a2Article > h3.a2HierarchyItem::after,
.a2Article > h4.a2HierarchyItem::after,
.a2Article > h5.a2HierarchyItem::after {
  content: none !important;
  display: none !important;

  width: 0 !important;
  height: 0 !important;

  border: 0 !important;

  background: none !important;
  box-shadow: none !important;
}


/* =========================================================
   22.4 ARTICLE BODY IMAGES
   ---------------------------------------------------------
   Supports both:
   <img>
   and:
   <p><img></p>
   ========================================================= */

.a2Article > img,
.a2Article .a2Section > img,
.a2Article > p > img:only-child,
.a2Article .a2Section > p > img:only-child {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;

  margin-inline: auto;

  overflow: hidden;

  border: 1px solid rgba(16, 35, 63, 0.10);
  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 12px 30px rgba(16, 35, 63, 0.075);
}

/*
 * Image-only paragraphs are media blocks, not reading-depth text.
 * Keep them at the full article width.
 */
.a2Article > p.a2HierarchyItem[data-a2-tree-kind="media"],
.a2Article > .a2HierarchyItem[data-a2-tree-kind="media"] {
  margin-right: 0 !important;

  width: 100% !important;
  max-width: 100% !important;

  padding-inline-start: 0;

  background-image: none !important;
}

.a2Article > p.a2HierarchyItem[data-a2-tree-kind="media"] {
  margin-top: 28px !important;
  margin-bottom: 28px !important;
}

.a2Article > p.a2HierarchyItem[data-a2-tree-kind="media"] > img:only-child,
.a2Article .a2Section > p > img:only-child {
  margin: 0;
}

.a2Article > img,
.a2Article .a2Section > img {
  margin-block: 28px;
}


/* =========================================================
   22.5 TABLET
   ========================================================= */

@media (max-width: 920px) {

  .a2Article > h3 {
    margin-right: 10px !important;
    width: calc(100% - 10px) !important;
    max-width: calc(100% - 10px) !important;
  }

  .a2Article > h4 {
    margin-right: 20px !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
  }

  .a2Article > h5 {
    margin-right: 30px !important;
    width: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="1"] {
    margin-right: 10px !important;
    width: calc(100% - 10px) !important;
    max-width: calc(100% - 10px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="2"] {
    margin-right: 20px !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="3"] {
    margin-right: 30px !important;
    width: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="4"] {
    margin-right: 40px !important;
    width: calc(100% - 40px) !important;
    max-width: calc(100% - 40px) !important;
  }
}


/* =========================================================
   22.6 MOBILE
   ========================================================= */

@media (max-width: 680px) {

  .a2Article > h3 {
    margin-right: 8px !important;
    width: calc(100% - 8px) !important;
    max-width: calc(100% - 8px) !important;
  }

  .a2Article > h4 {
    margin-right: 16px !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
  }

  .a2Article > h5 {
    margin-right: 24px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="1"] {
    margin-right: 8px !important;
    width: calc(100% - 8px) !important;
    max-width: calc(100% - 8px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="2"] {
    margin-right: 16px !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="3"] {
    margin-right: 24px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="4"] {
    margin-right: 32px !important;
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
  }

  .a2Article > img,
  .a2Article .a2Section > img,
  .a2Article > p > img:only-child,
  .a2Article .a2Section > p > img:only-child {
    border-radius: 16px;

    box-shadow:
      0 8px 22px rgba(16, 35, 63, 0.065);
  }

  .a2Article > p.a2HierarchyItem[data-a2-tree-kind="media"],
  .a2Article > img,
  .a2Article .a2Section > img {
    margin-top: 22px !important;
    margin-bottom: 22px !important;
  }
}


/* =========================================================
   22.7 VERY SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

  .a2Article > h3 {
    margin-right: 6px !important;
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
  }

  .a2Article > h4 {
    margin-right: 12px !important;
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
  }

  .a2Article > h5 {
    margin-right: 18px !important;
    width: calc(100% - 18px) !important;
    max-width: calc(100% - 18px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="1"] {
    margin-right: 6px !important;
    width: calc(100% - 6px) !important;
    max-width: calc(100% - 6px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="2"] {
    margin-right: 12px !important;
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="3"] {
    margin-right: 18px !important;
    width: calc(100% - 18px) !important;
    max-width: calc(100% - 18px) !important;
  }

  .a2Article >
  .a2HierarchyItem[data-a2-tree-kind="content"][data-a2-tree-depth="4"] {
    margin-right: 24px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
  }
}

