/*
Theme Name: Solartechnik Dahm
Theme URI: https://www.solartechnik-dahm.de
Description: Schlankes Child-Theme von Twenty Twenty-Five für Solartechnik Dahm (Photovoltaik, Willich). Hell, klar, mit gebündelter Schrift Inter und Mustern für Startseite, Leistungen und Kontakt.
Author: weeberwrk
Author URI: https://www.weeberwrk.de
Template: twentytwentyfive
Version: 1.4.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solartechnik-dahm
*/

/* Kein Abstand zwischen Inhalt und Fußbereich (globaler Block-Abstand). */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

/* Kopfbereich bleibt beim Scrollen oben. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

@media (min-width: 601px) {
	body.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: var(--wp-admin--admin-bar--height, 32px);
	}
}

/* Seitentitel nur zeigen, solange kein Logo gesetzt ist. */
.std-brand:has(.wp-block-site-logo img) .wp-block-site-title {
	display: none;
}

/* Untermenüs als Karte (Desktop), im mobilen Menü eingerückt. */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-radius: var(--wp--custom--radius--small);
	box-shadow: var(--wp--preset--shadow--lifted);
	padding: 0.5rem 0;
	min-width: 15rem !important;
}

.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1.25rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding-left: 1rem !important;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
}

/* E-Mail-Button (mailto) mit Briefumschlag-Symbol. */
.std-mail .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.45em;
	vertical-align: -0.15em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Mobil: kleineres Logo, E-Mail-Button nur als Symbol (Beschriftung „E-Mail“ bleibt für Screenreader im Link). */
@media (max-width: 599px) {
	.std-brand .wp-block-site-logo img {
		width: 130px;
	}

	.std-header .std-mail .wp-block-button__link {
		font-size: 0 !important;
		padding: 0.7rem;
	}

	.std-header .std-mail .wp-block-button__link::before {
		width: 1.1rem;
		height: 1.1rem;
		margin-right: 0;
	}
}

/* Kacheln: leichtes Anheben beim Überfahren, ganze Kachel klickbar (std-stretch). */
.std-card {
	position: relative;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.std-stretch a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.std-card:hover,
.std-card:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--lifted) !important;
}

.std-card .wp-block-image img {
	display: block;
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.std-card {
		transition: none;
	}

	.std-card:hover,
	.std-card:focus-within {
		transform: none;
	}
}

/* Herstellerlogos ruhig in Graustufen, farbig beim Überfahren. */
.std-logos .wp-block-image img {
	filter: grayscale(1);
	opacity: 0.75;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.std-logos .wp-block-image:hover img {
	filter: none;
	opacity: 1;
}

/* Linklisten ohne Aufzählungszeichen (Fußbereich, Weitere Themen). */
.std-linklist {
	list-style: none;
	padding-left: 0;
}

.std-linklist li + li {
	margin-top: 0.4rem;
}

/* Links auf dunklem Grund. */
.std-footer a:where(:not(.wp-element-button)) {
	color: inherit;
	text-decoration: none;
}

.std-footer a:where(:not(.wp-element-button)):hover,
.std-footer a:where(:not(.wp-element-button)):focus {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* „Cookie-Einstellungen“ im Fußbereich: Schaltfläche (öffnet den Complianz-Banner), sieht aus wie die Links daneben. */
.std-cookie-link {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.std-cookie-link:hover,
.std-cookie-link:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* Pfeil an Weiterlesen-Links. */
.std-more a::after {
	content: " \2192";
}

/* Unterseiten-Liste auf den Übersichtsseiten (Produkte, Privatkunden, Gewerbekunden). */
.std-unterseiten {
	list-style: none;
	padding-left: 0;
	margin-top: var(--wp--preset--spacing--40);
	border-top: 1px solid #e3e8ee;
}

.std-unterseiten li {
	border-bottom: 1px solid #e3e8ee;
}

.std-unterseiten a {
	display: block;
	padding: 0.9rem 0;
	font-weight: 600;
	text-decoration: none;
}

.std-unterseiten a::after {
	content: " \2192";
}

.std-unterseiten a:hover,
.std-unterseiten a:focus {
	text-decoration: underline;
}

/* Karten-Platzhalter (Complianz) auf Kontakt: dunklerer Hintergrund, damit der weiße Hinweistext auch über hellen
   Kartenbereichen genug Kontrast hat (axe color-contrast; Complianz-Standard rgba(0,0,0,.5) reicht mobil nicht). */
.std-karte .cmplz-blocked-content-container .cmplz-blocked-content-notice {
	background-color: rgba(22, 33, 44, 0.85);
}

/* Lange deutsche Wörter (z. B. „Verbraucherstreitbeilegung“) auf schmalen Bildschirmen trennen statt überlaufen. */
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

p,
li,
summary {
	overflow-wrap: break-word;
}

/* Google-Maps-Karte in der Anfahrt-Box (Vorlage page-kontakt). Complianz blockiert das iframe bis zur Einwilligung
   (src="about:blank", Platzhalterbild aus dem Plugin, Schaltfläche „Karte laden …“ darüber). */
.std-karte iframe,
.std-karte .cmplz-placeholder-parent {
	display: block;
	width: 100%;
	border: 0;
	border-radius: var(--wp--custom--radius--small);
	overflow: hidden;
}

.std-karte iframe {
	height: 320px;
}

/* Platzhalter: genug Höhe für den Hinweistext auch auf schmalen Bildschirmen. */
.std-karte .cmplz-placeholder-parent {
	min-height: 260px;
}

.std-karte .cmplz-blocked-content-notice {
	max-width: calc(100% - 2rem);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

/* Complianz verlinkt im Banner Cookie-Richtlinie und Datenschutzerklärung; beide sind hier die Seite „Datenschutz“.
   Den doppelten Link ausblenden. */
.cmplz-cookiebanner .cmplz-documents li:has(> .cmplz-link.cookie-statement) {
	display: none;
}
