.pd-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.pd-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--paper);
  border: 1px solid var(--rule-mid);
  padding: 1.5rem;
  border-top: 3px solid var(--blue-deep);
}

.sidebar-card__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 1rem;
}

.sidebar-link-list { display: flex; flex-direction: column; gap: 0; }

.sidebar-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-mid);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  transition: color var(--transition);
  gap: 0.5rem;
}

.sidebar-link-list a:last-child { border-bottom: none; }
.sidebar-link-list a:hover { color: var(--blue-deep); }

.sidebar-link-list a.deprecated {
  color: var(--text-light);
  text-decoration: line-through;
}

.sidebar-link-list a.deprecated:hover { color: var(--text-light); }

.pd-section { margin-bottom: 3.5rem; }

.pd-section__eyebrow { margin-bottom: 0.75rem; }

.pd-section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.pd-section__body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-mid);
  max-width: 60ch;
}

.pd-section__body p { color: var(--text-mid); max-width: none; margin-bottom: 0.875rem; }

.journal-feature {
  background: var(--blue-deep);
  color: var(--white);
  padding: 2rem 2rem 2rem 1.75rem;
  border-left: 4px solid var(--green);
  margin-block: 2rem;
  position: relative;
}

.journal-feature__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.75rem;
  display: block;
}

.journal-feature__title {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--white);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.journal-feature__body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.82);
  max-width: 54ch;
}

.coming-soon-block {
  background: var(--paper);
  border: 1.5px dashed var(--rule-dark);
  padding: 1.75rem;
  margin-block: 2rem;
  position: relative;
}

.coming-soon-block__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  display: block;
}

.coming-soon-block__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.coming-soon-block__body {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: none;
}

.contact-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.625rem;
  background: rgba(107, 158, 94, 0.10);
  border: 1px solid rgba(107, 158, 94, 0.25);
  padding: 0.875rem 1.125rem;
  font-size: 0.875rem;
  color: var(--text-mid);
  margin-top: 1rem;
}

.contact-note a { color: var(--blue-deep); text-decoration: underline; }

.contact-note__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Past PD sessions */
.pd-archive {
  border-top: 1px solid var(--rule-mid);
  margin-top: 1rem;
}

.pd-archive-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
}

.pd-archive-item__year {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blue-deep);
  min-width: 60px;
  flex-shrink: 0;
}

.pd-archive-item__desc { color: var(--text-mid); }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.poster-card {
  background: var(--paper);
  border: 1px solid var(--rule-mid);
  border-top: 3px solid var(--blue-deep);
  aspect-ratio: 8.5 / 11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  gap: 0.625rem;
}

.pdi-req-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1rem;
}

.pdi-req-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-mid);
}

.pdi-req-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-top: 0.6em;
}

@media (max-width: 1023px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-sidebar { position: static; }
}

/* ─── Poster card native blocks ─────────────────────────────────────────── */
.poster-card .wp-block-image { margin: 0 !important; flex-shrink: 0; }
.poster-card .wp-block-image img { width: 100%; height: auto; display: block; }
.poster-card .wp-block-paragraph { max-width: none !important; margin: 0 !important; }
.poster-card .wp-block-heading { margin: 0 !important; }

/* ─── Contact note as native group ──────────────────────────────────────── */
.contact-note.wp-block-group { display: inline-flex !important; align-items: flex-start; }
.contact-note .wp-block-paragraph { margin: 0 !important; max-width: none !important; font-size: 0.875rem; }

