/*
Theme Name: JK Badsanierung
Theme URI: https://jk-badsanierung.de/
Author: Moise Scharping
Description: Modernes Block-Theme (Full Site Editing) für Jani Kaja Fliesenleger & Trockenbau, Kerpen. Schriften lokal eingebunden (Inter), kein Page-Builder, keine externen Dienste.
Version: 3.2.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jk-badsanierung
*/

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }

/* ---------- Kopfbereich ---------- */
.jk-topbar a { color: inherit; text-decoration: none; }
.jk-topbar a:hover { color: var(--wp--preset--color--accent); }
.jk-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.9);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .jk-header { top: 32px; }
.jk-header .wp-block-navigation a { color: var(--wp--preset--color--secondary); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.jk-header .wp-block-navigation a:hover,
.jk-header .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--wp--preset--color--accent); }
.jk-logo { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.jk-logo img { display: block; width: auto; height: 66px; }
.jk-footer-logo img { display: block; width: auto; height: 76px; background: #fff; padding: .6rem .9rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.jk-hero { position: relative; }
.jk-hero .wp-block-cover__inner-container { width: 100%; max-width: var(--wp--style--global--wide-size); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2rem); }
.jk-hero h1 { color: #fff; text-wrap: balance; max-width: 15ch; }
.jk-hero p { max-width: 36rem; }
.jk-chip {
	display: inline-block; padding: .35rem .9rem; border-radius: 999px;
	background: rgba(200,116,43,.22); border: 1px solid rgba(200,116,43,.7);
	color: #F4D589; font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: .85rem; letter-spacing: .04em;
}
.jk-facts {
	margin-top: -3.5rem; position: relative; z-index: 5;
	background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(20,24,28,.14);
}
.jk-facts .jk-fact + .jk-fact { border-left: 1px solid var(--wp--preset--color--line); }
.jk-num {
	font-family: var(--wp--preset--font-family--display); font-weight: 800; line-height: 1;
	font-size: clamp(2rem, 4vw, 2.8rem); color: var(--wp--preset--color--primary); margin: 0;
}

/* ---------- Beschriftungen ---------- */
.jk-eyebrow {
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: .8rem;
	letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--accent-dark); margin: 0 0 .6rem;
}
.jk-eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 3px; background: var(--wp--preset--color--accent); border-radius: 2px; vertical-align: middle; margin-right: .6rem; }
.has-text-align-center.jk-eyebrow::before { display: none; }

/* ---------- Intro-Bilder ---------- */
.jk-photo img { border-radius: 18px; width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: 0 14px 40px rgba(20,24,28,.14); }
.jk-photo-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.jk-photo-stack figure { margin: 0; }
.jk-photo-stack figure:first-child { grid-row: span 2; }
.jk-photo-stack figure:last-child { margin-top: 2.5rem; }
.jk-photo-stack img { aspect-ratio: 3/4; }
.jk-photo-stack figure:last-child img { aspect-ratio: 4/5; }

/* Rasterkinder: kein Block-Abstand von WordPress (flow layout) */
.jk-grid-4 > *, .jk-steps > *, .jk-bento > *, .jk-gallery > * { margin-block-start: 0 !important; }

/* ---------- Leistungen ---------- */
.jk-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.jk-tile {
	position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 4/5;
	display: flex; align-items: flex-end; background: var(--wp--preset--color--secondary);
	transition: transform .25s ease, box-shadow .25s ease;
}
.jk-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.jk-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%); }
.jk-tile .jk-tile-label { position: relative; z-index: 2; padding: 1.4rem; width: 100%; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.jk-tile .jk-tile-label { font-size: 1.15rem; line-height: 1.15; padding: 1.1rem; }
.jk-tile .jk-tile-label a { color: #fff; text-decoration: none; hyphens: auto; }
.jk-tile .jk-tile-label a::before { content: ""; position: absolute; inset: 0; z-index: 3; }
.jk-tile .jk-tile-label::after {
	content: "→"; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%;
	display: grid; place-items: center; background: var(--wp--preset--color--accent); color: #fff; font-size: 1rem;
	transition: transform .25s ease;
}
.jk-tile:hover, .jk-tile:focus-within { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(20,24,28,.22); }
.jk-tile:hover img { transform: scale(1.06); }
.jk-tile:hover .jk-tile-label::after { transform: translateX(3px); }

/* ---------- Ablauf ---------- */
.jk-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
.jk-step {
	background: #fff; border-radius: 18px; padding: 1.75rem; border: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 6px 24px rgba(20,24,28,.05); position: relative;
}
.jk-step .jk-step-no {
	width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
	background: var(--wp--preset--color--primary); color: #fff; margin: 0 0 1.1rem;
	font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.1rem;
}

/* ---------- Projekte (Bento) ---------- */
.jk-bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; gap: 1rem; }
.jk-bento figure { margin: 0; overflow: hidden; border-radius: 18px; }
.jk-bento figure img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.jk-bento figure:hover img { transform: scale(1.05); }
.jk-bento figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.jk-bento figure:nth-child(4), .jk-bento figure:nth-child(5), .jk-bento figure:nth-child(6) { grid-column: span 2; }
.jk-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-radius: 12px; overflow: hidden; }
.jk-gallery figure { margin: 0; overflow: hidden; border-radius: 0; }
.jk-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .5s ease; }
.jk-gallery figure:hover img { transform: scale(1.04); }

