/* ==========================================================================
   kontextsensitiv.design – Unterseiten
   (Über/Leistung, Kontakt, Textseiten, Referenzen, Referenz-Detail)
   Maße nach der bisherigen Seite bei 1440 px Fensterbreite.
   ========================================================================== */

/* ---------- Scrollbare Inhaltsseiten ---------- */
.ks-scroll .ks-main { position: relative; inset: auto; }
.ks-page {
	position: relative; z-index: 2;
	min-height: 100vh;
	padding: 200px var(--ks-side) calc(70px + var(--ks-footer-h));
}
.ks-container { width: 92%; max-width: 1250px; margin: 0 auto; }
.ks-container--narrow { max-width: 900px; }

/* Vollflächiges Hintergrundbild hinter dem Rahmen */
.ks-pagebg {
	position: fixed; inset: 0; z-index: 0;
	background-size: cover; background-repeat: no-repeat; background-color: #111;
	background-position: var(--ks-focus-fix, center) center;
}
@media (max-aspect-ratio: 1/1) {
	.ks-pagebg { background-position: var(--ks-focus-fix, var(--ks-focus, center)) center; }
}
.ks-pagebg__overlay { position: absolute; inset: 0; background: #000; opacity: .2; }

/* Textspalte rechts (5/12 frei, 6/12 Text – wie das alte Raster) */
.ks-col-text {
	margin-left: calc((100% + 30px) * .416667 - 15px);
	width: calc((100% + 30px) * .5);
	padding: 0 15px;
	color: #fff;
}

.ks-h2 { font-size: 44.8px; line-height: 1.18; font-weight: 400; color: #fff; }
.ks-separator { width: 70px; height: 4px; margin: 10px 0; background: #fff; }
.ks-separator--tight { margin: 10px 0 0; }
.ks-separator--dark { width: 80px; margin: 20px 0; background: #292929; }
.ks-subtitle {
	position: relative;
	margin: 20px 0 20px; padding-top: 12px;
	font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; font-size: 16px; line-height: 18px;
	color: #fff; opacity: .8;
}
.ks-legend { padding-bottom: 10px; line-height: 24px; color: #fff; }

/* Fließtext aus dem Editor */
.ks-content { line-height: 24px; }
.ks-content p { padding-bottom: 10px; }
.ks-content a:hover { text-decoration: line-through; }
.ks-content ul, .ks-content ol { padding: 0 0 10px 25px; }
.ks-content ul { list-style: disc; }
.ks-content ol { list-style: decimal; }
.ks-content li { line-height: 1.2; }
.ks-content strong { font-weight: inherit; }
.ks-content .wp-block-spacer { margin: 0; }
.ks-content h2, .ks-content h3 { font-size: 18px; line-height: 1.4; margin: 20px 0 8px; }
.ks-content h4 { font-family: var(--ks-font-bold); font-size: 16px; line-height: 20px; text-transform: uppercase; padding-bottom: 10px; }
.ks-page--hintergrund .ks-content > p:first-child { margin-top: 34px; }
.ks-page--hintergrund .ks-content > .ks-leistung:first-child { margin-top: -20px; }

/* Leistungsbox */
.ks-leistung { position: relative; padding: 20px 0 20px 60px; }
.ks-leistung__icon { position: absolute; left: 0; top: 22px; width: 25px; height: 22px; fill: #ccc; }
.ks-leistung h4 { color: #fff; }

/* ---------- Kontakt ---------- */
.ks-kontakt__cols { display: flex; margin: 81px -15px 0; color: #fff; }
.ks-kontakt__text { width: 33.3333%; padding: 0 15px; }
.ks-kontakt__form { width: 66.6667%; padding: 0 15px; }
.ks-content .contact-list { list-style: none; padding: 15px 0 0; margin-top: 15px; position: relative; }
.ks-content .contact-list::before {
	content: ""; position: absolute; top: -4px; left: 0; width: 56px; height: 2px; background: #fff;
}
.ks-content .contact-list li { padding: 6px 0; }
.ks-kontakt__text .contact-list:first-of-type li:first-child { padding-top: 42px; } /* Abstand wie bisher (alte Liste war verschachtelt) */
.ks-content .contact-list a { font-size: 16px; line-height: 1.2; }

.ks-form p { padding-bottom: 10px; line-height: 24px; }
.ks-form label { color: #fff; }
.ks-form input[type="text"], .ks-form input[type="email"], .ks-form textarea {
	display: block; max-width: 100%;
	padding: 7px 10px; border: 0; border-radius: 3px;
	background: #fff; color: #000; font-size: 13.33px;
}
.ks-form input[type="text"], .ks-form input[type="email"] { width: 292px; }
.ks-form textarea { width: 357px; height: 169px; resize: vertical; display: inline-block; vertical-align: baseline; margin-bottom: 4px; }
.ks-form input[type="submit"] {
	padding: 7px 10px; border: 0; border-radius: 3px; background: #fff; color: #000;
	font-size: 13.33px; cursor: pointer;
}
.ks-form input[type="submit"]:hover { background: #ddd; }
.ks-form__hint { font-size: 11px; line-height: 18px; opacity: .8; max-width: 420px; }
.ks-form__hint a { text-decoration: underline; }
.ks-form__msg { padding: 10px 14px !important; margin-bottom: 15px; border-radius: 3px; }
.ks-form__msg--ok { background: rgba(255,255,255,.15); }
.ks-form__msg--err { background: rgba(160,0,0,.6); }
.ks-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */
.ks-whitepanel {
	position: fixed; top: 0; bottom: 0; left: 0; z-index: 0;
	width: 100%; /* Textseiten komplett weiß (früher: rechts grauer Streifen) */
	background: #fff;
}
.ks-page--text { padding-top: 140px; }
.ks-col-main { width: calc((100% + 30px) * .666667 - 30px); }
.ks-page-title { font-size: 62.5px; line-height: 73px; text-transform: uppercase; margin-bottom: 10px; }
.ks-content--dark { color: #000; }
.ks-content--dark blockquote, .ks-content--dark .wp-block-quote {
	margin: 0 0 20px; padding: 10px 20px; border-left: 15px solid #eee; font-size: 17.5px;
}
.ks-content--dark blockquote p {
	font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; font-size: 14px;
	color: #494949; padding: 10px 0;
}

/* Nach-oben-Knopf */
.ks-to-top {
	position: absolute; top: -53px; right: 51px;
	width: 40px; height: 40px; display: grid; place-items: center;
	background: rgba(0,0,0,.81); color: #fff;
	opacity: 0; visibility: hidden; transition: opacity 300ms linear, visibility 300ms linear;
}
.ks-to-top svg { width: 13px; height: 20px; fill: currentColor; }
.ks-to-top.is-visible { opacity: 1; visibility: visible; }
.ks-to-top:hover { opacity: .8; }

/* ---------- 404 ---------- */
.ks-404 { color: #fff; text-align: center; padding-top: 10vh; }
.ks-404 .ks-separator { margin: 10px auto; }

/* ==========================================================================
   Referenzen (Übersicht)
   ========================================================================== */
.ks-refs__viewport {
	position: absolute; left: 0; right: 0; top: 0; bottom: 15px;
	overflow-x: auto; overflow-y: hidden;
	scrollbar-width: none; -ms-overflow-style: none;
	background: #fff;
	cursor: grab;
}
.ks-refs__viewport::-webkit-scrollbar { display: none; }
.ks-refs__viewport.is-dragging { cursor: grabbing; }
.ks-refs__viewport.is-dragging .ks-ref__link { pointer-events: none; }
.ks-refs__track { display: flex; height: 100%; }
.ks-ref { flex: none; height: 100%; padding: 0 10px; }
.ks-ref[hidden] { display: none; }
.ks-ref__link { position: relative; display: block; height: 100%; aspect-ratio: var(--ks-ratio, 1.5); overflow: hidden; }
.ks-ref__img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.ks-ref__overlay { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity 300ms linear; }
.ks-ref__info {
	position: absolute; inset: 0; z-index: 3;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 0 30px; text-align: center; color: #fff;
	opacity: 0; transition: opacity 300ms linear;
}
.ks-ref__title {
	position: relative; font-size: 30px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; line-height: 1.15;
}
.ks-ref__title::before, .ks-ref__cats::after {
	content: ""; display: block; width: 1px; height: 40px; margin: 0 auto 16px; background: #fff; opacity: .7;
}
.ks-ref__cats::after { margin: 16px auto 0; }
.ks-ref__cats { margin-top: 6px; font-size: 18px; }
.ks-ref__link:hover .ks-ref__overlay, .ks-ref__link:focus-visible .ks-ref__overlay { opacity: .6; }
.ks-ref__link:hover .ks-ref__info, .ks-ref__link:focus-visible .ks-ref__info { opacity: 1; }

/* Laufleiste */
.ks-refs__bar { position: absolute; left: 0; right: 0; bottom: 5px; height: 10px; background: #eee; }
.ks-refs__thumb { position: absolute; top: 0; left: 0; height: 100%; width: 65px; background: #292929; }

/* Filter */
.ks-filter { position: absolute; top: 20px; left: 30px; z-index: 23; width: 150px; }
.ks-filter__button {
	display: block; width: 150px; padding: 12px 0; margin-bottom: 20px;
	background: #000; color: #fff; font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
}
.ks-filter__slash { margin: 0 6px; }
.ks-filter__arrow { width: 8px; height: 13px; fill: currentColor; vertical-align: -1px; transition: transform 200ms ease; }
.ks-filter__button[aria-expanded="true"] .ks-filter__arrow { transform: rotate(-90deg); }
.ks-filter__list { padding: 20px 0; background: rgba(51,51,51,.61); width: max-content; min-width: 150px; }
.ks-filter__list button { white-space: nowrap; }
.ks-filter__list button {
	display: block; width: 100%; padding: 6px 20px; text-align: left;
	color: #fff; font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
}
.ks-filter__list button:hover, .ks-filter__list button[aria-pressed="true"] { text-decoration: line-through; }

/* Zähler im rechten Rahmen */
.ks-counter {
	position: fixed; z-index: 10; right: 0; top: 50%; width: var(--ks-side); margin-top: -18px;
	padding: 30px 0; text-align: center; line-height: 17px;
}
.ks-counter__num { display: block; color: #666; padding-bottom: 28px; }
.ks-counter__all { display: block; padding-top: 8px; position: relative; }
.ks-counter__all::before { content: "/"; position: absolute; top: -22px; left: 0; right: 0; }

/* ==========================================================================
   Referenz-Detail
   ========================================================================== */
.ks-project__info {
	position: absolute; left: 0; top: 0; bottom: 0; width: 350px; z-index: 2;
	overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccc transparent;
	padding: 50px 45px 80px;
	background: var(--ks-bg);
}
.ks-project__title { margin-top: 20px; font-family: var(--ks-font-bold); font-size: 25px; line-height: 1.26; font-weight: 400; color: #292929; }
.ks-project__text ul { padding-left: 25px; padding-bottom: 0; }
.ks-project__h4 { margin-top: 20px; font-family: var(--ks-font-bold); font-size: 15px; font-weight: 400; color: #292929; }
.ks-project__details li { position: relative; margin-bottom: 10px; padding: 12px 0 0 40px; }
.ks-project__details svg { position: absolute; left: 0; top: 13px; width: 14px; height: 14px; fill: #000; }
.ks-project__details span { font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; line-height: 1.15; display: block; }
.ks-project__details a { opacity: .8; }
.ks-project__details a:hover { opacity: 1; text-decoration: line-through; }

.ks-btn {
	position: relative; display: inline-block; overflow: hidden;
	margin: 33px 0 20px; padding: 14px 35px 13px;
	border: 2px solid #000; color: #000;
	font-size: 11px; line-height: 11px; font-weight: 700; text-transform: uppercase;
}
.ks-btn span { display: inline-block; transition: transform 300ms ease; }
.ks-btn__icon {
	position: absolute; left: 50%; top: -30px; width: 18px; height: 16px; margin-left: -9px;
	fill: currentColor; transition: top 300ms ease;
}
.ks-btn:hover span, .ks-btn:focus-visible span { transform: translateY(40px); }
.ks-btn:hover .ks-btn__icon, .ks-btn:focus-visible .ks-btn__icon { top: 11px; }

.ks-project__nav { position: relative; display: flex; align-items: center; gap: 10px; padding: 20px 0; }
.ks-project__nav a svg { width: 25px; height: 28px; fill: #000; display: block; }
.ks-project__slash { line-height: 34px; }
.ks-project__all { margin-left: auto; }
.ks-project__all svg { width: 17px !important; height: 18px !important; }
.ks-project__nav a:hover svg { opacity: .6; }

.ks-project__slider { left: 350px; }
.ks-slide--project { margin: 0; background: #fff; }
.ks-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; user-select: none; -webkit-user-drag: none; }

.ks-zoom {
	position: absolute; top: 70px; right: 70px; z-index: 15;
	width: 30px; height: 30px; display: grid; place-items: center;
	background: rgba(0,0,0,.91); color: #fff;
}
.ks-zoom svg { width: 13px; height: 13px; fill: currentColor; transition: transform .4s ease-in-out; }
.ks-zoom:hover svg { transform: rotate(-45deg); }

.ks-showinfo { position: absolute; left: 50px; right: 145px; bottom: 50px; z-index: 15; }
.ks-showinfo__toggle {
	font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; letter-spacing: 2px;
	color: #fff; border-bottom: 1px solid #fff; line-height: 1.15;
}
.ks-showinfo__box {
	position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 30px;
	padding: 10px 20px; background: rgba(0,0,0,.91); color: #fff;
	font-size: 13px; line-height: 24px; letter-spacing: 1px;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity 300ms ease, transform 300ms ease, visibility 300ms;
}
.ks-showinfo__box strong {
	display: block; margin-top: 12px; padding: 5px 0;
	font-family: Georgia, "Times New Roman", Times, serif; font-style: italic; font-weight: 400;
	font-size: 16px; line-height: 20px; letter-spacing: 2px;
}
.ks-showinfo__box strong + br { display: none; }
.ks-showinfo:hover .ks-showinfo__box,
.ks-showinfo.is-open .ks-showinfo__box,
.ks-showinfo__toggle:focus-visible + .ks-showinfo__box { opacity: 1; visibility: visible; transform: none; }

/* Lightbox */
.ks-lightbox {
	position: fixed; inset: 0; z-index: 200;
	display: grid; place-items: center;
	background: rgba(0,0,0,.92);
}
.ks-lightbox[hidden] { display: none; }
.ks-lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; }
.ks-lightbox__close {
	position: absolute; top: 14px; right: 20px; color: #fff; font-size: 40px; line-height: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1126px) {
	.ks-col-main { width: 100%; }
	.ks-whitepanel { width: 100%; }
}

@media (max-width: 991px) {
	.ks-col-text { margin-left: 0; width: 100%; }
	.ks-kontakt__cols { flex-direction: column; margin-top: 40px; }
	.ks-kontakt__text, .ks-kontakt__form { width: 100%; }
	.ks-kontakt__form { margin-top: 40px; }
	.ks-project__info { width: 300px; padding: 40px 30px 60px; }
	.ks-project__slider { left: 300px; }
	.ks-showinfo { right: 50px; }
}

@media (max-width: 756px) {
	.ks-page { padding: calc(var(--ks-header-h) + 50px) 0 calc(40px + var(--ks-footer-h)); }
	.ks-container { width: auto; margin: 0 20px; }
	.ks-col-text { padding: 0; }
	.ks-h2 { font-size: 34px; }
	.ks-page-title { font-size: 38px; line-height: 1.15; word-break: break-word; hyphens: auto; }
	.ks-page--text { padding-top: calc(var(--ks-header-h) + 40px); }
	.ks-form input[type="text"], .ks-form input[type="email"], .ks-form textarea { width: 100%; font-size: 16px; }
	.ks-to-top { right: 15px; }

	/* Referenzen: senkrechte Liste, Infos immer sichtbar */
	.ks-refs__viewport { bottom: 0; overflow-x: hidden; overflow-y: auto; cursor: auto; }
	.ks-refs__track { display: block; height: auto; padding: 70px 0 10px; }
	.ks-ref { height: auto; padding: 0 0 10px; }
	.ks-ref__link { height: auto; width: 100%; }
	.ks-ref__overlay { opacity: .35; }
	.ks-ref__info { opacity: 1; padding: 0 20px; }
	.ks-ref__title { font-size: 20px; }
	.ks-ref__cats { font-size: 14px; }
	.ks-ref__title::before, .ks-ref__cats::after { height: 20px; margin-bottom: 10px; }
	.ks-ref__cats::after { margin: 10px auto 0; }
	.ks-refs__bar, .ks-counter { display: none; }
	.ks-filter { top: 12px; left: 12px; }

	/* Referenz-Detail: Bildstrecke oben, Infos darunter, Seite scrollt */
	body.ks-fixed .ks-project {
		position: relative; top: auto; bottom: auto; left: 0; right: 0;
		padding: var(--ks-header-h) 0 var(--ks-footer-h);
		display: flex; flex-direction: column;
	}
	.ks-project__slider { position: relative; inset: auto; height: 62vh; height: 62svh; order: 1; }
	.ks-project__info { position: relative; inset: auto; width: auto; order: 2; padding: 10px 20px 40px; overflow: visible; }
	.ks-zoom { top: 15px; right: 15px; }
	.ks-showinfo { left: 15px; right: 15px; bottom: 40px; }
	.ks-showinfo__box { margin-bottom: 15px; }
}

@media (hover: none) {
	.ks-ref__overlay { opacity: .35; }
	.ks-ref__info { opacity: 1; }
}
