/* Projects page featured row — Figma 686:1040. Four bordered cards; the 2nd and 4th visible card are taller (photo 224 vs 340 at 1440). */
.wp-block-post-content > .scico-projects-featured { margin-block-start: 0; }

.scico-projects-featured { box-sizing: border-box; margin-block-start: 0; padding: 32px 96px 96px; background: #fff; }
.scico-projects-featured[hidden] { display: none; }
.scico-projects-featured__inner { width: min(100%, var(--projects-featured-contentWidth, 1248px)); margin-inline: auto; }
/* The row has no visible title in Figma; the heading stays for screen readers. */
.scico-projects-featured__heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.scico-projects-featured__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 16px; margin: 0; padding: 0; list-style: none; }
.scico-projects-featured__card { position: relative; display: flex; min-width: 0; box-sizing: border-box; flex-direction: column; gap: 16px; margin: 0; padding: 14px; border: 1px solid var(--projects-featured-borderColor, #eaeaea); border-radius: 8px; background: #fff; }
.scico-projects-featured__card[hidden] { display: none; }

.scico-projects-featured__media { position: relative; overflow: hidden; border-radius: 6px; background: #f3efe5; aspect-ratio: 274.75 / 224; }
.is-staggered .scico-projects-featured__card:nth-child(even) .scico-projects-featured__media { aspect-ratio: 274.75 / 340; }
/* With filters some cards are hidden; count only the visible ones where the browser can. */
@supports selector(:nth-child(1 of a)) {
	.is-staggered .scico-projects-featured__card:nth-child(even) .scico-projects-featured__media { aspect-ratio: 274.75 / 224; }
	.is-staggered .scico-projects-featured__card:nth-child(even of :not([hidden])) .scico-projects-featured__media { aspect-ratio: 274.75 / 340; }
}
.scico-projects-featured__image { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Photos stay grey like Figma and turn to their own colours on hover or keyboard focus. */
.scico-projects-featured.is-grayscale .scico-projects-featured__image { filter: grayscale(1); }
.scico-projects-featured.is-grayscale .scico-projects-featured__card:has(a:focus-visible) .scico-projects-featured__image { filter: grayscale(0); }

.scico-projects-featured__badges { position: absolute; top: 12px; inset-inline: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.scico-projects-featured__badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; color: #fff; font-size: var(--projects-featured-badgeSize, 11px); font-weight: 500; line-height: 1.5; white-space: nowrap; }
.scico-projects-featured__badge img { display: block; flex: 0 0 auto; }
.scico-projects-featured__badge.is-featured { background: var(--projects-featured-badgeBackground, #000); }
/* Figma: 20% black; a touch darker with blur so the label reads on light photos. */
.scico-projects-featured__badge.is-status { background: rgb(0 0 0 / 32%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.scico-projects-featured__body { display: flex; flex-direction: column; gap: 8px; padding-inline: 2px; }
.scico-projects-featured__row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.scico-projects-featured__title { min-width: 0; margin: 0; color: var(--projects-featured-titleColor, #000); font-size: var(--projects-featured-titleSize, 17px); font-weight: var(--projects-featured-titleWeight, 800); line-height: 1.5; }
.scico-projects-featured__usage { flex: 0 0 auto; color: var(--projects-featured-textColor, #000); font-size: var(--projects-featured-metaSize, 14px); font-weight: 600; line-height: 1.5; }
.scico-projects-featured__location { margin: 0; color: var(--projects-featured-mutedColor, #767676); font-size: var(--projects-featured-metaSize, 14px); font-weight: 500; line-height: 1.5; }
.scico-projects-featured__footer { margin-top: 4px; }
.scico-projects-featured__service { flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--projects-featured-tagBorder, #000); border-radius: 4px; color: var(--projects-featured-tagColor, #4c504a); font-size: 12px; font-weight: 500; line-height: 1.5; }
.scico-projects-featured__details { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; color: var(--projects-featured-textColor, #000); font-size: var(--projects-featured-metaSize, 14px); font-weight: 600; line-height: 1.5; text-decoration: none; }
/* Whole card is the link target; one tab stop per card. */
a.scico-projects-featured__details::after { position: absolute; inset: 0; border-radius: 8px; content: ""; }
a.scico-projects-featured__details:focus-visible { outline: none; }
.scico-projects-featured__card:has(a.scico-projects-featured__details:focus-visible) { outline: 2px solid #4c504a; outline-offset: 2px; }
/* Figma arrow-left-02: the 8×12 SVG turned with rotate(-90) scaleX(-1) inside a 16px frame. */
.scico-projects-featured__arrow { display: flex; width: 16px; height: 16px; flex: 0 0 auto; align-items: center; justify-content: center; }
.scico-projects-featured__arrow img { display: block; transform: rotate(-90deg) scaleX(-1); }

/* Hover: the card lifts, the photo eases in and takes its colour, the arrow nudges forward (left in RTL). */
.scico-projects-featured__card { transition: transform 300ms ease, box-shadow 300ms ease; }
.scico-projects-featured__image { transition: transform 700ms cubic-bezier(.2, .7, .2, 1), filter 500ms ease; }
.scico-projects-featured__arrow { transition: transform 300ms ease; }
@media (hover: hover) {
	.scico-projects-featured__card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgb(19 22 17 / 8%); }
	.scico-projects-featured__card:hover .scico-projects-featured__image { transform: scale(1.04); }
	.scico-projects-featured.is-grayscale .scico-projects-featured__card:hover .scico-projects-featured__image { filter: grayscale(0); }
	.scico-projects-featured__card:hover .scico-projects-featured__arrow { transform: translateX(-4px); }
}
@media (prefers-reduced-motion: reduce) {
	.scico-projects-featured__card,
	.scico-projects-featured__image,
	.scico-projects-featured__arrow { transition: none; }
	.scico-projects-featured__card:hover,
	.scico-projects-featured__card:hover .scico-projects-featured__image,
	.scico-projects-featured__card:hover .scico-projects-featured__arrow { transform: none; }
}

@media (max-width: 1100px) {
	.scico-projects-featured { padding: 24px 32px 80px; }
	.scico-projects-featured__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* Two columns line up in rows, so the stagger would leave holes; all photos take the short ratio. */
	.scico-projects-featured.is-staggered .scico-projects-featured__card:nth-child(n) .scico-projects-featured__media { aspect-ratio: 274.75 / 224; }
}

/* One column on phones: equal photos, no stagger. */
@media (max-width: 600px) {
	.scico-projects-featured { padding: 16px 16px 64px; }
	.scico-projects-featured__badge { font-size: max(var(--projects-featured-badgeSize, 11px), 12px); }
	.scico-projects-featured__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.scico-projects-featured__card { padding: 12px; gap: 14px; }
	.scico-projects-featured__media,
	.scico-projects-featured.is-staggered .scico-projects-featured__card:nth-child(n) .scico-projects-featured__media { aspect-ratio: 16 / 11; }
	.scico-projects-featured__title { font-size: min(var(--projects-featured-titleSize, 17px), 16px); }
}