/* ─── PD sidebar as native group ────────────────────────────────────────── */
.pd-sidebar.wp-block-group { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-link-list.wp-block-list { margin: 0 !important; padding: 0 !important; }
.sidebar-link-list.wp-block-list li { list-style: none !important; }
.sidebar-link-list.wp-block-list li a { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; color: var(--text-mid); padding: 0.5rem 0; border-bottom: 1px solid var(--rule); transition: color var(--transition); text-decoration: none !important; }
.sidebar-link-list.wp-block-list li:last-child a { border-bottom: none; }
.sidebar-link-list.wp-block-list li a:hover { color: var(--blue-deep); }
.sidebar-card .wp-block-paragraph { max-width: none !important; }

/* ─── PDI requirement boxes ─────────────────────────────────────────────── */
.pdi-box { margin-top: 1.5rem; background: var(--paper); border: 1px solid var(--rule-mid); padding: 1.75rem; }
.pdi-box--first { margin-top: 2rem; }
.pdi-box--blue { border-left: 4px solid var(--blue-deep); }
.pdi-box--green { border-left: 4px solid var(--green); }
.pdi-box__label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 1.25rem; max-width: none !important; }
.pdi-box--green .pdi-box__label { color: var(--green); }
.pdi-box--plain .pdi-box__label { color: var(--text-light); }
.pdi-box__body { font-size: 0.9375rem; line-height: 1.8; color: var(--text-mid) !important; max-width: none !important; margin-bottom: 0.75rem; }
.pdi-box__note { font-size: 0.875rem; line-height: 1.75; color: var(--text-mid) !important; margin-top: 0.75rem; max-width: none !important; }
/* ─── PD year/section labels ────────────────────────────────────────────── */
.pd-year-label { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-light); margin-bottom: 1rem; max-width: none !important; }
.pd-two-col-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }

/* ─── Native poster-grid + poster-card ──────────────────────────────────── */
.poster-grid.wp-block-group { margin-top: 1.5rem; }
.poster-card.wp-block-group { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.poster-card .wp-block-image { width: 100%; margin: 0 !important; }
.poster-card .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* empty image placeholder height when no src set */
.poster-card .wp-block-image:has(img[src=""]) { min-height: 80px; background: var(--rule); display: flex; align-items: center; justify-content: center; }
.poster-card .wp-block-heading { margin: 0 !important; font-size: 0.8125rem !important; }
.pd-two-col-grid.wp-block-group { margin-top: 1.5rem; }
.pdi-box .wp-block-buttons { margin-top: 1.25rem; }
/* ─── PD Event Grid (MTS PD Day poster + website cards) ─────────────────── */
.pd-event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; margin-top: 2rem; }
.pd-event-card { background: var(--paper); border: 1px solid var(--rule-mid); border-top: 3px solid var(--blue-deep); padding: 1.5rem; display: flex; flex-direction: column; }
.pd-event-card.wp-block-group { display: flex; flex-direction: column; }
/* Image placeholder in poster card */
.pd-event-card .wp-block-image { margin: 0 0 1rem !important; width: 100%; }
.pd-event-card .wp-block-image img { width: 100%; height: auto; display: block; border: 1px solid var(--rule-mid); }
.pd-event-card .wp-block-image:has(img[src=""]) { min-height: 120px; background: var(--rule); }
/* Push button to the bottom of its card */
.pd-event-card .wp-block-buttons { margin-top: auto !important; padding-top: 1.25rem; }
.pd-event-card .wp-block-button { width: fit-content; }
.pd-event-card .wp-block-button__link { white-space: normal; width: auto !important; }
/* Labels and text inside event cards */
.pd-event-card .pdi-box__label { margin-bottom: 0.5rem; }
.pd-event-card .pd-section__title { font-size: 1.125rem !important; margin-bottom: 0.75rem; }
.pd-event-card p { max-width: none !important; }

@media (max-width: 600px) {
  .pd-event-grid { grid-template-columns: 1fr; }
}

/* Single-poster variant — used on the MTS PD Day page, which has one event
   poster rather than a row of workshop posters. */
.poster-grid--single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}


/* ═══ Workshops (Query Loop over the mamt_workshop post type) ═══════════════
   Each result is one card: the poster fills the top, and the title sits in a
   tinted block underneath that runs the full width of the card.

   Two specificity notes, both load-bearing:
   - post-template renders a <ul>, and `.wp-block-post-content ul` in style.css
     sets `list-style: disc`. That rule is (0,1,1) so `.workshop-grid` alone
     loses to it and the titles render as bullets. Hence the descendant
     selector below.
   - the <li> is the card, so padding/borders go there, not on the inner blocks. */
.workshop-query { margin: 0; }

.wp-block-post-content .workshop-grid,
.workshop-grid {
  list-style: none !important;
  margin: 0;
  padding-left: 0 !important;
  gap: clamp(1.5rem, 3vw, 2.25rem) !important;
}

