/* Klassik – Ergänzungen, die theme.json nicht abdeckt. */

/* ------------------------------------------------------------------ */
/* Sticky Footer – der Footer bleibt immer mindestens am unteren        */
/* Bildschirmrand, auch wenn eine Seite (z. B. eine kleine Kategorie)   */
/* nicht genug Inhalt hat, um den Viewport zu füllen.                   */
/* ------------------------------------------------------------------ */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* ------------------------------------------------------------------ */
/* Kicker                                                               */
/* ------------------------------------------------------------------ */
.kl-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var( --wp--preset--color--teal-mid );
}

/* Highlighter-Markereffekt hinter Schlüsselwörtern – der "moderne" Touch */
.kl-highlight {
	background-image: linear-gradient( 100deg, rgba( 31, 157, 142, 0 ) 0%, rgba( 31, 157, 142, 0.32 ) 10%, rgba( 31, 157, 142, 0.32 ) 90%, rgba( 31, 157, 142, 0 ) 100% );
	background-repeat: no-repeat;
	background-size: 100% 0.4em;
	background-position: 0 88%;
	padding: 0 0.2em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.kl-highlight-orange {
	background-image: linear-gradient( 120deg, rgba( 222, 106, 0, 0.22 ) 0%, rgba( 222, 106, 0, 0.22 ) 100% );
	background-repeat: no-repeat;
	background-size: 100% 42%;
	background-position: 0 86%;
	padding: 0 0.15em;
}

/* Kleines Highlight-Badge, z. B. "Seit 1971" */
.kl-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: linear-gradient( 135deg, var( --wp--preset--color--gold ) 0%, var( --wp--preset--color--gold-soft ) 100% );
	color: #2b2210;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.35em 0.85em;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba( 169, 130, 47, 0.4 );
}

/* ------------------------------------------------------------------ */
/* Lauftext auf Unterseiten – volle Content-Breite, ruhig lesbar        */
/* ------------------------------------------------------------------ */
.kl-category-intro,
.kl-body-copy {
	max-width: none !important;
	width: 100%;
}
.kl-category-intro .wp-block-term-description,
.kl-category-intro p,
.kl-body-copy p {
	margin: 0 0 1.1em;
	font-size: 1.09rem;
	line-height: 1.85;
	color: var( --wp--preset--color--text-body );
}
.kl-category-intro .wp-block-term-description p:last-child,
.kl-category-intro p:last-child {
	margin-bottom: 0;
}
.kl-category-intro .wp-block-term-description,
.kl-category-intro > p {
	column-width: 27rem;
	column-gap: 4rem;
	column-rule: 1px solid rgba( 34, 34, 34, 0.08 );
}
@media ( max-width: 780px ) {
	.kl-category-intro .wp-block-term-description,
	.kl-category-intro > p {
		column-width: auto;
		column-count: 1;
		column-rule: none;
	}
}
/* Lange Fließtextseiten (Impressum, Datenschutz) – als Fließtext-Spalten */
.kl-body-copy {
	column-width: 26rem;
	column-gap: 4rem;
	column-rule: 1px solid rgba( 34, 34, 34, 0.08 );
}
.kl-body-copy h2,
.kl-body-copy h3 {
	break-inside: avoid;
	break-after: avoid;
	margin-top: 0.4em;
}
.kl-body-copy p {
	break-inside: avoid;
}
@media ( max-width: 780px ) {
	.kl-body-copy {
		column-width: auto;
		column-count: 1;
		column-rule: none;
	}
}

/* Fließtext-Hervorhebung – dezenter Textmarker statt reinem Fettdruck */
.kl-category-intro strong,
.kl-body-copy strong {
	font-weight: 600;
	color: var( --wp--preset--color--ink );
	background-image: linear-gradient( 100deg, rgba( 31, 157, 142, 0 ) 0%, rgba( 31, 157, 142, 0.32 ) 10%, rgba( 31, 157, 142, 0.32 ) 90%, rgba( 31, 157, 142, 0 ) 100% );
	background-repeat: no-repeat;
	background-size: 100% 0.42em;
	background-position: 0 88%;
	padding: 0 0.2em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* ------------------------------------------------------------------ */
/* Header                                                               */
/* ------------------------------------------------------------------ */
.kl-site-header {
	position: relative;
	z-index: 30;
}
.kl-nav {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var( --wp--preset--color--ink );
	transition: box-shadow 0.3s ease;
}
.kl-nav.is-scrolled {
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.25 );
}
.kl-nav-link {
	position: relative;
	text-decoration: none !important;
	background: none !important;
	transition: color 0.25s ease;
}
.kl-nav-link:hover {
	color: var( --wp--preset--color--teal ) !important;
}
.kl-nav-link::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 0;
	height: 2px;
	background: var( --wp--preset--color--teal );
	transition: width 0.3s ease, left 0.3s ease;
}
.kl-nav-link:hover::after {
	width: 100%;
	left: 0;
}

