/*
Theme Name: AG-die Handwerker
Theme URI: https://ag-diehandwerker.de
Author: AG-die Handwerker
Description: Eigenes, schlankes WordPress-Block-Theme fuer AG-die Handwerker (Fliesenarbeiten, Badsanierung, Wasserschadensanierung, Sanierungsarbeiten). Kein Pagebuilder. Mobile-first, Core-Web-Vitals-orientiert.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: ag-handwerker
*/

/* Bewusst minimal: alle visuellen Tokens (Farben, Typografie, Spacing)
   liegen zentral in theme.json. Hier nur Layout-Kleinigkeiten, die sich
   ueber theme.json nicht abbilden lassen. */

/* Vorher/Nachher-Bilder eines Referenzprojekts nebeneinander, siehe
   inc/referenzprojekt-display.php */
.agh-referenzprojekt__vorher-nachher {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 1.5rem 0;
}

.agh-referenzprojekt__bild img {
	width: 100%;
	height: auto;
	display: block;
}

.agh-referenzprojekt__bild figcaption {
	font-size: 0.8rem;
	color: var(--wp--preset--color--text-muted);
	margin-top: 0.25rem;
}

@media (max-width: 600px) {
	.agh-referenzprojekt__vorher-nachher {
		grid-template-columns: 1fr;
	}
}


/* ---------------------------------------------------------------
   Kontaktbereich "Angebot anfragen" (Shortcode [agh_kontaktbereich]
   aus dem Core-Plugin). Nutzt ausschliesslich die Farb-Tokens aus
   theme.json, damit es zum restlichen Design passt.
   --------------------------------------------------------------- */
.agh-kontakt {
	margin-top: 1.5rem;
}

.agh-kontakt__wege {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.agh-kontakt__weg {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	height: 100%;
	box-sizing: border-box;
	padding: 0.9rem 1rem;
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: 14px;
	color: var(--wp--preset--color--anthrazit);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.agh-kontakt__weg:hover,
.agh-kontakt__weg:focus-visible {
	border-color: var(--wp--preset--color--kupfer);
	box-shadow: 0 2px 10px rgba(25, 26, 28, 0.06);
}

.agh-kontakt__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--kupfer-hell);
	color: var(--wp--preset--color--kupfer);
}

.agh-kontakt__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.35;
}

.agh-kontakt__text strong {
	font-size: 0.95rem;
}

.agh-kontakt__text span {
	font-size: 0.875rem;
	color: var(--wp--preset--color--text-muted);
	overflow-wrap: anywhere;
}

.agh-kontakt__text .agh-kontakt__mail {
	overflow-wrap: break-word;
}

.agh-anfrage {
	background: var(--wp--preset--color--weiss);
	border: 1px solid var(--wp--preset--color--linie);
	border-radius: 14px;
	padding: 1.5rem;
}

.agh-anfrage__titel {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
}

.agh-anfrage__intro {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	color: var(--wp--preset--color--text-muted);
}

.agh-anfrage__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

.agh-anfrage__feld {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.agh-anfrage__feld--voll {
	grid-column: 1 / -1;
}

.agh-anfrage__feld label {
	font-size: 0.9rem;
	font-weight: 600;
}

.agh-anfrage__optional {
	font-weight: 400;
	color: var(--wp--preset--color--text-muted);
}

.agh-anfrage__feld small {
	font-size: 0.8rem;
	color: var(--wp--preset--color--text-muted);
}

.agh-anfrage input[type="text"],
.agh-anfrage select,
.agh-anfrage textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem; /* 16px: verhindert Auto-Zoom auf iPhone */
	color: var(--wp--preset--color--anthrazit);
	background: var(--wp--preset--color--weiss);
	border: 1px solid #cfcbc4;
	border-radius: 8px;
	padding: 0.7rem 0.8rem;
	min-height: 2.9rem;
}

.agh-anfrage textarea {
	resize: vertical;
	min-height: 8rem;
}

.agh-anfrage input:focus,
.agh-anfrage select:focus,
.agh-anfrage textarea:focus {
	outline: 2px solid var(--wp--preset--color--kupfer);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--kupfer);
}

.agh-anfrage input[type="file"] {
	font: inherit;
	font-size: 0.9rem;
	padding: 0.75rem;
	border: 1px dashed #cfcbc4;
	border-radius: 8px;
	background: var(--wp--preset--color--offwhite);
	width: 100%;
	box-sizing: border-box;
}

