/*
Theme Name: Hausverwaltung Bamberg
Theme URI: https://gmh-bamberg.de
Author: Hausverwaltung Bamberg
Author URI: https://bgw-digital.de
Description: Professionelles One-Pager Theme für Hausverwaltung – modern, seriös und regional.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hausverwaltung-bamberg
Tags: one-page, full-site-editing, block-patterns, custom-colors, custom-fonts
*/

/* -----------------------------------------------
   DESIGN-TOKENS
   Die Hauptfarben kommen aus theme.json und werden
   von WordPress als --wp--preset--color--* bereitgestellt.
   Hier werden nur Zusatzfarben definiert, die nicht
   im theme.json-Palette enthalten sind.
----------------------------------------------- */
:root {
	/* Abgestufte Textvarianten */
	/* Fließtext in hellen Karten */
	--hb-color-text-secondary: #5a5a5a;
	/* Text auf dunklem Hintergrund */
	--hb-color-text-on-dark: #c8d0d8;

	/* Akzentvarianten */
	/* Rot für Problem-Karte */
	--hb-color-danger: #E94A2A;
	/* Grün für erfolgreiche Aktionen */
	--hb-color-ok: #3D7A70;


}

/* Kurzaliasse für häufig genutzte wp-preset-Variablen */
:root {
	/* #FAF9F6 alle Hintergrundfarben  */
	--hb-bg: var(--wp--preset--color--background);
	/* #F0EDE8 Alternativ-Hintergrund */
	--hb-surface: var(--wp--preset--color--surface);
	/* #1C2B3A Dunkelblau */
	--hb-primary: var(--wp--preset--color--primary);
	/* #3D7A70 Teal  */
	--hb-accent: var(--wp--preset--color--accent);
	/* #2A2A2A Fließtext */
	--hb-text: var(--wp--preset--color--text);
	/* #7A7A7A Gedämpftes Grau */
	--hb-muted: var(--wp--preset--color--muted);
	/* #FFFFFF Weiß */
	--hb-white: var(--wp--preset--color--white);
	/* #E5E1DB Rahmenfarbe */
	--hb-border: var(--wp--preset--color--border);
}

/* -----------------------------------------------
   BASE RESET & GLOBAL
----------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	font-size: 17px;
	/* bewusst 17px – etwas größere Basis für ein editoriales Erscheinungsbild */
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: var(--hb-bg);
	color: var(--hb-text);
	font-family: "DM Sans", system-ui, sans-serif;
	font-weight: 400;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	/* Verhindert horizontales Überlaufen durch lange Wörter (z. B. deutsche Komposita) */
	overflow-wrap: break-word;
	hyphens: auto;
}

img,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

/* -----------------------------------------------
   TYPOGRAPHY
----------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 700;
	line-height: 1.2;
	color: var(--hb-primary);
}

h1 {
	font-size: clamp(2.4rem, 5vw, 4rem);
}

h2 {
	font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
	font-size: clamp(1.2rem, 2vw, 1.6rem);
}

h4 {
	font-size: 1.1rem;
	font-family: "DM Sans", system-ui, sans-serif;
	font-weight: 600;
}

p {
	font-size: clamp(0.95rem, 1.5vw, 1.05rem);
	color: var(--hb-text);
	line-height: 1.8;
}

/* -----------------------------------------------
   LAYOUT HELPERS
----------------------------------------------- */
.hb-container {
	max-width: 1160px;
	margin-inline: auto;
	padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.hb-section {
	padding-block: clamp(80px, 10vw, 140px);
}

.hb-section--surface {
	background-color: var(--hb-surface);
}

.hb-section--dark {
	background-color: var(--hb-primary);
	color: var(--hb-bg);
}

.hb-section--dark h1,
.hb-section--dark h2,
.hb-section--dark h3,
.hb-section--dark h4 {
	color: var(--hb-bg);
}

.hb-section--dark p {
	color: var(--hb-color-text-on-dark);
}

/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.hb-btn {
	display: inline-block;
	padding: 0.85rem 2rem;
	border: 2px solid var(--hb-primary);
	color: var(--hb-primary);
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: transparent;
	cursor: pointer;
	transition:
		background 0.25s ease,
		color 0.25s ease;
	text-decoration: none;
}

.hb-btn:hover,
.hb-btn:focus {
	background: var(--hb-primary);
	color: var(--hb-bg);
	outline: none;
}


/* -----------------------------------------------
   NAVIGATION / HEADER
----------------------------------------------- */
.hb-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--hb-bg);
	border-bottom: 1px solid var(--hb-border);
	padding-block: 1.2rem;
}

.hb-logo {
	text-decoration: none;
}

.hb-header__logo {
	display: block;
	height: 40px;
	width: auto;
}

.hb-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.hb-nav__list {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.hb-nav a {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hb-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hb-nav a:hover {
	color: var(--hb-accent);
}

.hb-nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
	z-index: 160;
	position: relative;
}

.hb-nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--hb-primary);
	margin-block: 5px;
	transition: transform 0.3s ease, opacity 0.3s ease;
	transform-origin: center;
}

