/* Gallery geometry follows the observed EFFEKT .gallery-list rules.
 * Root typography is owned by theme.css: rem units intentionally remain fluid.
 */
.k2y-project-gallery {
	position: relative;
	width: auto;
	max-width: none;
	margin: 0 3rem 1.5rem;
}

.k2y-project-gallery .k2y-project-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(425px, 1fr));
	column-gap: 1.5rem;
	row-gap: 1.5rem;
}

.k2y-project-gallery .k2y-project-card {
	position: relative;
	min-width: 0;
	margin: 0;
}

.k2y-project-gallery .k2y-project-card__link {
	position: relative;
	display: block;
	color: inherit;
	text-decoration: none;
}

.k2y-project-gallery .k2y-project-card__media {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #e6e6e6;
}

.k2y-project-gallery .k2y-project-card__media::after {
	content: "";
	display: block;
	width: 100%;
	height: 0;
	padding-bottom: 61%;
}

.k2y-project-gallery .k2y-project-card__image {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--k2y-project-focal, center);
}

.k2y-project-gallery .k2y-project-card__image {
	transition: opacity .25s ease-out;
}

.k2y-project-gallery .k2y-project-card__overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, .5);
	opacity: 0;
	will-change: opacity;
	transition: opacity .24s ease-out;
}

.k2y-project-gallery .k2y-project-card__link:hover .k2y-project-card__overlay,
.k2y-project-gallery .k2y-project-card__link:focus-visible .k2y-project-card__overlay {
	opacity: 1;
}

.k2y-project-gallery .k2y-project-card__link:focus-visible {
	outline: 2px solid #111;
	outline-offset: 4px;
}

.k2y-project-gallery .k2y-project-card__meta {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	padding: 1.16rem;
}

.k2y-project-gallery .k2y-project-card__title {
	flex: 1;
	margin: 0;
	color: #fff;
	font-family: inherit;
	font-size: clamp(1.206rem, 1.161rem + .199vw, 1.34rem);
	font-weight: 700;
	font-style: normal;
	line-height: 110%;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	overflow-wrap: anywhere;
}

.k2y-project-gallery .k2y-project-card--no-image {
	align-self: start;
}

.k2y-project-gallery .k2y-project-card--no-image .k2y-project-card__link {
	padding: .6rem 0;
	text-decoration: underline;
	text-underline-offset: .2em;
}

.k2y-project-gallery .k2y-project-card--no-image .k2y-project-card__title {
	color: #111;
	font-size: 1rem;
	font-weight: 400;
	line-height: 150%;
}

.k2y-project-gallery .k2y-project-gallery__empty {
	margin: 0;
}

@media (max-width: 980px) {
	.k2y-project-gallery .k2y-project-grid {
		grid-template-columns: repeat(auto-fill, minmax(297.5px, 1fr));
	}
}

@media only screen and (max-width: 640px) {
	.k2y-project-gallery {
		margin: 0 1.5rem 1.5rem;
	}

	.k2y-project-gallery .k2y-project-grid {
		grid-template-columns: 1fr;
	}
}

/* Touch has no dependable hover: keep the project name readable. */
@media (hover: none), (pointer: coarse) {
	.k2y-project-gallery .k2y-project-card__overlay {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.k2y-project-gallery .k2y-project-card__image,
	.k2y-project-gallery .k2y-project-card__overlay {
		transition: none;
	}
}
