/* Legacy-parity text rendering: the old Creditas site sets
 * -webkit-font-smoothing: antialiased globally, which renders type
 * lighter/thinner on macOS. Webflow Code Components live in isolated
 * shadow roots, so this must be declared per-component on :host to
 * inherit into the shadow tree (the property does not cross the
 * shadow boundary). Without it, Blink defaults to subpixel smoothing
 * and identical 400-weight text looks heavier than the old site. */
:host {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * MediaGallery — white-background section with a 3-column card grid.
 *
 * Class naming: single-class, no BEM `__` separator; element rules nested
 * under `.media-gallery`. The section CTA is `.cta-link` (not `.cta`) to avoid
 * the global `.cta` block; the card's title is `.card-title` (see
 * MediaGalleryCard.css) so `.media-gallery .title` doesn't reach the cards.
 *
 * Tokens inlined from @creditas-ui/themes standard:
 *   colors.neutral.0 #ffffff  .100 #292929  primary.40 #8edb00  primary.60 #4f9e00
 *   section padding-block: 64px mobile → 96px desktop (1024px+)
 *   container: max-width 1200px, margin 0 auto, width 90% · grid gap: 24px
 */

.media-gallery,
.media-gallery *,
.media-gallery *::before,
.media-gallery *::after {
  box-sizing: border-box;
}

.media-gallery {
  background-color: #ffffff;
  padding-block: 64px;
  font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
  color: #292929;

  @media (min-width: 1024px) {
    padding-block: 96px;
  }

  /* ---------- container -------------------------------------------- */

  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }

  /* ---------- pre-title -------------------------------------------- */

  .pre-title {
    margin: 0 0 8px;
    font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4f9e00;
  }

  /* ---------- title ------------------------------------------------- */

  .title {
    margin: 0 0 40px;
    font-family: 'Maison Neue Extended', 'Maisonneueextended',
      'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
    font-weight: 500;
    font-size: 32px;
    line-height: 40px;
    color: #292929;
  }

  /* ---------- cards grid ------------------------------------------- */

  .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--media-gallery-cards-gap, 24px);

    &.grid--grid {
      @media (min-width: 768px) {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    &.grid--row,
    &.grid--column {
      display: flex;
    }

    &.grid--row {
      flex-flow: row wrap;
    }

    &.grid--column {
      flex-direction: column;
    }

    /* Flatten Webflow's slot wrapper so each MediaGalleryCard code-island
     * becomes a direct grid item of the cards container. */
    ::slotted(*) {
      display: contents;
    }
  }

  /* ---------- CTA --------------------------------------------------- */

  .cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
  }

  .cta-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #4f9e00;
    text-decoration: none;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.8;
    }

    &:focus-visible {
      outline: 2px solid #4f9e00;
      outline-offset: 2px;
    }
  }
}

