/*
Theme Name: HeimatLust
Theme URI: https://www.heimatlust-magazin.de
Description: Warmes, bildreiches Child-Theme für das Heimatlust-Magazin (Wittlager Land & Melle, Mühlenkreis, Heimatgeflüster am Dümmer See, Sonderausgaben, Online-Shop), auf Basis von Twenty Twenty-Five.
Author: WuK Digital
Template: twentytwentyfive
Requires at least: 6.7
Requires PHP: 7.2
Version: 3.9.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: heimatlust-child
*/

/* ---------- Fix: verschachtelte Blöcke duplizieren sonst den globalen Seitenrand ----------
   Betrifft nicht nur wp-block-group, sondern auch wp-block-post-content (page-content.html),
   dessen eigenes has-global-padding sonst Hero-Bilder am vollen Ausbluten hindert und die
   Textspalten aller Unterseiten unnötig einengt. */
.has-global-padding:not(.alignwide):not(.alignfull) {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ---------- Globaler Link-Reset ---------- */
a {
	text-decoration: none;
}

a:hover {
	text-decoration: none;
}

.entry-content a,
.wp-block-post-content a {
	text-decoration: underline;
}

/* ---------- Header ---------- */
.wp-block-site-logo img {
	height: auto;
	max-height: 84px;
	width: auto;
}

.hlm-brandbar {
	align-items: center;
	text-align: center;
	gap: 2px !important;
}

.hlm-heart-claim {
	font-style: italic;
	font-size: 0.8rem;
	margin: 0.15rem 0 0;
	opacity: 0.9;
}

/* Die komplette Kopfzeile (Kontaktleiste + Logo + Menü) bleibt durchgehend
   oben fixiert, auch beim Scrollen. --hlm-nav-top-offset wird per JS (siehe
   functions.php) auf die tatsächliche Höhe der WordPress-Admin-Leiste gesetzt
   (0px für normale Besucher ohne Admin-Leiste). */
header.wp-block-template-part {
	position: fixed;
	top: var(--hlm-nav-top-offset, 0px);
	left: 0;
	right: 0;
	width: 100%;
	z-index: 100;
}

.hlm-main-nav.wp-block-navigation {
	gap: 0.5rem 1.75rem !important;
}

.hlm-main-nav .wp-block-navigation-item__content {
	font-weight: 500;
	font-size: 0.88rem;
	position: relative;
	text-decoration: none !important;
}

.hlm-main-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	background-color: var(--wp--preset--color--primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.hlm-main-nav .wp-block-navigation-item__content:hover::after {
	transform: scaleX(1);
}

.hlm-main-nav .hlm-is-active > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
}

.hlm-main-nav .hlm-is-active > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* Outline-Buttons genauso groß wie gefüllte Buttons.
   !important auf allen Werten nötig, da WordPress die theme.json-Stile
   der "outline"-Block-Variante erst NACH dem Theme-Stylesheet ausgibt. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 0.65em 1.4em !important;
	border-width: 2px !important;
	border-radius: 8px !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	line-height: 1.6 !important;
	box-sizing: border-box !important;
}

/* Fokus-Rahmen nur bei Tastatur-Navigation, nie beim Mausklick */
a:focus,
.wp-block-navigation-item__content:focus {
	outline: none;
	box-shadow: none;
}

a:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	box-shadow: none;
}

.hlm-main-nav .hlm-nav-cta .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.55em 1.4em;
	border-radius: 999px;
	font-weight: 700;
}

.hlm-main-nav .hlm-nav-cta .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

.hlm-main-nav .hlm-nav-cta .wp-block-navigation-item__content::after {
	display: none;
}

/* ---------- Layout: keine ungewollten Abstände zwischen Header/Hero/Footer ---------- */
main.wp-block-group {
	margin-top: 0 !important;
}

.hlm-hero {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

footer.wp-block-group {
	margin-bottom: 0 !important;
}

/* ---------- Hero ---------- */
.hlm-hero {
	position: relative;
	min-height: 640px;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.hlm-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(42, 30, 24, 0.68) 0%, rgba(42, 30, 24, 0.3) 42%, rgba(42, 30, 24, 0) 68%);
	pointer-events: none;
}

.hlm-hero .wp-block-cover__image-background {
	object-position: center 40%;
}

.hlm-hero {
	justify-content: center !important;
}

