/* Kłady / Grundrisse – black section with a grid of layout images */

.entry-content .morelo-klady {
	/* Full-bleed background even if the page content is wrapped */
	width: 100vw;
	width: 100dvw;
	max-width: 100vw;
	max-width: 100dvw;
	margin-left: calc(50% - 50vw);
	margin-left: calc(50% - 50dvw);
	margin-right: calc(50% - 50vw);
	margin-right: calc(50% - 50dvw);
}

.morelo-klady {
	background: radial-gradient(1100px 520px at 28% -10%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.0) 62%), #000;
	color: #fff;
	padding: 90px 0 70px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	overflow-x: clip;
}

@supports not (overflow-x: clip) {
	.morelo-klady {
		overflow-x: hidden;
	}
}

.morelo-klady-container {
	max-width: 1400px;
}

.morelo-klady .section-head {
	max-width: 1092px;
	margin: 0 auto 44px;
	padding: 0 20px;
	box-sizing: border-box;
}

.morelo-klady .section-kicker {
	color: rgba(255, 255, 255, 0.80);
}

.morelo-klady .section-title {
	color: #fff;
}

.morelo-klady-grid {
	max-width: 1092px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.morelo-klady-grid.is-swiper {
	display: flex;
	align-items: center;
}

.morelo-klady-swiper-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.morelo-klady-grid.is-swiper .morelo-klady-swiper-wrap {
	overflow: hidden;
}

.morelo-klady-swiper {
	position: relative;
}

.morelo-klady-grid.is-swiper .morelo-klady-swiper {
	overflow: hidden;
}

/* Grid mode (<=4): treat wrapper as a grid */
.morelo-klady-grid:not(.is-swiper) .swiper-wrapper {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(18px, 2.6vw, 60px);
	justify-items: center;
	align-items: end;
}

.morelo-klady-grid:not(.is-swiper) .swiper-slide {
	height: auto;
}

/* Swiper mode (>4): Swiper will set wrapper to flex; just align nicely */
.morelo-klady-grid.is-swiper .swiper-wrapper {
	align-items: flex-end;
}

.morelo-klady-slide {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	height: auto;
	padding: clamp(12px, 2.5vw, 36px);
	box-sizing: border-box;
}

.morelo-klady-item {
	margin: 0;
	text-align: center;
	width: auto;
}

.morelo-klady-media {
	display: grid;
	place-items: end center;
}

.morelo-klady-media .morelo-klady-lightbox-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.morelo-klady-media a {
	cursor: pointer;
}

.morelo-klady-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(560px, 62vh);
	object-fit: contain;
}

.morelo-klady-image--placeholder {
	aspect-ratio: 3 / 8;
	background: rgba(255, 255, 255, 0.06);
	border: 1px dashed rgba(255, 255, 255, 0.22);
}

.morelo-klady-label {
	margin: 16px 0 0;
	font-weight: 900;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	font-size: 0.92rem;
	color: rgba(255, 255, 255, 0.92);
}

.morelo-klady-label a {
	color: inherit;
	text-decoration: none;
}

.morelo-klady-label a:hover {
	text-decoration: underline;
}

@media (max-width: 980px) {
	.morelo-klady {
		padding: 70px 0 60px;
	}

	.morelo-klady .section-head {
		margin-bottom: 34px;
	}

	.morelo-klady-grid:not(.is-swiper) .swiper-wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.morelo-klady-grid:not(.is-swiper) .swiper-wrapper {
		grid-template-columns: 1fr;
	}
}

/* Swiper arrows (only meaningful when `.is-swiper` is set) */
.morelo-klady-nav {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border-radius: 999px;
	border: 2px solid rgba(255, 255, 255, 0.80);
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	z-index: 3;
	cursor: pointer;
}

.morelo-klady-prev {
	order: -1;
	margin-right: 10px;
}

.morelo-klady-next {
	margin-left: 10px;
	transform: translateY(-10px);
}

.morelo-klady-nav:hover {
	background: rgba(0, 0, 0, 0.55);
}

.morelo-klady-nav::before {
	content: '';
	position: absolute;
	inset: 0;
	background: transparent;
}

.morelo-klady-prev::after,
.morelo-klady-next::after {
	content: '‹';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	opacity: 1;
}

.morelo-klady-next::after {
	content: '›';
}

.morelo-klady-grid:not(.is-swiper) .morelo-klady-nav {
	display: none;
}