/* Hamburger → X wenn geöffnet */
.hb-nav-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hb-nav-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.hb-nav-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Seiten-Abdunkelung */
.hb-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	z-index: 140;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.hb-nav-overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Mobile Nav auf Desktop verstecken */
.hb-mobile-nav {
	display: none;
}

@media (max-width: 768px) {
	.hb-nav-toggle {
		display: block;
	}

	/* Desktop-Nav auf Mobile verstecken */
	.hb-nav {
		display: none;
	}

	/* Slide-in Panel von rechts */
	.hb-mobile-nav {
		display: block;
		position: fixed;
		top: 0;
		right: -100%;
		width: min(300px, 80vw);
		height: 100dvh;
		background: var(--hb-bg);
		z-index: 150;
		padding: 7rem 2rem 2rem;
		overflow-y: auto;
		transition: right 0.3s ease;
		border-left: 1px solid var(--hb-border);
	}

	.hb-mobile-nav.is-open {
		right: 0;
	}

	.hb-mobile-nav__list {
		display: flex;
		flex-direction: column;
		list-style: none;
		padding: 0;
		margin: 0;
	}

	.hb-mobile-nav__list li a {
		display: block;
		padding-block: 0.9rem;
		text-align: right;
		border-bottom: 1px solid var(--hb-border);
		font-family: "DM Sans", system-ui, sans-serif;
		font-size: 1rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--hb-text);
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.hb-mobile-nav__list li a:hover {
		color: var(--hb-accent);
	}
}

/* -----------------------------------------------
   PAGE TEMPLATE
----------------------------------------------- */
/* .hb-page-content greift über die in page.html gesetzte Klasse.
   Die body.page/body.single-Selektoren sind ein Fallback für Deployments, bei denen
   WordPress Templates aus der Datenbank (wp_posts Typ=wp_template) statt aus den
   Theme-Dateien lädt – dabei kann das className-Attribut verloren gehen. */
.hb-page-content,
body.page main.wp-block-group,
body.single main.wp-block-group {
	padding-inline: clamp(1.5rem, 5vw, 4rem) !important;
}

/* -----------------------------------------------
   HERO SECTION
----------------------------------------------- */
.hb-hero {
	padding-block: clamp(100px, 14vw, 180px);
	background-color: var(--hb-bg);
	text-align: center;
}

.hb-hero__eyebrow {
	display: inline-block;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--hb-accent);
	margin-bottom: 1.5rem;
}

.hb-hero h1 {
	max-width: 820px;
	margin-inline: auto;
	margin-bottom: 1.5rem;
}

.hb-hero__logo {
	display: block;
	max-width: 180px;
	height: auto;
	margin-inline: auto;
	margin-bottom: 2.5rem;
}

.hb-hero p {
	max-width: 600px;
	margin-inline: auto;
	margin-bottom: 2.5rem;
	font-size: clamp(1rem, 1.8vw, 1.15rem);
	color: var(--hb-color-text-secondary);
}

/* -----------------------------------------------
   PROBLEM / LÖSUNG
----------------------------------------------- */
.hb-problem-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: start;
}

@media (max-width: 768px) {
	.hb-problem-grid {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}
}

.hb-problem-card {
	padding: 2.5rem;
	background: var(--hb-bg);
	border-top: 3px solid currentColor;
	/* currentColor übernimmt die Farbe der jeweiligen Varianten-Klasse unten */
}

.hb-problem-card--problem {
	border-color: var(--hb-color-danger);
}

.hb-problem-card--loesung {
	border-color: var(--hb-color-ok);
}

.hb-problem-card__icon {
	display: block;
	margin-bottom: 1.25rem;
}

.hb-problem-card__icon svg {
	width: 40px;
	height: 40px;
}

.hb-problem-card h3 {
	margin-bottom: 1rem;
}

/* -----------------------------------------------
   LEISTUNGEN
----------------------------------------------- */
.hb-leistungen-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

@media (max-width: 900px) {
	.hb-leistungen-grid {
		grid-template-columns: 1fr;
	}
}

.hb-leistung-card {
	padding: 2.5rem 2rem;
	background: var(--hb-bg);
	border: 1px solid var(--hb-border);
}

/* Dekorative große Zahl (01, 02, 03) – abgeblendet über der Karten-Überschrift */
.hb-leistung-card__num {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 3rem;
	font-weight: 700;
	color: var(--hb-border);
	line-height: 1;
	margin-bottom: 1rem;
}

.hb-leistung-card h3 {
	font-size: 1.25rem;
	margin-bottom: 1.25rem;
	color: var(--hb-primary);
}

.hb-leistung-card ul {
	list-style: none;
	padding: 0;
}

