/*
Theme Name: Der junge Hiata
Theme URI: https://new.derjungehiata.at
Description: Child-Theme für das Block-Theme Ollie
Author: Der junge Hiata
Template: ollie
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: der-junge-hiata
*/

/* Plakat-Kopf der Startseite */
.djh-hero {
	position: relative;
	overflow: hidden;
}

.djh-label {
	display: inline-block;
	margin: 0 0 var(--wp--preset--spacing--medium);
	padding: 0.6em 1.2em;
	background: var(--wp--preset--color--djh-papier);
	color: var(--wp--preset--color--djh-tanne);
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.25;
	text-transform: uppercase;
	transform: rotate(-2deg);
	box-shadow: 0 4px 10px rgb(0 0 0 / 12%);
}

.djh-label strong {
	display: block;
}

.djh-datum {
	margin: 0 0 0.25em;
	font-family: var(--wp--preset--font-family--fira-sans-extra-condensed);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.djh-datum-block {
	margin-block-start: 0.5rem !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-block-end: -2px !important;
}

.djh-datum-block > .wp-block-columns {
	margin-block-start: 0 !important;
	align-items: flex-start !important;
}

.djh-datum-block .wp-block-column:has(.djh-kreis) {
	align-self: center !important;
}

.djh-ort {
	margin: 30px 0 0;
	font-family: var(--wp--preset--font-family--fira-sans-extra-condensed);
	font-size: clamp(2rem, 8vw, 4.5rem);
	font-weight: 700;
	line-height: 1;
	text-transform: lowercase;
}

.djh-ort .djh-uhr {
	color: var(--wp--preset--color--djh-gruen);
}

.djh-kreis {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	--djh-kreis-breite: clamp(8.8rem, 26.4vw, 12.1rem);
	width: var(--djh-kreis-breite);
	aspect-ratio: 1;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--djh-tanne);
	box-shadow: 0 10px 22px rgb(0 0 0 / 45%);
	color: var(--wp--preset--color--djh-weiss);
	font-size: calc(var(--djh-kreis-breite) * 0.145);
	transform: rotate(-10deg);
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
}

@media (min-width: 782px) {
	.djh-kreis {
		transform: translateX(-1.5rem) rotate(-10deg);
	}
}

/* Mobil: Kreis bleibt neben dem Text statt darunter zu rutschen */
@media (max-width: 781px) {
	.djh-datum-block > .wp-block-columns {
		flex-wrap: nowrap !important;
		gap: 0.75rem;
	}

	.djh-datum-block > .wp-block-columns > .wp-block-column {
		flex: 1 1 0 !important;
		min-width: 0;
	}

	.djh-datum-block > .wp-block-columns > .wp-block-column:has(.djh-kreis) {
		flex: 0 0 clamp(5.5rem, 26vw, 8rem) !important;
		width: clamp(5.5rem, 26vw, 8rem);
	}

	.djh-datum {
		white-space: normal;
	}

	.djh-kreis {
		--djh-kreis-breite: clamp(5.5rem, 26vw, 8rem);
	}
}

.djh-kreis .djh-gruen {
	color: var(--wp--preset--color--djh-gruen);
	font-size: 1.2em;
}

.djh-eintritt {
	margin: 0;
	font-family: var(--wp--preset--font-family--fira-sans-extra-condensed);
	font-size: 2rem;
	font-weight: 800;
	color: var(--wp--preset--color--djh-gruen-dunkel);
	text-transform: uppercase;
}

/* Hintergrundstreifen wie auf dem Plakat */
.djh-streifen {
	height: 3rem;
	background: repeating-linear-gradient(
		-6deg,
		var(--wp--preset--color--djh-gruen) 0 0.6rem,
		var(--wp--preset--color--djh-grau) 0.6rem 1.2rem
	);
}

/* Footer: Kurve in voller Breite, Turm schaut darüber */
.djh-footer-kante {
	position: relative;
	width: 100%;
	aspect-ratio: 2000 / 362;
	margin: 0;
}

.djh-footer-kante::after {
	content: "";
	position: absolute;
	pointer-events: none;
}

