/* Modify Category Grid — structural CSS. Fonts/colours come from widget controls. */
.mcg { width: 100%; }
.mcg * { box-sizing: border-box; }
.mcg .mcg__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.mcg .mcg__item { position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; overflow: hidden; }
.mcg .mcg__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #e9e9e6; }
.mcg .mcg__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: background-color .3s ease; }
.mcg .mcg__media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .6s ease; }
.mcg .mcg__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 0 0; }
.mcg .mcg__title { margin: 0 0 8px; font-family: inherit; line-height: 1.25; }
.mcg .mcg__link { color: inherit; text-decoration: none; }
.mcg .mcg__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.mcg .mcg__link:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.mcg .mcg__desc { margin: 0 0 10px; font-family: inherit; }
.mcg .mcg__count { display: block; font-size: .8em; opacity: .7; margin: 0 0 8px; }
.mcg .mcg__cta { display: inline-block; margin-top: auto; font-family: inherit; }
.mcg-empty { padding: 16px; border: 1px dashed #bbb; text-align: center; font-size: 13px; color: #666; }

/* Overlay skin */
.mcg.mcg--overlay .mcg__item { display: block; }
.mcg.mcg--overlay .mcg__body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 28px 20px 20px; color: #fff; background: linear-gradient(to top, color-mix(in srgb, var(--mcg-grad, #000) 78%, transparent), transparent); pointer-events: none; }
.mcg.mcg--overlay .mcg__title,
.mcg.mcg--overlay .mcg__desc,
.mcg.mcg--overlay .mcg__count,
.mcg.mcg--overlay .mcg__cta { color: #fff; margin-bottom: 6px; }

@media (max-width: 1024px) { .mcg .mcg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .mcg .mcg__grid { grid-template-columns: minmax(0, 1fr); } }

/* Cover project title */
.mcg .mcg__media > .mcg__ptitle { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 16px 12px; font-size: .8em; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); pointer-events: none; }
.mcg .mcg__body > .mcg__ptitle { display: block; font-size: .8em; opacity: .7; margin: 0 0 8px; }
.mcg.mcg--overlay .mcg__media > .mcg__ptitle { display: none; }
.mcg.mcg--overlay .mcg__body > .mcg__ptitle { color: #fff; }
