/* Guides (الأدلة): index and article pages of the v3 theme (themes/v3/site/guides/*).
   The article text is shared with the old theme (resources/views/site/guides/bodies/*), so the few classes
   used there (.g-lead, .g-scroll, .g-cta) are styled here for the light v3 page. */

/* ── Masthead: the text starts at the page edge, in line with the breadcrumb, the cards and the article below.
   The shared one-column masthead (.phero__in--one) is a centred 820px column; on these pages only the text is capped. */
.phero .phero__in--one { max-width: var(--wrap); }
.phero .phero__in--one > .phero__copy { max-width: 820px; }

/* ── Index: one card per guide */
.gd-sec { padding-block: clamp(28px, 4vw, 52px) clamp(56px, 6vw, 96px); }
.gd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: gd; }
.gd-card { counter-increment: gd; display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
.gd-card::before { content: counter(gd, decimal-leading-zero); font: 600 .8125rem/1 var(--f-head); font-variant-numeric: tabular-nums; color: var(--blue); }
.gd-card:hover, .gd-card:focus-visible { box-shadow: var(--shadow), 0 0 0 1px var(--blue-300); }
.gd-card h2 { font-size: 1.0625rem; line-height: 1.6; color: var(--navy-800); text-wrap: balance; }
.gd-card p { margin: 0; font-size: .9rem; line-height: 1.85; color: var(--ink-2); }
.gd-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: .8125rem; color: var(--muted); }
.gd-card__foot > span { display: inline-flex; align-items: center; gap: 8px; }
.gd-more { font: 600 .875rem/1 var(--f-head); color: var(--blue); }
.gd-more i { font-size: .75rem; }
@media (max-width: 1000px) { .gd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gd-grid { grid-template-columns: 1fr; } }

/* ── Article: masthead, text column, side column */
.gd-hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.5; text-wrap: balance; }
.gd-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .875rem; color: #cdd9ee; }
.gd-meta span { display: inline-flex; align-items: center; gap: 8px; }
.gd-meta i { font-size: .8125rem; color: var(--blue-300); }
.gd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; padding-block: clamp(24px, 3.4vw, 44px) clamp(56px, 6vw, 96px); }
.gd-side { position: sticky; top: calc(var(--hdr) + 20px); display: grid; gap: 14px; }
.gd-side .qf nav a { text-wrap: pretty; line-height: 1.7; }
@media (max-width: 1000px) { .gd-layout { grid-template-columns: 1fr; } .gd-side { position: static; } }

.gd-body { min-width: 0; padding: clamp(20px, 3vw, 40px); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); font-size: 1.0313rem; line-height: 2; color: var(--ink-2); }
.gd-body > :first-child { margin-top: 0; }
.gd-body > :last-child { margin-bottom: 0; }
.gd-body p { margin: 0 0 16px; }
.gd-body h2 { margin: 36px 0 14px; padding-top: 28px; border-top: 1px solid var(--line-2); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.5; color: var(--navy-800); text-wrap: balance; }
.gd-body h3 { margin: 26px 0 10px; font-size: 1.125rem; line-height: 1.6; color: var(--navy-800); }
.gd-body ul, .gd-body ol { margin: 0 0 16px; padding-inline-start: 22px; }
.gd-body li { margin: 6px 0; }
.gd-body li::marker { color: var(--blue); font-weight: 600; }
.gd-body strong { font-weight: 600; color: var(--navy-800); }
.gd-body a { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-color: var(--blue-200); text-underline-offset: 4px; }
.gd-body a:hover { text-decoration-color: currentColor; }
.gd-body .g-lead { margin-bottom: 24px; padding: 18px 22px; border-radius: var(--r); background: var(--blue-50); border-inline-start: 4px solid var(--blue); font-size: 1.0625rem; color: var(--navy-800); }
.gd-body blockquote { margin: 18px 0; padding: 12px 18px; border-radius: var(--r); background: var(--blue-50); border-inline-start: 3px solid var(--blue-300); }
.gd-body blockquote > :last-child { margin-bottom: 0; }

/* comparison tables: scroll sideways on small screens instead of squeezing */
.gd-body .g-scroll { overflow-x: auto; margin: 0 0 20px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line); }
.gd-body table { width: 100%; min-width: 560px; border-collapse: collapse; background: #fff; font-size: .92rem; line-height: 1.8; }
.gd-body th { padding: 12px 14px; background: var(--navy-800); color: #fff; font: 600 .875rem/1.6 var(--f-head); text-align: start; }
.gd-body td { padding: 11px 14px; border-top: 1px solid var(--line-2); vertical-align: top; }
.gd-body tbody tr:nth-child(even) td { background: var(--blue-50); }

/* closing call to action (a paragraph, then two links; some articles wrap the links in a paragraph with " | " between) */
.gd-body .g-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; padding: 24px 26px; border-radius: var(--r-lg); background: radial-gradient(700px 300px at 15% 0%, rgba(0, 74, 173, .5), transparent 60%), linear-gradient(160deg, var(--navy-950), var(--navy-850)); color: #cdd9ee; }
.gd-body .g-cta > p { flex: 1 0 100%; margin: 0 0 6px; }
.gd-body .g-cta > p:has(> a) { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 0; }
.gd-body .g-cta strong { color: #fff; }
.gd-body .g-cta a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--r); background: var(--blue); color: #fff; font: 600 .9rem/1 var(--f-head); text-decoration: none; }
.gd-body .g-cta a:hover { background: var(--blue-600); }
.gd-body .g-cta a + a, .gd-body .g-cta > p > a:last-child:not(:first-child) { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); }
.gd-body .g-cta a + a:hover, .gd-body .g-cta > p > a:last-child:not(:first-child):hover { background: rgba(255, 255, 255, .1); }
