/**
 * Gallery — index.tsx GallerySection
 */

.gallery-section {
	padding: var(--wc-section-padding-y) var(--wc-section-padding-x);
	background: var(--wc-color-bg);
}

.gallery-section__inner {
	max-width: var(--wc-container-max);
	margin-inline: auto;
}

.gallery-section__headline {
	margin-bottom: 4rem;
	text-align: center;
}

.gallery-section__title {
	margin: 0;
	font-family: var(--wc-font-heading);
	font-size: clamp(1.875rem, 4vw, 3rem);
	font-weight: var(--wc-font-weight-extrabold);
	line-height: 1.2;
	color: var(--wc-color-text);
	text-transform: uppercase;
}

.gallery-section__highlight {
	font-weight: var(--wc-font-weight-extrabold);
	color: var(--wc-color-brand);
	text-transform: uppercase;
}

.gallery-section__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wc-gap-cards);
}

.gallery-section__card {
	margin: 0;
}

.gallery-section__card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.gallery-section__card-link:hover .gallery-section__card-title,
.gallery-section__card-link:focus-visible .gallery-section__card-title {
	color: var(--wc-color-brand);
}

.gallery-section__card-label {
	margin: 0.85rem 0 0.35rem;
	font-family: var(--wc-font-body);
	font-size: var(--wc-font-size-xs, 0.75rem);
	font-weight: var(--wc-font-weight-bold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wc-color-brand);
}

.gallery-section__card-title {
	margin: 0 0 0.35rem;
	font-family: var(--wc-font-heading);
	font-size: var(--wc-font-size-base);
	font-weight: var(--wc-font-weight-bold);
	text-transform: uppercase;
	color: var(--wc-color-black);
	transition: color var(--wc-transition);
}

.gallery-section__card-excerpt {
	margin: 0;
	font-family: var(--wc-font-body);
	font-size: var(--wc-font-size-sm);
	line-height: 1.5;
	color: var(--wc-color-text-muted);
}

.gallery-section__media {
	overflow: hidden;
	border-radius: var(--wc-radius-lg);
}

.gallery-section__media-placeholder {
	display: block;
	width: 100%;
	height: 16rem;
	background: var(--wc-color-bg-muted);
}

.gallery-section__media img {
	display: block;
	width: 100%;
	height: 16rem;
	object-fit: cover;
	transition:
		transform 0.5s ease,
		filter 0.5s ease;
}

/* Mittleres Projekt: Bild +2rem höher */
.gallery-section__card--center .gallery-section__media img,
.gallery-section__card--center .gallery-section__media-placeholder {
	height: calc(16rem + 2rem);
}

.gallery-section__media--grayscale img {
	filter: grayscale(100%);
}

.gallery-section__media--grayscale:hover img,
.gallery-section__media--grayscale:focus-within img {
	filter: grayscale(0%);
}

.gallery-section__media:not(.gallery-section__media--grayscale):hover img,
.gallery-section__media:not(.gallery-section__media--grayscale):focus-within img {
	transform: scale(1.05);
}

@media (min-width: 768px) {
	.gallery-section {
		padding: var(--wc-section-padding-y-lg) var(--wc-section-padding-x);
	}

	.gallery-section__headline {
		margin-bottom: 4rem;
	}

	.gallery-section__title {
		font-size: clamp(2.25rem, 4vw, 3rem);
	}

	.gallery-section__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gallery-section__media img,
	.gallery-section__media-placeholder {
		height: 20rem;
	}

	.gallery-section__card--center .gallery-section__media img,
	.gallery-section__card--center .gallery-section__media-placeholder {
		height: calc(20rem + 2rem);
	}
}

@media (min-width: 1024px) {
	.gallery-section__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-section__media img {
		transition: none;
	}
}