.hlm-hero-copy {
	position: relative;
	z-index: 2;
	padding: 0 5vw;
	max-width: 740px;
	width: 100%;
	text-align: center !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.hlm-hero-copy * {
	text-align: center;
}

.hlm-eyebrow-tag {
	display: inline-block;
	background-color: var(--wp--preset--color--primary);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 7px 16px;
	margin-bottom: 1rem !important;
}

.hlm-eyebrow-underline {
	display: inline-flex;
	align-items: center;
	color: var(--wp--preset--color--primary);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
}

.hlm-eyebrow-underline::before {
	content: "";
	width: 28px;
	height: 3px;
	background-color: var(--wp--preset--color--primary);
	display: inline-block;
	margin-right: 10px;
}

/* ---------- Region-Hero (Unterseiten) ---------- */
.hlm-region-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hlm-region-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(30, 20, 15, 0.55);
	pointer-events: none;
}

.hlm-region-hero-copy {
	position: relative;
	z-index: 2;
	max-width: 780px;
	margin: 0 auto;
	padding: 0 5vw;
	text-align: center;
}

.hlm-region-hero-copy .hlm-eyebrow-tag {
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Stretched-Link Kacheln ---------- */
.hlm-card-link {
	text-decoration: none;
	color: inherit;
}

.hlm-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* ---------- Ausgaben-Karten (aktuelle Ausgaben, Sonderausgaben, Archiv) ---------- */
.hlm-ausgabe-card {
	position: relative;
	padding: var(--wp--preset--spacing--40, 1.5rem);
	background-color: var(--wp--preset--color--base);
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(42, 30, 24, 0.12);
	height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* .has-global-padding:not(.alignwide):not(.alignfull) (3 Klassen-Selektoren) zieht sonst
   fälschlich auch bei diesen (nicht-alignfull) Karten die linke/rechte Innenabstand auf 0 –
   braucht mind. gleiche Spezifität, um das zu überstimmen. */
.wp-block-group.hlm-ausgabe-card.has-global-padding {
	padding: var(--wp--preset--spacing--40, 1.5rem) !important;
}

.hlm-ausgabe-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(42, 30, 24, 0.16);
}

.hlm-ausgabe-card--empty {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
	min-height: 200px;
	box-shadow: none;
	border: 1px dashed var(--wp--preset--color--primary);
}

.hlm-intro-image img {
	border-radius: 10px;
	box-shadow: 0 20px 40px rgba(42, 30, 24, 0.18);
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.hlm-team-portrait img {
	border-radius: 10px;
	box-shadow: 0 20px 40px rgba(42, 30, 24, 0.18);
	width: 100%;
	height: auto;
}

.hlm-shop-image img {
	border-radius: 10px;
	box-shadow: 0 20px 40px rgba(42, 30, 24, 0.18);
	width: 100%;
	height: auto;
}

.hlm-team-portrait figcaption {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	text-align: center;
	color: var(--wp--preset--color--contrast);
	opacity: 0.75;
}

.hlm-teaser-card {
	overflow: hidden;
	padding: 0 0 var(--wp--preset--spacing--40) 0 !important;
}

.hlm-teaser-image {
	margin: 0 0 var(--wp--preset--spacing--30) 0 !important;
}

.hlm-teaser-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0;
}

.hlm-teaser-card h3,
.hlm-teaser-card p,
.hlm-teaser-card .wp-block-buttons {
	margin-left: var(--wp--preset--spacing--40);
	margin-right: var(--wp--preset--spacing--40);
}

.hlm-ausgabe-cover img {
	border-radius: 6px;
	box-shadow: 0 10px 24px rgba(42, 30, 24, 0.22);
}

.hlm-archiv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 280px));
	justify-content: center;
	gap: var(--wp--preset--spacing--40, 1.5rem);
}

/* WordPress' normales Flow-Layout ("layout":"default") gibt allen Kindern außer dem
   ersten automatisch margin-top (Block-Gap) – bleibt hier aktiv, obwohl wir den
   Container per Grid anordnen, und verschiebt dadurch Karte 2/3 sichtbar nach unten. */
.hlm-archiv-grid > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.hlm-archiv-grid .hlm-ausgabe-card p {
	overflow-wrap: break-word;
	word-break: break-word;
}

.hlm-ausgabe-current {
	gap: var(--wp--preset--spacing--60, 3rem);
}

/* ---------- Team (Über uns) – ohne Kästen, mit rundem Foto/Initialen-Kreis ---------- */
.hlm-team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--wp--preset--spacing--60, 3rem) var(--wp--preset--spacing--40, 1.5rem);
	align-items: start;
}

