/**
 * Section: Projects (layout "projects").
 *
 * Figma: section/projects 1598:47697 (file Tw5TKCmoQyCrrGnkEDwfLS, metadata
 * pulled 2026-09-15; REF/17-section-projects.md for type and buttons).
 * Column, centred, 24px gaps: text/header (header/XL title + body/XS grey
 * subtitle, 8px apart, left-aligned), maparea, then the 284px "See More"
 * button/M. The maparea is parts/components/map-preview.php; its defaults are
 * this section's positions (pin top 178, button top 295).
 *
 * Mobile, measured off the Planning screen in REF/HOMZ.zip: header/L title,
 * "See More" as wide as its label.
 */

.projects-section__inner {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	align-items: center;
}

.projects-section__header {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	align-self: stretch;
}

.projects-section__title {
	font: var(--type-header-l);
	color: var(--color-text-dark);
}

.projects-section__subtitle {
	font: var(--type-body-xs);
	color: var(--color-text-grey);
}

/* As wide as its label on mobile (about 139px); 284 from desktop. */
.projects-section__more {
	max-width: 100%;
}

@media (min-width: 64rem) {
	.projects-section__title {
		font: var(--type-header-xl);
	}

	.projects-section__more {
		width: 17.75rem; /* 284 */
	}
}

/* ------------------------------------------------------------------
 * Cards row: slider/projects 1598:47537 (cards 16px apart) with the
 * pagination 16px under it, right-aligned (1598:47546): two 40px outlined
 * buttons 16px apart, radius 8, 16px icons. The inactive direction keeps the
 * light border, the active one border/dark.
 *
 * Not in the design: the row scrolls (Figma shows five cards overflowing the
 * 1220 container), and how far the buttons scroll (one card).
 * ---------------------------------------------------------------- */

.projects-slider {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-self: stretch;
	min-width: 0;
}

.projects-slider__track {
	display: flex;
	gap: 1rem;
	padding: 0;
	margin: 0;
	overflow-x: auto;
	list-style: none;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.projects-slider__track::-webkit-scrollbar {
	display: none;
}

.projects-slider__item {
	display: flex;
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.projects-slider__pagination {
	display: flex;
	gap: 1rem;
	justify-content: flex-end;
}

.projects-slider__button {
	display: grid;
	place-items: center;
	width: 2.5rem; /* 40 */
	height: 2.5rem;
	padding: 0.625rem;
	color: var(--color-text-dark);
	cursor: pointer;
	background: none;
	border: 1px solid var(--color-border-dark);
	border-radius: 0.5rem;
}

.projects-slider__button svg {
	width: 1rem;
	height: 1rem;
}

.projects-slider__button[aria-disabled="true"] {
	color: var(--color-border-light);
	cursor: default;
	border-color: var(--color-border-light);
}

@media (prefers-reduced-motion: reduce) {
	.projects-slider__track {
		scroll-behavior: auto;
	}
}
