/* =====================================================================================
   BOOKLET LAYOUT for article sections (SECSTYLE-20261128, GPT plan «المقالات والكتيّبات»).
   Only an article whose content says "layout": "booklet" carries .is-booklet; every other
   article is untouched. Markup: App_Code/SectionRenderer.Content.vb RenderArticleBooklet.
   Desktop (≥ 992px): contents in a sticky column beside the text.
   Phone/tablet: a «محتويات الكتيّب» button (details/summary) opens and closes the list.
   Colours from the theme tokens; corners 4px.
   ===================================================================================== */
.article-wrap.is-booklet { --bk-p: var(--primary, #15803D); --bk-s: var(--secondary, #14532D); --bk-hi: var(--accent-warm, #F97316);
  --bk-line: var(--border-subtle, rgba(0,0,0,.10)); --bk-card: var(--bg-surface, #fff); --bk-top: 130px; }
.is-booklet .art-booklet-summary { font-size: 1.08rem; line-height: 1.8; color: var(--text-muted, #5B6660); margin: 0 0 14px; max-width: 760px; }
.is-booklet .art-booklet-pdf { margin: 0 0 18px; }
.is-booklet .art-booklet-pdf a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--bk-line); border-radius: 4px;
  background: var(--bk-card); color: var(--bk-s); font-weight: 700; text-decoration: none; }
.is-booklet .art-booklet-pdf a:hover { border-color: var(--bk-p); }
.is-booklet .art-booklet-pdf i { color: #C62828; }
.is-booklet .art-booklet-size { font-weight: 400; opacity: .75; font-size: .88rem; }

.is-booklet .art-booklet-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.is-booklet .art-booklet-toc { border: 1px solid var(--bk-line); border-radius: 4px; background: var(--bk-card); }
.is-booklet .art-booklet-btn { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 700; color: var(--bk-s);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.is-booklet .art-booklet-btn::-webkit-details-marker { display: none; }
.is-booklet .art-booklet-btn::after { content: "\f078"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; font-size: .8rem; color: var(--bk-p); transition: transform .2s; }
.is-booklet .art-booklet-toc[open] > .art-booklet-btn::after { transform: rotate(180deg); }
.is-booklet .art-booklet-toc nav { border-top: 1px solid var(--bk-line); padding: 8px 6px 12px; max-height: 70vh; overflow: auto; }
.is-booklet .art-booklet-toc .art-toc-list { list-style: none; margin: 0; padding: 0; }
.is-booklet .art-booklet-toc .art-toc-list li { margin: 0; }
.is-booklet .art-booklet-toc .art-toc-list a { display: block; padding: 6px 10px; border-radius: 4px; color: inherit; text-decoration: none; line-height: 1.5; }
.is-booklet .art-booklet-toc .art-toc-list a:hover { background: rgba(var(--primary-rgb, 21,128,61), .08); color: var(--bk-p); }
.is-booklet .art-booklet-toc .art-toc-l3 a { padding-inline-start: 22px; font-size: .94em; }
.is-booklet .art-booklet-toc .art-toc-l4 a { padding-inline-start: 34px; font-size: .9em; opacity: .9; }
/* a jump lands BELOW the site header, not under it */
.is-booklet .article-body :is(h2, h3, h4)[id] { scroll-margin-top: var(--bk-top); }

@media (min-width: 992px) {
  .is-booklet .art-booklet-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 32px; }
  .is-booklet .art-booklet-toc { position: sticky; top: var(--bk-top); max-height: calc(100vh - var(--bk-top) - 20px); overflow: auto; }
  .is-booklet .art-booklet-btn { pointer-events: none; }               /* always open beside the text */
  .is-booklet .art-booklet-btn::after { display: none; }
  .is-booklet .art-booklet-toc nav { max-height: none; overflow: visible; }
}