/* Navigation auf einer Zeile halten, aber etwas großzügiger verteilt */
@media ( min-width: 783px ) {
	.kl-nav .wp-block-navigation {
		flex-wrap: nowrap !important;
	}
	.kl-nav .wp-block-navigation__container {
		flex-wrap: nowrap !important;
		gap: 2.4rem !important;
		white-space: nowrap;
	}
	.kl-nav .wp-block-navigation-item__content {
		padding: 1.05em 0.1em !important;
	}
}

/* Dropdown-Untermenüs: garantiert blickdicht, Innenabstand statt Text am    */
/* Rand, und ein klar erkennbarer Hover je einzelnem Eintrag.               */
.wp-block-navigation__submenu-container {
	background-color: var( --wp--preset--color--ink ) !important;
	box-shadow: 0 20px 44px rgba( 0, 0, 0, 0.35 );
	border-top: 2px solid var( --wp--preset--color--gold );
	min-width: 15rem;
	padding: 0.4rem 0;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item {
	display: block;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	padding: 0.65em 1.5em !important;
	transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
	background-color: rgba( 255, 255, 255, 0.07 );
	color: var( --wp--preset--color--gold ) !important;
	padding-left: 1.9em !important;
}

/* ------------------------------------------------------------------ */
/* Hero: Bild-/Text-Wechsler wie im Original, jetzt sanft überblendend  */
/* ------------------------------------------------------------------ */
.kl-hero {
	position: relative;
	min-height: 86vh;
	display: flex;
	align-items: center;
	overflow: hidden;
	color: #fff;
}
.kl-hero-figure {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.kl-hero-figure img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	filter: saturate( 1.1 );
	animation: kl-hero-fade 24s infinite;
}
.kl-hero-figure img:nth-child( 1 ) { animation-delay: 0s; }
.kl-hero-figure img:nth-child( 2 ) { animation-delay: 6s; }
.kl-hero-figure img:nth-child( 3 ) { animation-delay: 12s; }
.kl-hero-figure img:nth-child( 4 ) { animation-delay: 18s; }
.kl-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient( 100deg, rgba( 24, 24, 24, 0.85 ) 0%, rgba( 24, 24, 24, 0.5 ) 44%, rgba( 24, 24, 24, 0.12 ) 78% ),
		linear-gradient( 0deg, rgba( 24, 24, 24, 0.5 ) 0%, rgba( 24, 24, 24, 0 ) 34% );
}
.kl-hero-content {
	position: relative;
	z-index: 2;
	max-width: 640px;
	padding: 0 clamp( 1.5rem, 5vw, 5rem );
}
@keyframes kl-hero-fade {
	0% { opacity: 0; transform: scale( 1.06 ); }
	3% { opacity: 1; }
	22% { opacity: 1; transform: scale( 1.13 ); }
	27% { opacity: 0; transform: scale( 1.13 ); }
	100% { opacity: 0; }
}
.kl-hero-dots {
	position: absolute;
	z-index: 2;
	left: clamp( 1.5rem, 5vw, 5rem );
	bottom: 2rem;
	display: flex;
	gap: 0.5rem;
}
.kl-hero-dots span {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.55 );
	position: relative;
	overflow: hidden;
}
.kl-hero-dots span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var( --wp--preset--color--teal );
	transform: scale( 0 );
	animation: kl-hero-dot 20s infinite;
}
.kl-hero-dots span:nth-child( 1 )::after { animation-delay: 0s; }
.kl-hero-dots span:nth-child( 2 )::after { animation-delay: 6s; }
.kl-hero-dots span:nth-child( 3 )::after { animation-delay: 12s; }
.kl-hero-dots span:nth-child( 4 )::after { animation-delay: 18s; }
@keyframes kl-hero-dot {
	0% { transform: scale( 0 ); }
	3% { transform: scale( 1 ); }
	22% { transform: scale( 1 ); }
	27% { transform: scale( 0 ); }
	100% { transform: scale( 0 ); }
}
@media ( max-width: 780px ) {
	.kl-hero-dots { display: none; }
}
@media ( prefers-reduced-motion: reduce ) {
	.kl-hero-figure img, .kl-hero-dots span::after { animation: none !important; }
	.kl-hero-figure img:first-child { opacity: 1; }
	.kl-hero-dots span:first-child::after { transform: scale( 1 ); }
}