/* ---------- Abschluss-Banner ---------- */
.jk-cta { position: relative; overflow: hidden; border-radius: 0; text-align: center; }
.jk-cta h2 { margin-inline: auto; }
.jk-cta .wp-block-cover__inner-container { padding: clamp(2rem, 5vw, 4rem); }
.jk-cta h2 { color: #fff; max-width: 20ch; }

/* ---------- Fußbereich ---------- */
.jk-footer { background: #0B2530; color: rgba(255,255,255,.82); }
.jk-footer a { color: inherit; text-decoration: none; }
.jk-footer a:hover { color: var(--wp--preset--color--accent); }
.jk-footer h3 { color: var(--wp--preset--color--accent) !important; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.jk-footer ul { list-style: none; padding: 0; margin: 0; }
.jk-footer li { margin-block: .45rem; }
.jk-footer .jk-footer-bar { border-top: 1px solid rgba(255,255,255,.12); }

.wp-block-button__link { transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,24,28,.2); }
.jk-light .wp-block-button__link { color: #fff; }

@media (max-width: 1000px) {
	.jk-grid-4, .jk-steps { grid-template-columns: repeat(2, 1fr); }
	.jk-bento { grid-template-columns: repeat(2, 1fr); }
	.jk-bento figure:nth-child(1) { grid-column: span 2; }
	.jk-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 781px) {
	.jk-logo img { height: 50px; }
	.jk-spacer { display: none; }
	.admin-bar .jk-header { top: 46px; }
	.jk-topbar { display: none; }
	.jk-header-cta { display: none; }
	.jk-facts .jk-fact + .jk-fact { border-left: 0; border-top: 1px solid var(--wp--preset--color--line); }
	.jk-photo-stack figure:last-child { margin-top: 0; }
}
@media (max-width: 560px) {
	.jk-grid-4, .jk-steps, .jk-gallery { grid-template-columns: 1fr; }
	.jk-bento { grid-template-columns: 1fr; grid-auto-rows: 14rem; }
	.jk-bento figure:nth-child(n) { grid-column: auto; grid-row: auto; }
}

/* Google-Bewertungen */
.jk-reviews-head { gap: .6rem; }
.jk-stars { color: #F4B400; letter-spacing: .12em; font-size: 1.15rem; line-height: 1; margin: 0; }
.jk-reviews-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: stretch; }
.jk-reviews-grid > * { margin-block-start: 0 !important; }
.jk-review { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 1.4rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; box-shadow: 0 6px 20px rgba(14,43,55,.05); }
.jk-review > * { margin: 0 !important; }
.jk-review .jk-quote { font-size: 1rem; line-height: 1.55; flex: 1; }
.jk-review .jk-who { display: flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--wp--preset--color--secondary); font-size: .95rem; }
.jk-review .jk-who span.jk-ava { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--wp--preset--color--secondary); color: #fff; font-size: .85rem; }
.jk-review .jk-who small { display: block; font-weight: 500; color: var(--wp--preset--color--muted); font-size: .8rem; }
@media (max-width: 1000px) { .jk-reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .jk-reviews-grid { grid-template-columns: 1fr; } }

/* Einheitliche Typografie auf Inhaltsseiten */
.wp-block-post-title { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 1.5rem; }
.wp-block-post-content > * { margin-block-start: 1.1rem; margin-block-end: 0; }
.wp-block-post-content h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); line-height: 1.25; margin-block-start: 2.75rem; }
.wp-block-post-content h3 { font-size: 1.3rem; line-height: 1.3; margin-block-start: 2rem; }
.wp-block-post-content h4 { font-size: 1.125rem; line-height: 1.35; margin-block-start: 1.6rem; }
.wp-block-post-content > h2:first-child { margin-block-start: 0; }
.wp-block-post-content h2 + h3, .wp-block-post-content h3 + h4 { margin-block-start: .9rem; }
.wp-block-post-content p, .wp-block-post-content li { font-size: 1.0625rem; line-height: 1.7; }
.wp-block-post-content ul, .wp-block-post-content ol { padding-left: 1.4rem; }
.wp-block-post-content li + li { margin-top: .4rem; }
.wp-block-post-content blockquote { border-left: 3px solid var(--wp--preset--color--accent); padding-left: 1.2rem; margin-inline: 0; }
.wp-block-post-content blockquote p { font-size: 1.2rem; font-weight: 600; color: var(--wp--preset--color--secondary); }
.wp-block-post-content blockquote cite { font-style: normal; color: var(--wp--preset--color--muted); font-size: .95rem; }
.wp-block-post-content p, .wp-block-post-content li, .wp-block-post-content a { overflow-wrap: anywhere; }
.jk-lead { font-size: 1.25rem; line-height: 1.4; font-weight: 600; }
