/* Chap's Corner internal page tweaks
   ----------------------------------
   Goal: header -> CTA (lead) -> quote/bio (supporting) -> newsletter.
   Approach: make <main> a flex column on this page, then reorder the
   CTA and quote sections to swap their visual positions.

   We narrow the scope by also requiring the page to contain the
   Chap's Corner external link. That guarantees these rules only kick
   in on the /chaps-corner internal page, not other routes.
*/

/* Apply only on pages that have the chap.roundrockfirefoundation.org
   CTA — i.e. the Chap's Corner internal page. */
body:has(a[href*="chap.roundrockfirefoundation.org"]) main {
  display: flex !important;
  flex-direction: column !important;
}

/* Default order for any direct child of main on this page. Large so
   our specific overrides below have plenty of room above. */
body:has(a[href*="chap.roundrockfirefoundation.org"]) main > * {
  order: 10;
}

/* Header / title block (first section in source order) stays first. */
body:has(a[href*="chap.roundrockfirefoundation.org"]) main > *:first-child {
  order: 1;
}

/* CTA section: second on screen. */
body:has(a[href*="chap.roundrockfirefoundation.org"]) main section:has(a[href*="chap.roundrockfirefoundation.org"]) {
  order: 2 !important;
}

/* Quote/bio section: third on screen. */
body:has(a[href*="chap.roundrockfirefoundation.org"]) main section:has(blockquote) {
  order: 3 !important;
}

/* CTA visual polish: gentle gold glow, prominent button. */
main section:has(a[href*="chap.roundrockfirefoundation.org"]) {
  padding-top: 3rem !important;
  padding-bottom: 4rem !important;
  background: radial-gradient(ellipse at center top,
              hsla(43, 75%, 55%, 0.06),
              hsl(0, 0%, 4%) 65%) !important;
}
main section:has(a[href*="chap.roundrockfirefoundation.org"]) a[href*="chap.roundrockfirefoundation.org"] {
  padding: 1.25rem 2.5rem !important;
  font-size: 1.125rem !important;
  box-shadow: 0 12px 32px -8px hsla(43, 75%, 55%, 0.35);
  transform: scale(1.02);
}

/* Quote section: soften so it reads as supporting context, not a
   competing centerpiece. */
main section:has(blockquote) {
  padding-top: 3rem !important;
  padding-bottom: 4rem !important;
}