.djh-footer-kante::after {
	inset: 0;
	z-index: 2;
	background: url("assets/images/footer-kurve.webp") left bottom / 100% 100% no-repeat;
}

.djh-footer-inhalt {
	position: relative;
	z-index: 2;
	margin-top: -1px !important;
}

.djh-footer a {
	color: var(--wp--preset--color--djh-weiss);
	text-decoration: none;
}

.djh-footer-inhalt {
	padding-bottom: 30px !important;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}

.djh-footer-inhalt h2,
.djh-footer-inhalt .djh-name {
	margin-top: 0;
	margin-bottom: 0.6em;
	color: var(--wp--preset--color--djh-weiss);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.3;
}

.djh-footer-inhalt p {
	margin-block: 0 0.8em;
}

.djh-fusszeile {
	margin-top: var(--wp--preset--spacing--medium);
	padding-top: var(--wp--preset--spacing--small);
	border-top: 1px solid rgb(255 255 255 / 20%);
	gap: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
}

.djh-fusszeile p {
	margin: 0;
	font-size: 0.9rem;
}

.djh-fusszeile p:last-child a + a {
	margin-left: 1em;
}

.djh-footer-spalten {
	gap: var(--wp--preset--spacing--large);
}

.djh-kontaktzeile .djh-mail::before,
.djh-kontaktzeile .djh-web::before {
	content: "";
	display: inline-block;
	width: 1.1em;
	height: 1.1em;
	margin-right: 0.5em;
	vertical-align: -0.15em;
	background: currentcolor;
	mask: var(--djh-icon) center / contain no-repeat;
}

.djh-kontaktzeile .djh-mail {
	--djh-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2z M2 5l10 8 10-8' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.djh-kontaktzeile .djh-web {
	--djh-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M2 12h20M12 2c3 3 4.500 6.500 4.500 10S15 19 12 22c-3-3-4.500-6.500-4.500-10S9 5 12 2z' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

/* Header: 90 px hoch, Logo 280 px breit und nach unten überstehend */
.djh-header {
	position: relative;
	z-index: 20;
	box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
}

.djh-header-zeile {
	height: 90px;
	align-items: flex-start;
}

.djh-header .djh-logo {
	margin: 8px 0 0;
}

.djh-header .djh-logo img {
	display: block;
	width: min(280px, 58vw) !important;
	height: auto;
}

.djh-header .djh-nav {
	align-self: center;
	font-weight: 700;
}

.djh-header .djh-nav,
.djh-header .djh-nav a {
	color: var(--wp--preset--color--djh-weiss);
}

.djh-header .djh-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--djh-creme);
	color: var(--wp--preset--color--djh-weiss);
}

/* Logo: eigene Datei mit weißem „Junge“ (liegt neben style.css) */
.djh-header .djh-logo img {
	content: url("logo-header.png");
}

/* Header bleibt beim Scrollen stehen, die Seite läuft darunter durch */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Schild ebenfalls fix: ragt 20 px in den Header, rechts bündig mit dem Inhalt */
.djh-label-zeile {
	position: fixed;
	top: 70px;
	right: max(var(--wp--preset--spacing--medium), calc((100vw - var(--wp--style--global--wide-size, 1200px)) / 2));
	z-index: 100;
	width: auto;
	margin: 0 !important;
	padding: 0 !important;
}

.admin-bar .djh-label-zeile {
	top: calc(70px + var(--wp-admin--admin-bar--height, 32px));
}

/* Hiata-Silhouette: fix unten rechts, bleibt beim Scrollen stehen, liegt vor dem Inhalt (auch vor dem weißen Feld), aber hinter Header und Footer */
body::before {
	content: "";
	position: fixed;
	right: 1vw;
	bottom: 0;
	z-index: 1;
	width: clamp(9.6rem, 20.4vw, 26.4rem);
	aspect-ratio: 529 / 884;
	background: url("djh.png") center bottom / contain no-repeat;
	pointer-events: none;
}

