/* Kabelwerk Saalplan – Vorschau-Grid + Modal
   Farb-Akzente über Custom Properties ans Theme anpassbar:
   .kws-grid { --kws-accent: #6b6b3a; } */

.kws-grid {
	--kws-accent: #6b6b3a;
	--kws-line: rgba(0, 0, 0, 0.12);
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 28px 24px;
	margin: 1.5em 0;
}

.kws-card {
	margin: 0;
}

.kws-open {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid var(--kws-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	cursor: zoom-in;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.kws-open:hover,
.kws-open:focus-visible {
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
	transform: translateY(-2px);
}

.kws-open:focus-visible {
	outline: 2px solid var(--kws-accent);
	outline-offset: 2px;
}

.kws-open img {
	display: block;
	width: 100%;
	height: auto;
}

.kws-card figcaption {
	padding: 10px 2px 0;
	line-height: 1.4;
}

.kws-title {
	display: block;
	font-weight: 700;
}

.kws-caption {
	display: block;
	font-size: 0.88em;
	opacity: 0.75;
}

/* ---------- Modal ---------- */

.kws-modal {
	width: min(1100px, 94vw);
	max-height: 94vh;
	padding: 0;
	border: none;
	border-radius: 12px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.kws-modal::backdrop {
	background: rgba(20, 20, 22, 0.72);
}

.kws-modal-inner {
	display: flex;
	flex-direction: column;
	max-height: 94vh;
}

.kws-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.kws-modal-head h2 {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.kws-modal-head .kws-modal-caption {
	display: block;
	font-size: 0.85rem;
	font-weight: 400;
	opacity: 0.7;
}

.kws-close {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 50%;
	background: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.kws-close:hover {
	background: #f2f2ef;
}

.kws-modal-body {
	overflow: auto;
	background: #f6f5f3;
}

.kws-modal-body img {
	display: block;
	width: 100%;
	height: auto;
}

.kws-modal-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 12px 18px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.kws-modal-note {
	font-size: 0.8rem;
	opacity: 0.65;
}

.kws-download {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 999px;
	background: var(--kws-accent, #6b6b3a);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.kws-download:hover,
.kws-download:focus {
	filter: brightness(1.12);
	color: #fff;
}

@media (max-width: 600px) {
	.kws-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 18px 14px;
	}
}
