/*
Theme Name: v. Blohn
Description: Schlankes Block-Theme für v-blohn.de (Nachfolger von BeTheme).
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: vblohn
*/

/* ---------- Basics ---------- */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > .vb-main {
	flex: 1 0 auto;
}

h1 strong, h2 strong, h3 strong,
h1 b, h2 b, h3 b {
	font-weight: 700;
}

:where(.wp-site-blocks) a:where(:not(.wp-element-button)) {
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------- Header ---------- */

.vb-header {
	position: sticky;
	top: 0;
	z-index: 20;
	box-shadow: 0 1px 0 var(--wp--preset--color--line);
}

.admin-bar .vb-header {
	top: var(--wp-admin--admin-bar--height, 0);
}

.vb-header__inner {
	min-height: 4.5rem;
}

.vb-header .wp-block-site-title a {
	text-decoration: none;
	white-space: nowrap;
}

.vb-nav .wp-block-navigation-item__content {
	display: block;
	padding: 1.45rem 1rem;
	text-decoration: none;
	box-shadow: inset 0 -3px 0 transparent;
	transition: color 0.15s, box-shadow 0.15s;
}

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

.vb-nav .current-menu-item > .wp-block-navigation-item__content {
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--primary);
}

@media (max-width: 599px) {
	.vb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		padding: 0.5rem 0;
		font-size: 1.375rem;
		box-shadow: none;
	}
}

/* ---------- Page header image (replaces the old slider) ---------- */

.vb-main > .vb-hero {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--50);
}

.vb-hero img {
	display: block;
	width: 100%;
	height: clamp(220px, 32vw, 460px) !important;
	object-fit: cover;
	object-position: 50% 30%;
}

/* Pages with a header image keep the old look without a visible title. */
.vb-hero + .vb-page-title {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.vb-page-title {
	margin-top: var(--wp--preset--spacing--50);
}

/* ---------- Content ---------- */

.wp-block-post-content > .wp-block-columns {
	margin-top: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--50);
}

.wp-block-image img {
	box-shadow: 0 6px 24px rgb(0 0 0 / 0.08);
}

.is-style-vb-section-title {
	text-align: center;
	color: var(--wp--preset--color--primary);
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin-bottom: var(--wp--preset--spacing--50);
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 700;
	color: var(--wp--preset--color--muted);
}

/* ---------- Timeline (Vita, Termine) ---------- */

.is-style-vb-timeline {
	--vb-tl-date: 11rem;
	--vb-tl-gap: 2.5rem;
	position: relative;
	margin-top: var(--wp--preset--spacing--50);
}

.is-style-vb-timeline::before {
	content: "";
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	left: calc(var(--vb-tl-date) + var(--vb-tl-gap) / 2);
	width: 2px;
	background: var(--wp--preset--color--line);
}

.is-style-vb-timeline > * {
	position: relative;
	display: grid;
	grid-template-columns: var(--vb-tl-date) 1fr;
	column-gap: var(--vb-tl-gap);
	align-items: start;
	margin-block: 0 var(--wp--preset--spacing--40) !important;
}

.is-style-vb-timeline > * > * {
	grid-column: 2;
	margin: 0 0 0.35rem;
}

.is-style-vb-timeline > * > :first-child {
	grid-column: 1;
	grid-row: 1 / span 4;
	margin: 0.3rem 0 0;
	text-align: right;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

.is-style-vb-timeline > *::before {
	content: "";
	position: absolute;
	top: 0.55rem;
	left: calc(var(--vb-tl-date) + var(--vb-tl-gap) / 2 - 6px);
	width: 10px;
	height: 10px;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
}

.is-style-vb-timeline h3 {
	font-size: var(--wp--preset--font-size--large);
}

.vb-termin__venue {
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
}

.vb-termin__text > :first-child {
	margin-top: 0;
}

.vb-termin__text > :last-child {
	margin-bottom: 0;
}

@media (max-width: 599px) {
	.is-style-vb-timeline {
		--vb-tl-date: 0px;
		--vb-tl-gap: 1.5rem;
	}

	.is-style-vb-timeline > * {
		grid-template-columns: 0 1fr;
	}

	.is-style-vb-timeline > * > :first-child {
		grid-column: 2;
		grid-row: auto;
		margin: 0 0 0.25rem;
		text-align: left;
	}
}

/* ---------- YouTube click-to-load ---------- */

.vb-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #2b2b2b;
	overflow: hidden;
}

.vb-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.vb-video__play {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	padding: 1rem;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.vb-video__icon {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	position: relative;
}

.vb-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 0.75rem 0 0.75rem 1.2rem;
	border-color: transparent transparent transparent #fff;
}

.vb-video__play:hover .vb-video__icon {
	background: var(--wp--preset--color--primary-dark);
}

.vb-video__label {
	font-weight: 700;
}

.vb-video__note {
	max-width: 26rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	opacity: 0.8;
	text-align: center;
}

.vb-video__note a {
	color: inherit;
}

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

.vb-footer {
	margin-top: 0;
}

.vb-footer__title {
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	margin-bottom: 0.5rem;
}

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

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