/**
 * Bridge WordPress flexi markup to the design CSS selectors.
 * Design CSS is the source of truth; this only maps WP wrappers.
 */

/* Soft-reset starter leftovers that may still leak in. */
body.dz-site {
  margin: 0;
  color: var(--forest, #203129);
  background: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.625;
}

body.dz-site h1,
body.dz-site h2,
body.dz-site h3 {
  font-family: Poppins, Arial, sans-serif;
  font-weight: 700;
}

body.dz-site img {
  display: block;
  max-width: 100%;
}

/* Catalogue sections mirror design .flex-block wrappers. */
.dz-flexi.flex-block {
  scroll-margin-top: 7rem;
}

/* Compact hero lives on a WP wrapper; keep design .flex-hero rules intact. */
.dz-flexi.flex-hero-block > .flex-hero {
  /* design .flex-hero already styles this */
}

/* Demo padding comes from design .flex-demo; ensure nested WP sections inherit. */
.dz-flexi .flex-demo > .resources-cta,
.dz-flexi .flex-demo > .community-newsletter {
  margin-top: 0;
}

.dz-flexi .flex-demo .resource-group:first-child {
  margin-top: 0;
}

.dz-flexi .flex-demo > .article-copy > h2:first-child {
  margin-top: 0;
}

/* Map teaser / wander card sit inside .dz-flexi but use design classes. */
.dz-flexi .wander-card.animated-gradient {
  /* styles.css + flexiblock.css handle appearance */
}

/* Project cards in the catalogue grid should fill the grid cell, not carousel widths. */
.flex-card-grid > .project-card {
  flex: none;
  width: auto;
  min-width: 0;
}

/* Avoid theme content containers shrinking design full-bleed strips. */
body.flexiblock-page #main-content,
body.flexiblock-page .site-main {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Soften WP admin-bar offset if present. */
body.admin-bar.flexiblock-page {
  scroll-padding-top: 8.5rem;
}

/* Partner strip — match design logo sizes (kildare / climate / government). */
.flex-partners .partners {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.flex-partners .partners img {
  display: block;
  height: 2.5rem;
  width: auto;
  max-height: 2.5rem;
  object-fit: contain;
  flex: none;
}

.flex-partners .partners img:nth-child(1) {
  width: 9.625rem;
  height: auto;
}

.flex-partners .partners img:nth-child(2) {
  width: 4.375rem;
  height: auto;
}

.flex-partners .partners img:nth-child(3) {
  width: 6.25rem;
  height: auto;
}

/* Rich text figure inside article copy (design flexiblock). */
.flex-rich-text .flex-figure {
  margin: 1.5rem 0 0;
}

.flex-rich-text .flex-figure > img,
.flex-rich-text .article-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1.85;
  object-fit: cover;
  border-radius: 0.5rem;
}

.flex-rich-text .flex-figure figcaption {
  font-size: 0.75rem;
  color: #657168;
  line-height: 1.5;
  margin-top: 0.65rem;
}