.hlm-team-member {
	text-align: center;
	padding: 0 0.5rem;
}

.hlm-team-member h3 {
	margin-top: 0;
	margin-bottom: 0.2em;
}

.hlm-team-member p {
	margin: 0.2em 0;
	overflow-wrap: anywhere;
}

.hlm-team-photo {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 1rem;
}

.hlm-team-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	font-weight: 600;
}

/* Sonderausgaben-Ribbon */
.hlm-sonder-card {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background-color: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.14);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.hlm-sonder-card:hover {
	transform: translateY(-4px);
	border-color: var(--wp--preset--color--primary);
}

.hlm-sonder-card img {
	width: 100%;
	height: auto;
	display: block;
}

.hlm-sonder-ribbon {
	display: block;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	line-height: 1.4;
	padding: 12px 24px;
}

/* ---------- Blätterkatalog-Embed (DearFlip) ---------- */
.hlm-flipbook-embed {
	width: 100%;
}

.hlm-flipbook-embed ._df_book {
	width: 100% !important;
	border-radius: 8px;
	overflow: hidden;
}

/* ---------- Werbekunden-Stats ---------- */
.hlm-stat-number {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--primary);
	font-size: clamp(2.25rem, 4vw, 3rem);
	line-height: 1;
	margin: 0;
}

.hlm-stat-number--light {
	color: #ffffff;
}

.hlm-ads-bg {
	position: relative;
	background-size: cover;
	background-position: center 35%;
	background-repeat: no-repeat;
}

.hlm-ads-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(48, 74, 0, 0.78) 0%, rgba(48, 74, 0, 0.88) 100%);
}

.hlm-ads-bg > * {
	position: relative;
	z-index: 1;
}

/* ---------- Footer ---------- */
.hlm-footer {
	position: relative;
	background-size: cover;
	background-position: center 30%;
	background-repeat: no-repeat;
	color: #f1ece6;
}

.hlm-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 20, 15, 0.5) 0%, rgba(30, 20, 15, 0.88) 55%, rgba(20, 13, 10, 0.96) 100%);
}

.hlm-footer > * {
	position: relative;
	z-index: 1;
}

.hlm-footer a {
	color: #f1ece6;
}

.hlm-footer a:hover {
	color: #ffffff;
}

/* ---------- Kontaktformular ---------- */
.hlm-form p {
	margin-bottom: 1rem;
}

.hlm-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
}

.hlm-form input[type="text"],
.hlm-form input[type="email"],
.hlm-form input[type="tel"],
.hlm-form select,
.hlm-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.7em 0.9em;
	border: 1px solid #e2d3c4;
	border-radius: 6px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	background: #fff;
}

.hlm-form .hlm-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

@media (max-width: 600px) {
	.hlm-form .hlm-form-row {
		grid-template-columns: 1fr;
	}
}

.hlm-form .hlm-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	font-size: 0.9rem;
}

.hlm-form .hlm-consent input {
	margin-top: 0.3em;
}

.hlm-form-message {
	padding: 1em 1.25em;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	font-weight: 600;
}

.hlm-form-message.success {
	background: #e3f3e6;
	color: #1f5c2b;
}

.hlm-form-message.error {
	background: #fbe4e2;
	color: #8a2620;
}

/* ---------- Responsive / Mobile ---------- */
@media (max-width: 781px) {
	.hlm-hero {
		min-height: 460px;
	}

	.hlm-hero-copy {
		max-width: 100%;
		padding-right: 1rem;
	}

	.wp-block-heading.has-hero-font-size {
		font-size: clamp(2rem, 8vw, 2.75rem) !important;
	}

	.hlm-brandbar .wp-block-site-logo img {
		max-height: 56px;
	}

	.hlm-main-nav.wp-block-navigation {
		gap: 0.35rem 1rem !important;
	}

	.hlm-eyebrow-tag,
	.hlm-eyebrow-underline {
		font-size: 0.7rem;
	}

	.hlm-stat-number {
		font-size: clamp(1.75rem, 8vw, 2.25rem);
	}

	.hlm-archiv-grid,
	.wp-block-columns {
		row-gap: var(--wp--preset--spacing--40, 1.5rem);
	}
}

@media (max-width: 480px) {
	.hlm-hero {
		min-height: 380px;
	}

	.hlm-ausgabe-card,
	.hlm-sonder-card {
		padding: var(--wp--preset--spacing--30, 1rem);
	}
}
