/**
 * WP Veranstaltungen Billing — Single-Event Template
 *
 * Layout-Konzept:
 *
 * Der brauenfarbene Hero-Background ist ein Pseudo-Element auf `.wvb-hero`
 * selbst (dem Header in der linken Spalte). Seine Höhe folgt der Höhe
 * seines Content-Elements → immer korrekt, ohne JavaScript-Messung,
 * ohne fragile Pixelwerte. Der Trick für "voll-Browser-breit":
 *
 *   .wvb-hero::before {
 *     position: absolute;
 *     top: 0; bottom: 0;         ← genau so hoch wie .wvb-hero
 *     left: 50%; transform: translateX(-50%);
 *     width: 100vw;              ← ganze Browser-Breite
 *   }
 *
 * Info-Card (rechte Spalte) hat einen negativen z-index-Kontext, sodass
 * sie visuell den Hero überlappt und in den weißen Content unten reinragt.
 *
 * Mobile (<960px):
 * - 1-Spalten-Layout
 * - col-side kommt VOR col-main (order:1 vs order:2)
 *   → Anmelde-/Info-Inhalte zuerst sichtbar
 * - Hero wird zur klar begrenzten Card (border-radius, ::before bleibt
 *   auf 100% Breite statt 100vw)
 */

/* =====================================================================
   FOUNDATION
   ===================================================================== */