.wp-block-post-content .workshop-grid > li,
.workshop-grid > li {
  margin: 0;
  list-style: none !important;
  display: flex;
  flex-direction: column;
  background: var(--paper-warm);
  border: 2px solid var(--rule-mid);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.workshop-grid > li::marker { content: none; }

.workshop-grid > li:hover {
  border-color: var(--blue-deep);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Poster fills the top of the card, flush to the edges. */
.workshop-card__poster {
  margin: 0 !important;
  background: var(--blue-pale);
  overflow: hidden;
  line-height: 0;
  /* Every poster well is the same shape, so the cards line up in the grid
     whatever the client uploads. 566x800 is the ISO A-series proportion the
     MAMT posters are actually made at. */
  aspect-ratio: 566 / 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workshop-card__poster img {
  /* !important because core's own .wp-block-image img sizing is the same
     specificity — see the note on .hero-logo img in index.css. */
  width: 100% !important;
  height: 100% !important;
  /* contain, not cover: cropping a poster cuts off the date and the
     registration line. An off-ratio poster gets paper margins instead, and the
     card still matches its neighbours. */
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 400ms ease;
}

.workshop-card__poster.is-zoomable { cursor: zoom-in; }
.workshop-card__poster.is-zoomable:hover img { transform: scale(1.04); }
.workshop-card__poster.is-zoomable:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: -2px; }

/* The tinted block under the poster. */
.workshop-card__title {
  /* Sans, not the Cormorant the h3 would otherwise inherit from theme.json.
     A workshop title is a label on a card, not display type — the serif read
     as a mistake at this size. */
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.35;
  color: var(--charcoal) !important;
  margin: 0 !important;
  margin-top: auto !important;
  padding: 1rem 1.25rem 1.125rem;
  background: var(--white);
  border-top: 1px solid var(--rule-mid);
}

.workshops-heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1.75rem !important;
}

/* Show-more pager */
.workshop-more__wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.workshop-more[hidden], .workshop-more__wrap[hidden] { display: none; }

.workshop-more {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--blue-deep);
  background: transparent;
  border: 1.5px solid var(--blue-deep);
  border-radius: var(--radius-sm);
  padding: 0.75rem 2rem;
  transition: background var(--transition), color var(--transition);
}

.workshop-more:hover { background: var(--blue-deep); color: var(--white); }
.workshop-more:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }

.workshop-empty {
  padding: 2.5rem 0;
  color: var(--text-light) !important;
  font-style: italic;
}

/* ─── Poster modal ───────────────────────────────────────────────────────── */
body.has-modal-open { overflow: hidden; }

.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(30, 30, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  animation: poster-modal-in 180ms ease;
}

.poster-modal[hidden] { display: none; }

@keyframes poster-modal-in { from { opacity: 0; } to { opacity: 1; } }

.poster-modal__figure {
  margin: 0;
  max-width: min(900px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.poster-modal__img {
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--paper-warm);
  border: 1px solid rgba(255,255,255,0.15);
}

.poster-modal__caption {
  /* Matches .workshop-card__title — same label, expanded. */
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.9);
  text-align: center;
}

.poster-modal__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}

.poster-modal__close:hover { background: rgba(255,255,255,0.2); color: var(--white); }
.poster-modal__close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

@media (max-width: 599px) {
  .workshop-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  .poster-modal { animation: none; }
  .workshop-card__poster img { transition: none; }
  .workshop-card__poster.is-zoomable:hover img { transform: none; }
}

/* ─── Workshop posters board ───────────────────────────────────── */
/* A cool pale-blue ground with the graph-paper texture the page headers use,
   so the posters read as pinned to a board. Deliberately NOT `.section--blue`
   (that band force-centres its container and forces headings white, which broke
   the card titles) and NOT `.section--paper`, which is the same warm beige as
   the header above it. The warm-white cards sit on the cool ground with real
   separation. */
.workshops-section {
  background: var(--blue-pale);
  position: relative;
  overflow: hidden;
}

.workshops-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,92,142,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,92,142,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  pointer-events: none;
}

/* Lift the content over the overlay. */
.workshops-section > * { position: relative; z-index: 1; }

/* --rule-mid is a translucent blue that all but disappears on the pale blue
   ground; the cards need a firmer edge to read as objects on the board. */
.workshops-section .workshop-grid > li { border-color: var(--rule-dark); }

/* The poster well and the title strip were both --blue-pale, which is now the
   board itself — they would dissolve into it. Warm paper keeps the card whole. */
.workshops-section .workshop-card__poster { background: var(--paper); }