/* ------------------------------------------------------------------ */
/* Kategorien-Karten: Bild-Mosaik + Petrol-Label-Band wie im Original,  */
/* jetzt mit Hover-Glow, Lift und Badge.                                */
/* ------------------------------------------------------------------ */
.kl-cards {
	display: grid;
	grid-template-columns: repeat( 12, 1fr );
	gap: clamp( 1.25rem, 2vw, 2rem );
}
.kl-cards > .kl-card:nth-child( 1 ),
.kl-cards > .kl-card:nth-child( 2 ) { grid-column: span 6; }
.kl-cards > .kl-card:nth-child( 3 ),
.kl-cards > .kl-card:nth-child( 4 ),
.kl-cards > .kl-card:nth-child( 5 ) { grid-column: span 4; }
@media ( max-width: 900px ) {
	.kl-cards { grid-template-columns: repeat( 2, 1fr ); }
	.kl-cards > .kl-card { grid-column: span 1 !important; }
}
@media ( max-width: 560px ) {
	.kl-cards { grid-template-columns: 1fr; }
	.kl-cards > .kl-card { grid-column: span 1 !important; }
}
.kl-card {
	display: block;
	background: var( --wp--preset--color--white );
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none !important;
	box-shadow: 0 10px 26px rgba( 34, 34, 34, 0.1 );
	transition: transform 0.35s cubic-bezier( 0.22, 1, 0.36, 1 ), box-shadow 0.35s ease;
	position: relative;
}
.kl-card:hover {
	transform: translateY( -6px );
	box-shadow: 0 22px 42px rgba( 31, 157, 142, 0.28 );
}
.kl-card-mosaic {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	aspect-ratio: 1;
	gap: 2px;
	background: var( --wp--preset--color--surface );
}
.kl-card-mosaic.kl-card-single {
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
}
.kl-card-mosaic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}
.kl-card:hover .kl-card-mosaic img {
	transform: scale( 1.08 );
}
.kl-card-label {
	background: linear-gradient( 180deg, #1f9d8e 0%, #73aeac 100% );
	color: #fff;
	text-align: center;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 0.85rem 0.5rem;
	text-shadow: 0 1px 1px rgba( 0, 0, 0, 0.2 );
	overflow-wrap: break-word;
	word-break: break-word;
	hyphens: auto;
}
.kl-card-sub {
	padding: 0.9rem 1rem 1.1rem;
	font-size: 0.9rem;
	color: var( --wp--preset--color--text-body );
	text-align: center;
}
.kl-card-badge {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
}

/* ------------------------------------------------------------------ */
/* Kategorie-/Archivseiten: asymmetrisches Masonry-Raster mit großem   */
/* "Featured"-Werk statt gleichförmigem Kachel-Raster.                  */
/* ------------------------------------------------------------------ */
.kl-masonry {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	grid-auto-rows: 13rem;
	gap: 1.5rem;
}
.kl-masonry > li,
.kl-masonry > .wp-block-post {
	list-style: none;
}
.kl-masonry > *:nth-child( 1 ) { grid-column: span 2; grid-row: span 2; }
.kl-masonry > *:nth-child( 6 ) { grid-row: span 2; }
.kl-masonry > *:nth-child( 11 ) { grid-column: span 2; }
@media ( max-width: 900px ) {
	.kl-masonry { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 600px ) {
	.kl-masonry { grid-template-columns: 1fr; }
	.kl-masonry > * { grid-column: span 1 !important; grid-row: span 1 !important; }
}

.kl-work-card {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 10px 24px rgba( 34, 34, 34, 0.14 );
	transition: transform 0.35s cubic-bezier( 0.22, 1, 0.36, 1 ), box-shadow 0.35s ease;
	cursor: zoom-in;
}
.kl-masonry .kl-work-card {
	height: 100%;
	aspect-ratio: unset;
}
.kl-work-card:hover {
	transform: translateY( -4px );
	box-shadow: 0 18px 34px rgba( 31, 157, 142, 0.3 );
}
.kl-work-card .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	margin: 0;
}
.kl-work-card .wp-block-post-featured-image a,
.kl-work-card .wp-block-post-featured-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}
.kl-work-card:hover .wp-block-post-featured-image img {
	transform: scale( 1.07 );
}
/* Einheitliches Foto-Schema für alle Karten: ein leichter, gleichmäßiger
   Schleier über dem ganzen Bild (nicht nur ein Verlauf am unteren Rand),
   damit helle und dunkle Werkfotos optisch zur selben Atelier-Bildsprache
   gehören und keines als "zu hell" heraussticht. Unten zusätzlich stärker
   abgedunkelt, damit der Kartentitel immer lesbar bleibt. */
.kl-work-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient( 180deg, rgba( 20, 18, 16, 0.14 ) 0%, rgba( 20, 18, 16, 0.16 ) 42%, rgba( 20, 18, 16, 0.55 ) 72%, rgba( 20, 18, 16, 0.88 ) 100% );
	mix-blend-mode: multiply;
	pointer-events: none;
}
.kl-card-overlay {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	padding: 1rem 1.15rem;
	pointer-events: none;
}
.kl-work-title a,
.kl-work-title {
	color: #fff !important;
	font-size: 1.05rem;
	margin: 0;
}
.kl-work-sub {
	color: #e4e4e4 !important;
	font-size: 0.82rem;
	margin: 0.15rem 0 0;
}