.hb-leistung-card ul li {
	font-size: 0.95rem;
	color: var(--hb-color-text-secondary);
	padding-block: 0.5rem;
	border-bottom: 1px solid var(--hb-surface);
	padding-left: 1.25rem;
	position: relative;
}

.hb-leistung-card ul li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--hb-accent);
}

/* -----------------------------------------------
   WARUM WIR
----------------------------------------------- */
.hb-warum-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	max-width: 800px;
	margin-inline: auto;
}

@media (max-width: 600px) {
	.hb-warum-grid {
		grid-template-columns: 1fr;
	}
}

.hb-warum-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.5rem;
	background: var(--hb-bg);
}

.hb-warum-item__check {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--hb-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.15rem;
}

.hb-warum-item__check svg {
	width: 13px;
	height: 13px;
	stroke: #fff;
	stroke-width: 2.5;
	fill: none;
}

.hb-warum-item p {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--hb-text);
	margin: 0;
}

/* -----------------------------------------------
   ÜBER UNS
----------------------------------------------- */
.hb-ueber-inner {
	max-width: 760px;
	margin-inline: auto;
	text-align: center;
}

.hb-ueber-inner h2 {
	color: var(--hb-bg);
	margin-bottom: 1.5rem;
}

.hb-ueber-inner p {
	color: var(--hb-color-text-on-dark);
	margin-bottom: 2.5rem;
	font-size: 1.05rem;
}

.hb-ueber-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-align: left;
	max-width: 500px;
	margin-inline: auto;
}

.hb-ueber-list li {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	font-size: 0.95rem;
	color: var(--hb-color-text-on-dark);
}

.hb-ueber-list li::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--hb-accent);
}

/* -----------------------------------------------
   KONTAKT
----------------------------------------------- */
.hb-kontakt-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin-bottom: 4rem;
}

@media (max-width: 768px) {
	.hb-kontakt-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

.hb-kontakt-item {
	text-align: center;
	padding: 2rem 1.5rem;
	border: 1px solid var(--hb-border);
	background: var(--hb-white);
}

.hb-kontakt-item__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-inline: auto;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: var(--hb-surface);
	color: var(--hb-accent);
}

.hb-kontakt-item__icon svg {
	width: 22px;
	height: 22px;
}

.hb-kontakt-item h4 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hb-muted);
	margin-bottom: 0.5rem;
}

.hb-kontakt-item p {
	font-size: 1rem;
	color: var(--hb-primary);
	font-weight: 500;
	margin: 0;
}


/* -----------------------------------------------
   SECTION LABELS
----------------------------------------------- */
.hb-section-label {
	display: block;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hb-accent);
	margin-bottom: 1rem;
}

.hb-section--dark .hb-section-label {
	color: var(--hb-color-accent);
}

.hb-text-center {
	text-align: center;
}

.hb-mb-3 {
	margin-bottom: 3rem;
}


/* -----------------------------------------------
   FOOTER
----------------------------------------------- */
.hb-footer {
	background: var(--hb-primary);
	color: var(--hb-color-text-on-dark);
	padding-block: 3rem 2rem;
}

/* Zeile 1: 3 gleichbreite Spalten */
.hb-footer__top {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 2rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	margin-bottom: 1.5rem;
}

/* Spalte 1: Firmenname + Adresse */
.hb-footer__address {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}


.hb-footer__address p {
	font-size: 0.85rem;
	color: var(--hb-color-text-on-dark);
	line-height: 1.7;
	margin: 0;
}

/* Spalte 2: Navigation (injiziert via render_block-Filter) */
.hb-footer__links {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.hb-footer__nav-list {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.hb-footer__links a {
	font-size: 0.85rem;
	color: var(--hb-color-text-on-dark);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hb-footer__links a:hover {
	color: var(--hb-color-accent);
}

/* Spalte 3: Slogan */
.hb-footer__slogan-name {
	font-size: 1.6rem;
	font-weight: 700;
	font-family: "Playfair Display", Georgia, serif;
	color: var(--hb-bg);
	margin-bottom: 0.4rem;
}

.hb-footer__slogan p:not(.hb-footer__slogan-name) {
	font-size: 0.9rem;
	color: var(--hb-color-text-on-dark);
	line-height: 1.7;
	margin: 0;
}

/* Zeile 2: Copyright zentriert */
.hb-footer__bar {
	text-align: center;
}

.hb-footer__copy {
	font-size: 0.82rem;
	color: var(--hb-color-text-footer);
	margin: 0;
}

@media (max-width: 768px) {
	.hb-footer__top {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* -----------------------------------------------
   SCROLL-TO-TOP BUTTON
----------------------------------------------- */
.hb-scroll-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	z-index: 200;
	width: 44px;
	height: 44px;
	background: var(--hb-primary);
	color: var(--hb-bg);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
	pointer-events: none;
}

.hb-scroll-top svg {
	width: 20px;
	height: 20px;
}

.hb-scroll-top.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.hb-scroll-top:hover {
	background: var(--hb-accent);
}