.agh-anfrage input[type="file"]::file-selector-button {
	font: inherit;
	margin-right: 0.75rem;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--wp--preset--color--kupfer);
	border-radius: 9999px;
	background: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--kupfer);
	cursor: pointer;
}

.agh-anfrage__dateien {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
}

.agh-anfrage__dateien:empty {
	display: none;
}

.agh-anfrage__dateien-hinweis {
	color: var(--wp--preset--color--kupfer);
}

.agh-anfrage__datenschutz {
	margin: 1.25rem 0 1rem;
	font-size: 0.8rem;
	color: var(--wp--preset--color--text-muted);
}

.agh-anfrage__senden {
	border: 0;
	cursor: pointer;
	font: inherit;
}

.agh-anfrage__senden[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.agh-anfrage__meldung {
	padding: 0.85rem 1rem;
	border-radius: 8px;
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
}

.agh-anfrage__meldung--ok {
	background: #e8f3ea;
	color: #1e5b2b;
	border: 1px solid #b9dcc0;
}

.agh-anfrage__meldung--fehler {
	background: #fbeceb;
	color: #8a1f17;
	border: 1px solid #efc3bf;
}

/* Honeypot fuer Spam-Bots: fuer Menschen unsichtbar */
.agh-anfrage__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 700px) {
	.agh-kontakt__wege {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}

	.agh-anfrage {
		padding: 1.15rem;
	}

	.agh-anfrage__grid {
		grid-template-columns: 1fr;
	}

	.agh-anfrage__senden {
		width: 100%;
	}

	.agh-anfrage .wp-block-button {
		width: 100%;
	}
}


/* ---------------------------------------------------------------
   Regionalseite /handwerker-kelheim-rohr/ - nutzt die bestehenden
   Bausteine (agh-cards, agh-steps, agh-badge); hier nur Ergaenzungen.
   --------------------------------------------------------------- */

/* Schritte mit Titel + kurzer Beschreibung */
.agh-regio-steps li strong {
	display: block;
	margin-bottom: 0.35rem;
}

.agh-regio-steps li span {
	display: block;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--wp--preset--color--text-muted);
}

/* Referenzfotos: gleiche Optik wie die Galerie auf /referenzen/ */
.agh-regio-refs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.agh-regio-refs__item {
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
	background: #eee;
}

.agh-regio-refs__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.agh-regio-h1 {
	overflow-wrap: break-word;
	hyphens: manual;
	-webkit-hyphens: manual;
}

@media (max-width: 480px) {
	.agh-regio-h1 {
		font-size: 1.65rem;
		line-height: 1.25;
	}
}

@media (max-width: 700px) {
	.agh-regio-refs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem;
	}
}


/* Leistungsseiten (templates page-fliesenarbeiten/-badsanierung/
   -wasserschadensanierung/-sanierungsarbeiten): Seitentitel ist jetzt
   die H1, behaelt aber exakt die bisherige Optik (vorher H2: 1.5em / 600). */
.agh-leistung-h1 {
	font-size: 1.5em;
	font-weight: 600;
	line-height: 1.25;
}

/* Startseite "Unser Einsatzgebiet": Badge "Rohr i.NB." verlinkt auf die
   Regionalseite - gleiche Badge-Optik, dezente Unterstreichung als Link-Hinweis. */
a.agh-badge--link {
	color: var(--wp--preset--color--kupfer);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

a.agh-badge--link:hover,
a.agh-badge--link:focus-visible {
	text-decoration-thickness: 2px;
}

/* AGB: Unterueberschrift "Allgemeine Geschaeftsbedingungen (AGB)" ist jetzt
   semantisch eine H2 (H1 = Seitentitel), behaelt aber die bisherige Optik (vorher H1). */
.agh-agb-titel {
	font-size: 2em;
	font-weight: 700;
	line-height: 1.15;
}

/* Mobiles Menue (geoeffnetes Overlay): seitlicher Innenabstand, damit die
   Hauptpunkte nicht am Bildschirmrand kleben. Betrifft nur das geoeffnete
   Handy-Menue, die Desktop-Navigation bleibt unveraendert. (2026-09-30) */
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}
