/*
 * EAM redesign: Summer Schools (page 373, /activities/summer-schools/). Rulebook P-11.
 * RS: clone:src/app/science-events-and-lectures/summer-science-exhibition/page.tsx
 * (light hero + HeroCard, BlogSection 48px under the hero, ListingHeader + card listing).
 *
 * Page layout only. The hero, its indigo "Where to study" card, the breadcrumb, card frames,
 * kickers, buttons and the CTA band come from the shared files (components.css, forms.css,
 * base.css, templates.css). Rows by uniqueID:
 *   373_hero01-aa      hero (shared light hero, fact list -> indigo HeroCard)
 *   373_ownintro01-aa  "EAM Summer Schools" (empty state, tint panel), BlogSection 48px under the hero
 *   373_intro01-aa     "Summer Schools by Other Groups & Universities": section header + intro,
 *                      acts as the ListingHeader of the cards below (C-18, C-31, R-17, R-68)
 *   373_grid01-aa      the 2 programme cards (eam-tier-card: shared RS text card)
 *   373_expect01-aa    "What to expect": 3-item list -> one quiet tint strip, label + list
 *   373_cta01-aa       "Questions about a programme?" (shared CTA band)
 *
 * Every row after the hero is an explicit white row (.kt-row-has-bg), so base.css cannot collapse
 * their paddings: 48 + 48 = 96px between sections. Section 1 below brings that back to one
 * section space (48px, 24px at <= 820px: the token switches by itself).
 */

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

/* "EAM Summer Schools" -> "Summer Schools by Other Groups": one section space. */
body.eam-redesign .kb-row-layout-id373_intro01-aa > .kt-row-column-wrap {
  padding-top: 0;
  padding-bottom: 0;
}

/* The intro is the listing header of the cards: cards follow at 24px (RS ListingHeader). */
body.eam-redesign .kb-row-layout-id373_grid01-aa > .kt-row-column-wrap {
  padding-top: var(--rd-space-base);
}

body.eam-redesign .kb-row-layout-id373_expect01-aa > .kt-row-column-wrap,
body.eam-redesign .kb-row-layout-id373_cta01-aa > .kt-row-column-wrap {
  padding-top: 0;
}

/* 2. Text colour: the board's paragraphs use Kadence palette4 (#2b2b2b, not remapped on purpose,
 * DESIGN-SYSTEM 9) through .has-theme-palette-4-color, which is !important. Repointing the preset
 * on this page's content turns them RS ink without !important (same technique as the hero). */
body.eam-redesign.page-id-373 .entry-content {
  --wp--preset--color--theme-palette-4: var(--rd-color-text);
}

/* 3. "EAM Summer Schools" empty state: a quiet tint notice, square, RS spacing. The H2 keeps the
 * section size (40/28) so the two parts of the page (C-31) carry the same weight. */
body.eam-redesign .kadence-column373_ownintro02-bb > .kt-inside-inner-col {
  padding: var(--rd-space-m);
}

body.eam-redesign .wp-block-kadence-advancedheading.kt-adv-heading373_ownintro03-cc[data-kb-block],
body.eam-redesign .wp-block-kadence-advancedheading.kt-adv-heading373_intro03-cc[data-kb-block] {
  margin: 0 0 var(--rd-space-s);
}

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

/* 4. Programme cards: RS card grid gap (16px; Kadence gutter 28 + shared 32). */
body.eam-redesign .kb-row-layout-id373_grid01-aa > .kt-row-column-wrap {
  column-gap: var(--rd-grid-gap);
  row-gap: var(--rd-grid-gap);
}

/* 5. "What to expect": one strip on the tint (RS quiet panel), the label on the left and the three
 * items in a row, square bullets like the hero fact list (D-34: the check-circle icons are hidden,
 * they are decoration). Below 1081px the label sits above the list. */
body.eam-redesign .kadence-column373_expect02-bb > .kt-inside-inner-col {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: var(--rd-space-xl);
  row-gap: var(--rd-space-xs);
  padding: var(--rd-space-m);
}

body.eam-redesign .wp-block-kadence-advancedheading.kt-adv-heading373_expect03-cc[data-kb-block] {
  margin: 0;
}

body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rd-space-xs) var(--rd-space-base);
  margin: 0;
  padding: 0;
}

body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap {
  position: relative;
  display: block;
  margin: 0;
  padding: 0 0 0 var(--rd-space-s);
  font-family: var(--rd-font);
  font-size: var(--rd-fs-large);
  font-weight: var(--rd-fw-semibold);
  line-height: var(--rd-lh-body);
  color: var(--rd-color-text);
}

body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap::before {
  content: "";
  position: absolute;
  top: calc(.75em - 3px);
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: var(--rd-radius);
  background: var(--rd-color-primary);
}

/* Beats Kadence's `.wp-block-kadence-iconlist ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap
 * .kt-svg-icon-list-single` (0,4,1, style-blocks-iconlist.css). */
body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap .kt-svg-icon-list-single {
  display: none;
}

@media (max-width: 1080px) {
  body.eam-redesign .kadence-column373_expect02-bb > .kt-inside-inner-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  body.eam-redesign .kadence-column373_ownintro02-bb > .kt-inside-inner-col,
  body.eam-redesign .kadence-column373_expect02-bb > .kt-inside-inner-col {
    padding: var(--rd-space-base);
  }

  body.eam-redesign .kb-row-layout-id373_grid01-aa > .kt-row-column-wrap {
    padding-top: var(--rd-space-s);
  }

  /* Narrower than thirds can hold: the items flow on one line and wrap whole, never mid-item.
   * The :not() chain matches Kadence's own `display: grid` rule (0,5,1, style-blocks-iconlist.css). */
  body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list:not(.this-prevents-issues):not(.this-stops-third-party-issues):not(.tijsloc) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rd-space-xs) var(--rd-space-m);
  }
}

/* Phones: the three items stack (16px text, as body text on phones). */
@media (max-width: 480px) {
  body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list {
    flex-direction: column;
  }

  body.eam-redesign .kt-svg-icon-list-items373_expect04-dd ul.kt-svg-icon-list .kt-svg-icon-list-item-wrap {
    font-size: var(--rd-fs-body);
  }
}
