/**
 * Hellmich Development – ergänzende Styles.
 * Farben, Schrift und Abstände kommen aus theme.json (CSS-Variablen --wp--preset--*).
 */

/* ---------- Grundlagen ---------- */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

:where([id]) {
	scroll-margin-top: 6rem;
}

:where(a, button, summary, input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Kopfbereich ---------- */

.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.hd-header {
	position: relative;
	background: rgba(255, 255, 255, 0.92) !important;
}

/* Blur auf einem Pseudo-Element: backdrop-filter direkt auf .hd-header würde
   den Header zum Bezugsrahmen für position:fixed machen und das mobile
   Menü-Overlay auf Header-Höhe abschneiden. */
.hd-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	pointer-events: none;
}

.hd-logo img {
	display: block;
	height: auto;
	border-radius: 0 !important;
}

.hd-header .wp-block-navigation a {
	padding-block: 0.25rem;
}

@media (max-width: 781px) {
	.hd-header-cta {
		display: none !important;
	}
}

/* Mobiles Menü */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
	font-size: var(--wp--preset--font-size--medium);
}

/* ---------- Block-Stile ---------- */

/* Dachzeile */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.hd-dark .is-style-eyebrow {
	color: var(--wp--preset--color--primary-light);
}

/* Badge */
.is-style-badge {
	display: inline-block;
	width: fit-content;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-dark);
	font-size: 0.8125rem !important;
	font-weight: 600;
	line-height: 1.4;
}

/* Karten */
.is-style-card,
.is-style-card-featured {
	height: 100%;
	box-sizing: border-box;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--50);
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.is-style-card:hover,
.is-style-card-featured:hover {
	border-color: #CBD5E4;
	box-shadow: var(--wp--preset--shadow--soft);
	transform: translateY(-2px);
}

.is-style-card-featured {
	border: 1.5px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--soft);
}

.is-style-card > :first-child,
.is-style-card-featured > :first-child {
	margin-top: 0;
}

/* Icons */
.wp-block-image.is-style-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	margin: 0;
	border-radius: 12px;
	background: var(--wp--preset--color--primary-soft);
}

.wp-block-image.is-style-icon img {
	width: 1.6rem !important;
	height: 1.6rem !important;
	border-radius: 0 !important;
}

.wp-block-image.is-style-icon.hd-icon-sm {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 10px;
}

.wp-block-image.is-style-icon.hd-icon-sm img {
	width: 1.25rem !important;
	height: 1.25rem !important;
}

/* Häkchen-Liste */
ul.is-style-checklist {
	list-style: none;
	padding-left: 0;
}

ul.is-style-checklist li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.5rem;
}

ul.is-style-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.1rem;
	height: 1.1rem;
	background: url("../icons/check.svg") no-repeat center / contain;
}

.hd-dark ul.is-style-checklist li::before {
	background-image: url("../icons/check-light.svg");
}

/* ---------- Abschnitte ---------- */

.hd-hero {
	position: relative;
	overflow: hidden;
}

.hd-hero::before {
	content: "";
	position: absolute;
	inset: -40% -20% auto auto;
	width: 60vw;
	height: 60vw;
	max-width: 820px;
	max-height: 820px;
	background: radial-gradient(closest-side, rgba(53, 99, 174, 0.10), rgba(53, 99, 174, 0));
	pointer-events: none;
}

.hd-hero > * {
	position: relative;
}

.hd-hero-visual img {
	border-radius: 0 !important;
}

/* Leistungsübersicht im Hero */
.hd-trust {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* Schritt-Nummern */
.hd-step-number {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	letter-spacing: 0.05em;
}

/* Dunkle Bereiche */
.hd-dark a:not(.wp-element-button) {
	color: var(--wp--preset--color--base);
}

.hd-dark a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--primary-light);
}

.hd-dark .is-style-card {
	background: var(--wp--preset--color--contrast-2);
	border-color: rgba(255, 255, 255, 0.08);
}

.hd-dark .wp-block-image.is-style-icon {
	background: rgba(143, 176, 230, 0.14);
}

.hd-contact-row a {
	text-decoration: none;
	font-weight: 600;
}

/* Kontakt-Button auf dunklem Grund */
.hd-dark .wp-block-button:not(.is-style-outline) .wp-element-button {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.hd-dark .wp-block-button:not(.is-style-outline) .wp-element-button:hover {
	background: var(--wp--preset--color--primary-soft);
}

.hd-dark .wp-block-button.is-style-outline .wp-element-button {
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, 0.5);
}

/* FAQ */
.wp-block-details.hd-faq {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-block: 1.25rem;
	margin-block: 0 !important;
}

.wp-block-details.hd-faq:first-of-type {
	border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-details.hd-faq summary {
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	cursor: pointer;
}

.wp-block-details.hd-faq summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.hd-faq summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}

.wp-block-details.hd-faq[open] summary::after {
	transform: translateY(-50%) rotate(45deg);
}

.wp-block-details.hd-faq > :not(summary) {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--muted);
}

/* ---------- Footer ---------- */

.hd-footer a {
	text-decoration: none;
}

.hd-footer a:hover {
	text-decoration: underline;
}

.hd-footer .hd-footer-links {
	list-style: none;
	padding-left: 0;
}

.hd-footer .hd-footer-links li {
	margin-bottom: 0.5rem;
}

/* ---------- Blog ---------- */

.hd-post-card .wp-block-post-featured-image {
	margin-bottom: 0;
}

.hd-post-card .wp-block-post-title {
	margin-top: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span.current {
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
	text-decoration: none;
}

.wp-block-query-pagination span.current {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Formulare (z. B. Kommentare, Kontaktformular-Plugins) */
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], textarea, select) {
	font: inherit;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

:where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], textarea, select):focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(53, 99, 174, 0.18);
}

/* ---------- Template-Abstände ---------- */

.site-footer {
	margin-block-start: 0;
}

.site-footer .hd-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hd-contact-row > .wp-block-image {
	flex-shrink: 0;
}