@media (min-width: 601px) and (max-width: 960px) {
	body::before {
		width: clamp(9.6rem, 20.4vw, 26.4rem);
	}
}

@media (max-width: 600px) {
	body::before {
		width: 18vw;
	}
}


/* Weingarten: fix unten links im Hintergrund, hinter dem Inhalt */
body::after {
	content: "";
	position: fixed;
	left: 0;
	bottom: 0;
	z-index: -3;
	width: clamp(14rem, 40vw, 50rem);
	aspect-ratio: 800 / 225;
	background: url("weingarten.png") left bottom / contain no-repeat;
	opacity: 0.5;
	pointer-events: none;
}

@media (max-width: 600px) {
	body::after {
		width: 60vw;
	}
}

/* Perchtoldsdorf: Öffnungszeiten ohne Aufzählungspunkte, näher an der Überschrift */
.page-id-20 .wp-block-post-content > .wp-block-list {
	list-style: none;
	padding-inline-start: 0;
	margin-block-start: 8px !important;
}

/* Da gibt's ihn: Betriebsliste ohne Aufzählungspunkte */
.page-id-17 .wp-block-post-content > .wp-block-list {
	list-style: none;
	padding-inline-start: 0;
}

.page-id-17 .wp-block-post-content > .wp-block-list strong {
	font-size: 1.4em;
}

/* Anfahrtsplan: eingebettete Google-Karte, volle Breite */
.djh-karte {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	border: 0;
}

/* Startseite: Fließtext 20 % schmäler, linksbündig (läuft nicht unter die Silhouette) */
.home .wp-block-post-content > :is(p, h3, .wp-block-quote) {
	box-sizing: border-box;
	padding-inline-end: min(20%, calc(var(--wp--style--global--content-size, 1200px) * 0.2));
}

/* Mit Burger-Menü (unter 960 px): Schild unter den Burger-Button schieben */
@media (max-width: 960px) {
	.djh-label-zeile {
		top: 85px;
	}

	.admin-bar .djh-label-zeile {
		top: calc(85px + var(--wp-admin--admin-bar--height, 32px));
	}
}

/* Großes Smartphone / kleines Tablet: Kreis mittig zwischen „perchtoldsdorf“ und rechtem Rand */
@media (min-width: 601px) and (max-width: 781px) {
	.djh-datum-block > .wp-block-columns > .wp-block-column:not(:has(.djh-kreis)) {
		flex: 0 0 calc(clamp(2rem, 8vw, 4.5rem) * 5.9) !important;
	}

	.djh-datum-block > .wp-block-columns > .wp-block-column:has(.djh-kreis) {
		display: flex;
		flex: 1 1 0 !important;
		justify-content: center;
		width: auto;
	}
}

/* Tablet: Kreis 50 % größer */
@media (min-width: 601px) and (max-width: 781px) {
	.djh-kreis {
		--djh-kreis-breite: 12rem;
	}
}

@media (min-width: 782px) and (max-width: 960px) {
	.djh-kreis {
		--djh-kreis-breite: 18rem;
	}
}

/* Smartphone: Logo und Schild kleiner, Schild tiefer */
@media (max-width: 600px) {
	.djh-header .djh-logo img {
		width: min(200px, 46vw) !important;
	}

	.djh-label-zeile {
		top: 100px;
	}

	.admin-bar .djh-label-zeile {
		top: calc(100px + var(--wp-admin--admin-bar--height, 46px));
	}

	.djh-label {
		padding: 0.45em 0.9em;
		font-size: 1.05rem;
	}

	.djh-kreis {
		--djh-kreis-breite: clamp(7rem, 34vw, 9.5rem);
	}

	.djh-datum-block > .wp-block-columns > .wp-block-column:has(.djh-kreis) {
		flex-basis: clamp(7rem, 34vw, 9.5rem) !important;
		width: clamp(7rem, 34vw, 9.5rem);
	}

	.djh-ort {
		font-size: clamp(1.75rem, 7vw, 2.5rem);
	}
}

.djh-hero {
	padding-top: 0;
}

.djh-hero h1 {
	margin-block-end: 0;
}

