/*
Theme Name: RBH Handwerk
Theme URI: https://example.de
Author: Mason Hoenicke
Description: Individuelles Theme für den Maler- und Baubetrieb RBH – Farben aus dem Firmenlogo (Petrol, Dunkelblau, Hellgrau).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rbh
*/

/* ---------- Design-Tokens (Farben aus dem Logo) ---------- */
:root {
	--teal: #217777;        /* Logo-Petrol – Primärfarbe */
	--teal-dark: #185c5c;
	--dark: #0d2a31;        /* Logo-Dunkelblau – Text/Hero */
	--light: #f1f2f2;       /* Logo-Hellgrau – Flächen */
	--white: #ffffff;
	--text: #22333a;
	--muted: #5c6f76;
	--radius: 10px;
	--shadow: 0 6px 24px rgba(13, 42, 49, .10);
	--container: 1140px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

h1, h2, h3 { color: var(--dark); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }

.eyebrow {
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .8rem;
	font-weight: 700;
	color: var(--teal);
	margin: 0 0 .6em;
}
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: .8em 1.6em;
	border-radius: var(--radius);
	font-weight: 700;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	font-size: 1rem;
	transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--dark); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-accent { background: var(--teal); color: var(--white); }
.btn-accent:hover { background: var(--teal-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	box-shadow: 0 1px 0 rgba(13,42,49,.08);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 84px;
}
.custom-logo, .site-branding img { max-height: 64px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav .menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu a {
	text-decoration: none;
	color: var(--dark);
	font-weight: 600;
	padding: .4em 0;
	border-bottom: 2px solid transparent;
}
.primary-nav .menu a:hover,
.primary-nav .current-menu-item > a { color: var(--teal); border-bottom-color: var(--teal); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
	background:
		linear-gradient(120deg, rgba(13,42,49,.97) 40%, rgba(33,119,119,.92)),
		var(--dark);
	color: var(--white);
	padding: 96px 0 88px;
	position: relative;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute;
	right: -120px; top: -120px;
	width: 420px; height: 420px;
	border: 60px solid rgba(241,242,242,.06);
	transform: rotate(20deg);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { color: var(--white); }
.hero h1 span { color: #6fc7c7; }
.hero .eyebrow { color: #8fd3d3; }
.hero .lead { color: rgba(255,255,255,.85); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.hero-badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	margin: 0; padding: 0;
	font-size: .95rem;
	color: rgba(255,255,255,.8);
}

/* ---------- Seiten-Hero (Unterseiten) ---------- */
.page-hero {
	background: linear-gradient(120deg, var(--dark), var(--teal-dark));
	color: var(--white);
	padding: 64px 0 56px;
}
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero .eyebrow { color: #8fd3d3; }

/* ---------- Sektionen ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--light); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Karten (Leistungen) ---------- */
.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
	background: var(--white);
	border: 1px solid rgba(13,42,49,.08);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: var(--shadow);
	transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,42,49,.14); }
.card-icon {
	display: inline-flex;
	width: 52px; height: 52px;
	align-items: center; justify-content: center;
	border-radius: 12px;
	background: rgba(33,119,119,.1);
	color: var(--teal);
	margin-bottom: 16px;
}
.card-icon svg { width: 28px; height: 28px; }
.card p { color: var(--muted); margin-bottom: 0; }

/* ---------- Split (Über uns) ---------- */
.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: center;
}
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.media-placeholder {
	aspect-ratio: 4/3;
	border-radius: var(--radius);
	background: repeating-linear-gradient(45deg, var(--light), var(--light) 12px, #e6e8e8 12px, #e6e8e8 24px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: var(--muted);
	font-size: .9rem;
}
.media-placeholder svg { width: 48px; height: 48px; opacity: .5; }

.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before {
	content: "✓";
	position: absolute; left: 0;
	color: var(--teal);
	font-weight: 800;
}

/* ---------- Referenzen ---------- */
.ref-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.ref-item {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--dark);
	aspect-ratio: 4/3;
	text-decoration: none;
	box-shadow: var(--shadow);
}
.ref-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.ref-item:hover img { transform: scale(1.05); opacity: .75; }
.ref-title {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 40px 18px 16px;
	background: linear-gradient(transparent, rgba(13,42,49,.9));
	color: var(--white);
	font-weight: 700;
}
.ref-noimg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--teal), var(--dark)); }
/* Hochkant-Fotos: nicht auf volle Breite ziehen, sondern zentriert mit begrenzter Höhe */
.ref-single-img { margin: 0 0 32px; text-align: center; }
.ref-single-img img {
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	width: auto;
	max-width: 100%;
	max-height: 72vh;
	margin: 0 auto;
	display: inline-block;
}
/* Galerie-Bilder im Beitragsinhalt ebenfalls sinnvoll begrenzen */
.entry-content .wp-block-image img,
.entry-content .wp-block-gallery img { border-radius: var(--radius); }
.notice-empty {
	background: var(--light);
	border-left: 4px solid var(--teal);
	padding: 18px 22px;
	border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Leistungs-Zeilen (Detailseite) ---------- */
.service-rows { display: grid; gap: 18px; margin-top: 16px; }
.service-row {
	display: flex;
	gap: 24px;
	background: var(--white);
	border: 1px solid rgba(13,42,49,.08);
	border-radius: var(--radius);
	padding: 26px 28px;
	box-shadow: var(--shadow);
}
.service-num {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--teal);
	opacity: .55;
	line-height: 1;
	min-width: 44px;
}
.service-row h2 { font-size: 1.2rem; margin-bottom: .3em; }
.service-row p { margin: 0; color: var(--muted); }

/* ---------- CTA-Band ---------- */
.cta-band {
	background: linear-gradient(120deg, var(--teal), var(--teal-dark));
	color: var(--white);
	padding: 56px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: .2em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }
.cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Kontakt ---------- */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 56px;
	align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 18px; }

.contact-phone-wrap {
	background: var(--light);
	border-radius: var(--radius);
	padding: 40px 36px;
}
.btn-xl { font-size: 1.35rem; padding: .9em 1.4em; margin: 12px 0; }
.phone-note { font-size: .9rem; color: var(--muted); margin-top: 18px; }

/* ---------- Inhalt / Blog ---------- */
.entry-content { max-width: 780px; }
.entry-content img { border-radius: var(--radius); }
.post-teaser { border-bottom: 1px solid rgba(13,42,49,.1); padding: 24px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); }
.site-footer h3 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer a { color: #8fd3d3; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	padding: 56px 24px;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .9rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-menu { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cards, .cards-3, .ref-grid { grid-template-columns: repeat(2, 1fr); }
	.split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
	.section { padding: 56px 0; }
	.hero { padding: 64px 0; }
	.cards, .cards-3, .ref-grid { grid-template-columns: 1fr; }

	/* Mobile Navigation */
	.nav-toggle {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 44px; height: 44px;
		background: none;
		border: 0;
		cursor: pointer;
		padding: 8px;
	}
	.nav-toggle span {
		display: block;
		height: 3px;
		width: 100%;
		background: var(--dark);
		border-radius: 2px;
		transition: transform .25s, opacity .25s;
	}
	.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
	.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
	.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

	.primary-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--white);
		box-shadow: var(--shadow);
		flex-direction: column;
		align-items: stretch;
		padding: 16px 24px 24px;
		gap: 12px;
	}
	.primary-nav.is-open { display: flex; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(13,42,49,.08); }
	.nav-cta { text-align: center; }
}