.wvb-single-event {
	color: var(--wvb-text, #0c0c0c);
	line-height: 1.65;
	position: relative;  /* für das ::before */
}

.wvb-single-event a {
	color: var(--wvb-primary, #b36747);
	text-decoration: none;
}
.wvb-single-event a:hover {
	text-decoration: underline;
}

/* Page-Container — zentriert, max-width */
.wvb-single-event .wvb-page {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px 80px;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

/* =====================================================================
   HERO-BACKGROUND — voll-Browser-breiter brauner Streifen.
   Höhe folgt automatisch dem Hero-Header (linke Spalte): das ::before
   sitzt am Hero-Element mit position:absolute + bottom:-X, sodass der
   braune Bereich genau bis kurz unter die Tags reicht — egal wie lang
   Titel/Subtitle sind.
   ===================================================================== */

/* Brauner Hero-Background:
   Pseudo-Element auf .wvb-hero selbst — die Höhe folgt AUTOMATISCH dem
   Hero-Content (Titel, Subtitle, Tags), weil das Element seine natürliche
   Höhe hat. Der Trick für 100% Browser-Breite: das ::before wird per
   translateX(-50%) + width:100vw aus der Grid-Spalte rausgezogen.
   Der Content darunter (.wvb-main) ist AUTOMATISCH auf weißem
   Background — kein JS, keine fragile Pixelhöhe. */
.wvb-single-event .wvb-hero {
	position: relative;
	/* Padding sorgt für Abstand zwischen Content und Hero-Rändern */
	padding: 50px 0 60px;
}

.wvb-single-event .wvb-hero::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	background: var(--wvb-primary, #b36747);
	z-index: -1;
	pointer-events: none;
}

/* =====================================================================
   GRID — 2-Spalten, Hero-Content + Beschreibung links, Info+Flyer rechts
   ===================================================================== */

.wvb-single-event .wvb-grid {
	display: grid;
	grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr);
	gap: 48px;
	align-items: start;
}

.wvb-single-event .wvb-col-main {
	min-width: 0;
}

.wvb-single-event .wvb-col-side {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* =====================================================================
   HERO-CONTENT (linke Spalte, oben)
   ===================================================================== */

.wvb-single-event .wvb-hero {
	color: #fff;
}

.wvb-single-event .wvb-back-link {
	display: inline-block;
	color: #fff !important;
	font-size: 15px;
	margin-bottom: 26px;
	text-decoration: underline !important;
	text-underline-offset: 4px;
}
.wvb-single-event .wvb-back-link:hover {
	opacity: .85;
}

.wvb-single-event .wvb-hero-title {
	color: #fff !important;
	margin: 0 0 14px !important;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 500 !important;
	line-height: 1.15;
	letter-spacing: -.5px;
}

.wvb-single-event .wvb-hero-subtitle {
	font-size: clamp(16px, 1.6vw, 20px);
	margin: 0 0 22px;
	color: rgba(255, 255, 255, .92);
	font-weight: 400;
	line-height: 1.4;
}

.wvb-single-event .wvb-hero-datum {
	font-size: clamp(16px, 1.6vw, 19px);
	margin: 0 0 24px;
	color: #fff;
	font-weight: 500;
}

.wvb-single-event .wvb-hero-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wvb-single-event .wvb-tag {
	display: inline-block !important;
	background: transparent !important;
	color: #fff !important;
	border: 1.5px solid #fff !important;
	padding: 9px 16px !important;
	border-radius: 3px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	letter-spacing: .2px;
	line-height: 1.2 !important;
}

/* =====================================================================
   MAIN — Beschreibung darunter
   ===================================================================== */

.wvb-single-event .wvb-main {
	padding-top: 30px;
	min-width: 0;
}

.wvb-single-event .wvb-main img {
	max-width: 100%;
	height: auto;
}

.wvb-single-event .wvb-main p,
.wvb-single-event .wvb-main ul,
.wvb-single-event .wvb-main ol {
	margin: 0 0 1em;
	font-size: 15px;
	line-height: 1.7;
	color: #2a2a2a;
}

.wvb-single-event .wvb-main strong {
	font-weight: 600;
	color: var(--wvb-text, #0c0c0c);
}

/* Headings im Beschreibungstext in Primärfarbe */
.wvb-single-event .wvb-main h2,
.wvb-single-event .wvb-main h3,
.wvb-single-event .wvb-main h4 {
	color: var(--wvb-primary, #b36747) !important;
	font-weight: 500;
	line-height: 1.3;
	margin: 1.6em 0 0.6em;
}
.wvb-single-event .wvb-main h2 { font-size: clamp(20px, 2vw, 24px); }
.wvb-single-event .wvb-main h3 { font-size: clamp(17px, 1.7vw, 20px); }

/* HKS-spezifisch: <p><strong>Pseudo-Heading</strong></p> auch hervorheben */
.wvb-single-event .wvb-main p > strong:only-child {
	color: var(--wvb-primary, #b36747);
	font-size: clamp(18px, 1.8vw, 22px);
	font-weight: 500;
}

/* =====================================================================
   INFO-CARD (rechte Spalte, beginnt im Hero-Bereich)
   ===================================================================== */

.wvb-single-event .wvb-info-card {
	background: #fff;
	border: 1px solid rgba(0,0,0,.08);
	border-radius: 4px;
	padding: 22px 26px 26px;
	box-shadow: 0 6px 24px rgba(0,0,0,.10);
	color: var(--wvb-text, #0c0c0c);
	/* Info-Card startet tiefer im Hero, damit das Logo oben Luft hat
	   und nicht direkt am Hero-Beginn sitzt. */
	margin-top: 60px;
	/* Eigener stacking-context, damit die Card sicher VOR dem braunen
	   ::before liegt (das ist auf <main>, z-index 0). */
	position: relative;
	z-index: 2;
}

.wvb-single-event .wvb-info-card__thumb {
	margin: 0 0 18px;
	background: #fff;
	padding: 0;
}
.wvb-single-event .wvb-info-card__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.wvb-single-event .wvb-info-card__meta {
	margin: 0;
	font-size: 14px;
}
.wvb-single-event .wvb-info-card__meta dt {
	font-weight: 700;
	color: var(--wvb-text, #0c0c0c);
	margin-top: 14px;
	margin-bottom: 3px;
}
.wvb-single-event .wvb-info-card__meta dt:first-child {
	margin-top: 0;
}
.wvb-single-event .wvb-info-card__meta dd {
	margin: 0;
	color: #5a5a5a;
	line-height: 1.55;
}

.wvb-single-event .wvb-cta-button {
	display: block;
	background: var(--wvb-btn-bg, #b36747);
	color: var(--wvb-btn-text, #fff) !important;
	padding: 14px 22px;
	border-radius: 3px;
	text-decoration: none !important;
	font-weight: 500;
	font-size: 15px;
	text-align: center;
	margin-top: 22px;
	transition: background .15s ease;
}
.wvb-single-event .wvb-cta-button:hover {
	background: var(--wvb-btn-bg-hover, #5f5f5f);
	color: var(--wvb-btn-text, #fff) !important;
	text-decoration: none !important;
}

/* =====================================================================
   PROGRAMMFLYER (rechte Spalte, unter Info-Card)
   Reihenfolge: Vorschaubild oben, dann Text-Link in Primärfarbe darunter
   ===================================================================== */

.wvb-single-event .wvb-programm-thumb {
	display: block;
	width: 100%;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,.10);
	line-height: 0;
}
.wvb-single-event .wvb-programm-thumb img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .3s ease;
}
.wvb-single-event .wvb-programm-thumb:hover img {
	transform: scale(1.02);
}

.wvb-single-event .wvb-programm-link {
	display: inline-block;
	color: var(--wvb-primary, #b36747) !important;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none !important;
	padding: 4px 0;
}
.wvb-single-event .wvb-programm-link::after {
	content: " ↓";
}
.wvb-single-event .wvb-programm-link:hover {
	text-decoration: underline !important;
}

/* =====================================================================
   ANMELDE-SECTION (im Main-Content, scroll-Ziel)
   ===================================================================== */

.wvb-single-event .wvb-anmeldung-section {
	scroll-margin-top: 80px;
	margin-top: 48px;
}

.wvb-single-event .wvb-anmeldung-block {
	background: var(--wvb-anmeldebox-bg, #fafafa);
	border: 1px solid rgba(0,0,0,.08);
	border-radius: var(--wvb-anmeldebox-radius, 4px);
	padding: 32px 36px;
	margin: 0;
}

.wvb-single-event .wvb-anmeldung-block h3 {
	margin: 0 0 22px;
	color: var(--wvb-primary, #b36747);
	font-size: 22px;
	font-weight: 500;
}

.wvb-single-event .wvb-anmeldung-block label {
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wvb-single-event .wvb-anmeldung-block label:has(input[type="radio"]:checked) {
	border-color: var(--wvb-primary, #b36747) !important;
	box-shadow: 0 0 0 2px rgba(179, 103, 71, .12);
}

.wvb-single-event .wvb-anmeldung-block button.button,
.wvb-single-event .wvb-anmeldung-block button[type="submit"] {
	background: var(--wvb-btn-bg, #b36747) !important;
	color: var(--wvb-btn-text, #fff) !important;
	border: none !important;
	padding: 14px 28px !important;
	border-radius: 3px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: background .15s ease !important;
	font-size: 15px !important;
}

/* =====================================================================
   GALERIE
   ===================================================================== */

.wvb-single-event .wvb-gallery {
	margin-top: 40px;
}

.wvb-single-event .wvb-gallery h2 {
	color: var(--wvb-primary, #b36747);
	margin-bottom: 16px;
}

.wvb-single-event .wvb-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 6px;
}

.wvb-single-event .wvb-gallery-item {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 3px;
	background: var(--wvb-bg-light, #f7f7f7);
}
.wvb-single-event .wvb-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}
.wvb-single-event .wvb-gallery-item:hover img {
	transform: scale(1.04);
}

/* =====================================================================
   MOBILE — col-side zuerst (Anmelde-Block hat Priorität), dann col-main
   ===================================================================== */

@media (max-width: 960px) {
	.wvb-single-event .wvb-page {
		padding: 0 20px 60px;
	}

	.wvb-single-event .wvb-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	/* Sidebar zuerst, Hero+Content danach */
	.wvb-single-event .wvb-col-side {
		order: 1;
	}
	.wvb-single-event .wvb-col-main {
		order: 2;
	}

	/* Info-Card: kein negativer Margin auf Mobile — sitzt einfach in ihrer
	   Grid-Spalte, ohne Hero-Überlappungslogik. */
	.wvb-single-event .wvb-info-card {
		margin-top: 0;
	}

	/* Hero: Background bleibt via ::before, aber Padding und ::before-Radien
	   müssen für Mobile angepasst werden. Hero endet als Card mit
	   Border-Radius (kein full-width mehr, weil das auf Mobile mit 1-Spalten
	   Layout hässlich wäre). */
	.wvb-single-event .wvb-hero {
		padding: 30px 24px 36px;
		border-radius: 4px;
		overflow: hidden;  /* damit border-radius das ::before clippt */
	}
	.wvb-single-event .wvb-hero::before {
		width: 100%;
		left: 0;
		transform: none;
	}

	.wvb-single-event .wvb-main {
		padding-top: 8px;
	}
}