.djh-hero h1 + p {
	margin-block-start: 0.25rem !important;
}

/* Menü schon unter 960 px als Burger, damit es den 90-px-Header nicht sprengt */
@media (max-width: 960px) {
	.djh-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}

	.djh-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none !important;
	}
}

/* Zitat: dezent, in Fließtextgröße, nah am Strich */
.wp-block-quote {
	margin-block: 1rem;
	padding: 0 0 0 0.9rem;
	border-left-width: 3px;
	border-left-color: var(--wp--preset--color--djh-creme);
}

.wp-block-quote,
.wp-block-quote p {
	font-size: inherit;
	line-height: inherit;
}

.wp-block-quote p {
	margin-block: 0 0.2em !important;
}

.wp-block-quote cite {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0.9em;
}

/* Hiataeinzug-Block: weißes Feld, alles zentriert */
.djh-einzug-datum {
	margin-block: 1rem 0.5rem;
	font-size: clamp(1.1rem, 4.4vw, 2.5rem);
	line-height: 1.1;
	white-space: nowrap;
}

.djh-einzug {
	margin-block-start: 0 !important;
	padding-inline: 20px !important;
}

.djh-einzug-text {
	margin-block-end: 1.25rem;
}

.wp-block-image:has(+ .djh-einzug) {
	margin-block-end: 0 !important;
}

.djh-einzug-link {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
}

.djh-einzug-link a {
	text-decoration: none;
}

/* Himmel-Verlauf: untere 500 px (letzte 200 px voll) der Seite, hinter Text und Footer-Kurve */
.djh-footer-kante::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: -2;
	height: 500px;
	background: linear-gradient(to bottom, transparent 0, #9dd1f4 300px, #9dd1f4 100%);
	pointer-events: none;
}

/* 90 px Abstand zwischen Menü und Seiteninhalt auf allen Seiten */
.wp-site-blocks > main {
	margin-block-start: 90px !important;
}

/* Impressum: Schriftgrößen wie auf der alten Seite */
.djh-impressum h1 {
	margin-block: 0 0.4em;
	font-size: clamp(1.5rem, 3.6vw, 2.1rem);
	line-height: 1.1;
}

.djh-impressum h2 {
	margin-block: 0 0.6em;
	font-size: clamp(1.1rem, 2.4vw, 1.4rem);
	line-height: 1.2;
}

.djh-impressum .djh-name {
	margin-block: 0 0.6em;
	font-size: clamp(1rem, 2vw, 1.15rem);
	line-height: 1.3;
}

.djh-impressum .djh-kontaktzeile {
	margin: 0;
	font-size: clamp(0.95rem, 1.8vw, 1.05rem);
	line-height: 1.6;
}

.djh-impressum .djh-kontaktzeile a {
	text-decoration: none;
}

/* Große Absätze auf allen Seiten 40 % kleiner */
main .has-large-font-size {
	font-size: calc(var(--wp--preset--font-size--large) * 0.6) !important;
}

/* Seitentitel der Unterseiten: 30 % kleiner, 17,5 px Abstand zum Folgeelement */
.wp-block-post-content > h1 {
	font-size: calc(var(--wp--preset--font-size--x-large) * 0.7);
}

.wp-block-post-content > h1 + * {
	margin-block-start: 17.5px !important;
}

/* Burger-Menü deutlicher: größer, dicker, mit Rahmen */
.djh-nav .wp-block-navigation__responsive-container-open,
.djh-nav .wp-block-navigation__responsive-container-close {
	padding: 0.4rem;
	border: 2px solid currentcolor;
	border-radius: 0.5rem;
	color: var(--wp--preset--color--djh-weiss);
}

.djh-nav .wp-block-navigation__responsive-container-open svg,
.djh-nav .wp-block-navigation__responsive-container-close svg {
	width: 36px;
	height: 36px;
	stroke: currentcolor;
	stroke-width: 1.5px;
}

/* Startseite: doppelter Abstand zwischen Kontakttext und Illustration */
.wp-block-image:has(.wp-image-8) {
	margin-block-start: 51px !important;
}