/* ------------------------------------------------------------------ */
/* Lightbox: Foto groß ansehen, ohne die Seite zu verlassen             */
/* ------------------------------------------------------------------ */
.kl-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba( 20, 20, 20, 0.92 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.kl-lightbox-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}
.kl-lightbox-overlay img {
	max-width: 100%;
	max-height: 82vh;
	box-shadow: 0 30px 70px rgba( 0, 0, 0, 0.5 );
	border-radius: 3px;
	transform: scale( 0.96 );
	transition: transform 0.3s ease;
}
.kl-lightbox-overlay.is-open img {
	transform: scale( 1 );
}
.kl-lightbox-close {
	position: absolute;
	top: 1.5rem;
	right: 1.75rem;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	background: none;
	border: 0;
	cursor: pointer;
	opacity: 0.8;
}
.kl-lightbox-close:hover { opacity: 1; }
.kl-lightbox-caption {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX( -50% );
	color: #fff;
	text-align: center;
}
.kl-lightbox-caption a {
	color: var( --wp--preset--color--teal-mid );
	font-size: 0.85rem;
}

/* ------------------------------------------------------------------ */
/* Reveal / dezentes Einblenden                                         */
/* ------------------------------------------------------------------ */
.kl-reveal {
	opacity: 0;
	transform: translateY( 20px );
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier( 0.22, 1, 0.36, 1 );
}
.kl-reveal.kl-reveal-visible {
	opacity: 1;
	transform: translateY( 0 );
}
@media ( prefers-reduced-motion: reduce ) {
	.kl-reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------ */
/* Buttons: sanfter Verlauf-zu-Highlight statt hartem Farbwechsel       */
/* ------------------------------------------------------------------ */
.wp-block-button__link {
	transition: background-color 0.35s ease, transform 0.25s ease, box-shadow 0.35s ease;
	box-shadow: 0 4px 10px rgba( 34, 34, 34, 0.2 );
}
.wp-block-button__link:hover {
	transform: translateY( -2px );
	box-shadow: 0 10px 22px rgba( 169, 130, 47, 0.35 );
}

/* Werk-Detailseite */
.kl-detail-box {
	background: var( --wp--preset--color--white );
	border: 1px solid #e0dede;
	border-radius: 4px;
}
.kl-detail-label {
	color: var( --wp--preset--color--teal-mid );
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------ */
/* Kontaktformular (Contact Form 7): an die Optik des restlichen        */
/* Auftritts angeglichen statt Browser-Standard.                        */
/* ------------------------------------------------------------------ */
.wpcf7-form label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var( --wp--preset--color--text-body );
	margin-bottom: 1.1rem;
}
.wpcf7-form label > br {
	display: none;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	display: block;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.75rem 0.9rem;
	background: var( --wp--preset--color--white );
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	font-family: var( --wp--preset--font-family--body );
	font-size: 1rem;
	color: var( --wp--preset--color--text-body );
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.wpcf7-form textarea {
	min-height: 9rem;
	resize: vertical;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
	outline: none;
	border-color: var( --wp--preset--color--teal );
	box-shadow: 0 0 0 3px rgba( 31, 157, 142, 0.15 );
}
.wpcf7-form .wpcf7-submit {
	background: linear-gradient( 180deg, #1f9d8e 0%, #73aeac 100% );
	color: #fefefe;
	border: 0;
	border-radius: 3px;
	padding: 0.85rem 2rem;
	font-family: var( --wp--preset--font-family--body );
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba( 34, 34, 34, 0.2 );
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.wpcf7-form .wpcf7-submit:hover {
	background: var( --wp--preset--color--gold );
	transform: translateY( -2px );
	box-shadow: 0 10px 22px rgba( 169, 130, 47, 0.35 );
}
.wpcf7-spinner {
	margin-left: 0.75rem;
}
.wpcf7-not-valid-tip {
	color: #c0392b;
	font-size: 0.8rem;
	font-weight: 400;
	margin-top: 0.35rem;
}
.wpcf7-form.invalid .wpcf7-response-output {
	border-color: #c0392b;
	color: #c0392b;
}
.wpcf7-form.sent .wpcf7-response-output {
	border-color: var( --wp--preset--color--teal );
	color: var( --wp--preset--color--teal-deep );
}
.wpcf7-response-output {
	margin-top: 1.5rem !important;
	padding: 0.9rem 1.1rem !important;
	border-radius: 3px;
	font-size: 0.9rem;
}
