/*
 * EAM redesign: Workshops (page 1783, /activities/workshops/). Rulebook P-23.
 * RS: clone:src/app/fellows-directory/election/page.tsx (light hero, BlogSection text column) and
 * RSC/news-3da6b667/NewsLatest.tsx (plain text list: title, then meta), here grouped by year (R-43).
 *
 * Page layout only. Everything else comes from the shared files:
 *   1783_hero01-aa     hero: light tint hero, breadcrumb Home / Activities / Workshops, eyebrow, H1,
 *                      lead, "Quick facts" -> indigo HeroCard (components.css, templates.css)
 *   1783_intro01-aa    "EAM courses & workshops": H2 + intro, BlogSection 48px under the hero
 *   1783_recent01-aa   "Recent workshops & courses": the label (shared kicker), then one band per year:
 *                      the year (core H3) on the left, that year's workshops on the right, hairlines
 *                      between years, the "announced under News" line closing the list. The year
 *                      headings and the title / details line break come from the page patch
 *                      scripts/redesign/pages/01783-workshops.mjs.
 *   1783_cta01-aa      "Have a workshop proposal?": shared closing CTA band (components.css `_cta01-`).
 *
 * The three rows after the hero carry an explicit white background (.kt-row-has-bg), so base.css
 * cannot collapse their paddings (48 + 48 = 96px). Section 1 sets the gaps by uniqueID; an editor who
 * adds the class rd-keep-spacing to a row gets the original spacing back.
 */

/* 1. Rhythm ------------------------------------------------------------------------------- */

/* Intro: 48px under the hero (row padding-top stays), the list follows it closely. */
body.eam-redesign .kb-row-layout-id1783_intro01-aa:not(.rd-keep-spacing) > .kt-row-column-wrap {
  padding-bottom: 0;
}

/* The workshop list belongs to the intro section: 40px under the intro text (24px <= 820). */
body.eam-redesign .kb-row-layout-id1783_recent01-aa:not(.rd-keep-spacing) > .kt-row-column-wrap {
  padding-top: var(--rd-space-l);
}

/* List -> CTA band: one section space. */
body.eam-redesign .kb-row-layout-id1783_cta01-aa:not(.rd-keep-spacing) > .kt-row-column-wrap {
  padding-top: 0;
}

/* 2. Intro text: RS ink instead of Kadence palette4 (#2b2b2b, not remapped on purpose, DESIGN-SYSTEM 9;
 * .has-theme-palette-4-color is !important, so the preset is repointed on this page's content, the
 * same technique as summer-schools.css), on the article measure. */
body.eam-redesign.page-id-1783 .entry-content {
  --wp--preset--color--theme-palette-4: var(--rd-color-text);
}

body.eam-redesign .wp-block-kadence-advancedheading.kt-adv-heading1783_intro04-dd[data-kb-block] {
  max-width: var(--rd-measure);
}

/* 3. Recent workshops, grouped by year (R-43). The tint panel set in the block (palette7, 48px
 * padding) becomes a plain RS list on white, on 9 of the 12 columns like NewsLatest. Grid: the year
 * on columns 1-2, the workshops from column 3; anything else an editor adds spans the full width. */
body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col {
  display: grid;
  grid-template-columns: calc(var(--rd-grid-col) * 2 + var(--rd-grid-gap) * 2) minmax(0, 1fr);
  max-width: calc(var(--rd-grid-col) * 9 + var(--rd-grid-gap) * 8);
  gap: 0; /* the year and list hairlines meet in one line */
  padding: 0;
  background: transparent;
}

body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > * {
  grid-column: 1 / -1;
}

/* The label keeps the shared kicker look (components.css section 13); only its gap to the list. */
body.eam-redesign .wp-block-kadence-advancedheading.kt-adv-heading1783_recent03-cc[data-kb-block] {
  margin: 0 0 var(--rd-space-s);
}

/* Year: h4 size (24/18), indigo, on the hairline that opens its band. It shares the first title's
 * baseline: same line box as the title (18 x 1.5), and the top padding takes off the year's extra
 * drop (Figtree baseline sits .17em below the line-box middle, measured; 0 when both are 18px). */
body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > h3.wp-block-heading {
  grid-column: 1;
  margin: 0;
  padding: calc(var(--rd-space-base) - (var(--rd-fs-h4) - var(--rd-fs-large)) * .17) var(--rd-space-s) var(--rd-space-base) 0;
  border-top: var(--rd-border-width) solid var(--rd-border-light);
  font-size: var(--rd-fs-h4);
  line-height: calc(var(--rd-fs-large) * var(--rd-lh-body));
  font-weight: var(--rd-fw-semibold);
  color: var(--rd-color-primary);
}

/* That year's workshops: no bullets, title (18 semibold ink) then details (16, ink 70%). */
body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > h3.wp-block-heading + ul.wp-block-list {
  grid-column: 2;
  margin: 0;
  padding: var(--rd-space-base) 0;
  border-top: var(--rd-border-width) solid var(--rd-border-light);
  list-style: none;
}

body.eam-redesign .kadence-column1783_recent02-bb ul.wp-block-list > li {
  color: var(--rd-color-text-70);
}

body.eam-redesign .kadence-column1783_recent02-bb ul.wp-block-list > li + li {
  margin-top: var(--rd-space-base);
}

body.eam-redesign .kadence-column1783_recent02-bb ul.wp-block-list > li > strong:first-child {
  font-size: var(--rd-fs-large);
  line-height: var(--rd-lh-body);
  font-weight: var(--rd-fw-semibold);
  color: var(--rd-color-text);
}

/* "New workshops ... announced under News." closes the list on a hairline. */
body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > p {
  margin: 0;
  padding-top: var(--rd-space-base);
  border-top: var(--rd-border-width) solid var(--rd-border-light);
}

@media (max-width: 1080px) {
  body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col {
    grid-template-columns: calc(var(--rd-space-xl) * 2) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  body.eam-redesign .kb-row-layout-id1783_recent01-aa:not(.rd-keep-spacing) > .kt-row-column-wrap {
    padding-top: var(--rd-space-base);
  }
}

/* Phones: the year sits above its workshops, one hairline per band. */
@media (max-width: 480px) {
  body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col {
    grid-template-columns: minmax(0, 1fr);
  }

  body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > h3.wp-block-heading {
    padding: var(--rd-space-base) 0 var(--rd-space-xs);
  }

  body.eam-redesign .kadence-column1783_recent02-bb > .kt-inside-inner-col > h3.wp-block-heading + ul.wp-block-list {
    grid-column: 1;
    padding-top: 0;
    border-top: 0;
  }
}
