/* fundraisers and events: the section on /help-find-a-cure/ and the teaser card on the home page
 * (src/_includes/partials/fundraiser-card.njk, src/_data/fundraisers.json). Loaded through the extraCss front matter
 * list in layouts/base.njk, after the page css. Sizes are rem/em so browser text zoom scales them; section colours are
 * Kadence palette variables (the home teaser card copies its sibling's fixed colours).
 *
 * The section reuses the markup and classes of the page's "Scientist or Professional" section, so the page's own
 * stylesheets lay it out. Only the rules below are extra: the hidden state for the expiry script, wrapping when there
 * are more than three fundraisers, the flyer image, and the 44px button height. */

.fr-section [hidden], .fr-section[hidden], .fr-teaser [hidden], .fr-teaser[hidden] { display: none !important; }

/* one to three fundraisers sit in one row like the sibling section (WordPress columns, no wrap from 782px, stacked
 * below). Four or more wrap into rows of three instead of squeezing. 4em is two of the 2em column gaps. */
@media (min-width: 782px) {
  .fr-section .fr-grid:has(> .fr-card:nth-child(4)) { flex-wrap: wrap !important; }
  .fr-section .fr-grid:has(> .fr-card:nth-child(4)) > .fr-card { flex: 0 0 calc((100% - 4em) / 3); }
}

/* a tall image (a book cover) stays small; a wide flyer fills the column */
.fr-card .fr-flyer img { width: auto; max-width: 100%; height: auto; max-height: 20rem; display: block; }

/* links and buttons at least 44px tall (WCAG 2.5.5 target size) */
.fr-section .wp-block-button__link,
.fr-teaser .fr-teaser-link { min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }

/* home page teaser: a smaller sibling of the Breakthrough Prize card below it (.bp-home-block, inline style in
 * src/pages/index.html). The card values (max-width, radius, white, shadow, padding, kicker and arrow type) are copied
 * from it. The blue is #0b6fbe, not the card's #229aed: on white that is 5.21:1, and #229aed is only 3.04:1, below
 * WCAG AA 4.5:1 for this text size. The bottom margin is 0 so it collapses with the card's 60px top margin. */
.fr-teaser { display: block; max-width: 1180px; margin: 60px auto 0; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.25); font-family: "Onest", sans-serif; color: #111; }
.fr-teaser .fr-teaser-body { padding: 36px 40px 40px; text-align: left; }
.fr-teaser h2.ft-heading { font-family: "Onest", sans-serif; text-align: left; text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; line-height: 1.4; color: #0b6fbe; margin: 0 0 14px; }
.fr-teaser .fr-teaser-list { list-style: none; margin: 0 0 16px; padding: 0; }
.fr-teaser .fr-teaser-list li { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.4; font-weight: 400; color: #111; }
.fr-teaser .fr-teaser-list li strong { font-family: "Roboto Slab", Georgia, serif; font-weight: 700; font-size: 1.2rem; color: #111; }
.fr-teaser p.wp-block-paragraph { margin: 0; }
.fr-teaser .fr-teaser-link { color: #0b6fbe; font-weight: 700; font-size: 1rem; text-decoration: none; }
.fr-teaser .fr-teaser-link:hover, .fr-teaser .fr-teaser-link:focus-visible { text-decoration: underline; }
@media (max-width: 600px) {
  .fr-teaser .fr-teaser-body { padding: 24px 20px 28px; }
}

/* high contrast and eye-gaze modes: the live site has neither yet, so these two rules match nothing today. They are
 * kept so each fundraiser keeps a solid frame once the accessibility bar (sprint 1) lands and sets these html classes. */
html:is(.contrast-high, .mode-gaze) .fr-card { border: 2px solid var(--a11y-ink, #111111) !important; }
html:is(.contrast-high, .mode-gaze) .fr-teaser { border-color: var(--a11y-ink, #111111) !important; }
