/**
 * Hero with Background Image Block - Frontend Styles
 */

.kbd-hero-background-image,
.wp-block-kultur-b-digital-hero-background-image {
	position: relative;
	width: 100vw !important;
	max-width: 100vw !important;
	min-height: 0;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 140px 120px;
	box-sizing: border-box;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
	overflow: hidden;
}

.kbd-hero-background-image__background {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	width: 100%;
	height: 100%;
}

.kbd-hero-background-image__bg-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	display: block;
}

.kbd-hero-background-image__overlay {
	display: none;
}

.kbd-hero-background-image__container {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1200px;
	gap: 0;
}

.kbd-hero-background-image__spacer {
	flex: 0 1 auto;
	max-width: 600px;
	min-width: 0;
}

/* Left alignment (default) */
.kbd-hero-background-image--align-left .kbd-hero-background-image__container {
	justify-content: flex-start;
}

.kbd-hero-background-image--align-left .kbd-hero-background-image__spacer {
	display: none;
}

/* Right alignment */
.kbd-hero-background-image--align-right .kbd-hero-background-image__container {
	justify-content: flex-end;
}

.kbd-hero-background-image__content {
	flex: 0 0 auto;
	background-color: var(--wp--preset--color--primary-white);
	width: 500px;
	min-height: 376px;
	padding: 50px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	box-sizing: border-box;
	overflow-y: auto;
}

.kbd-hero-background-image__text {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kbd-hero-background-image__title {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--h-1) !important;
	font-weight: 800;
	line-height: 1.2;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

.kbd-hero-background-image__text-content {
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 400;
	font-size: 18px;
	line-height: 1.8;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

/* Native Listen im Content: normale Bullets, kein Pfeil */
.kbd-hero-background-image__content ul {
	list-style: disc !important;
	padding-left: 24px !important;
	margin: 0 0 1em 0 !important;
}

.kbd-hero-background-image__content ul li {
	position: static !important;
	padding-left: 0 !important;
	line-height: 1.8 !important;
}

.kbd-hero-background-image__content ul li::before {
	content: none !important;
}

.kbd-hero-background-image__button-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.kbd-hero-background-image__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 60px wie der Core-Button, damit die Hoehen ueberall zusammenpassen (#56) */
	height: 60px;
	padding: 20px 30px;
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--body, 18px);
	line-height: 1;
	text-align: center;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: opacity 0.3s ease;
	box-sizing: border-box;
}

.kbd-hero-background-image__button:hover {
	opacity: 0.9;
}

/* ===========================================
   RESPONSIVE BREAKPOINTS
   - 1440px: Large Desktop - Padding-Reduktion
   - 1024px: Desktop/Tablet - Content-Box verkleinern
   - 768px: Tablet - zentriert
   - 480px: Mobile - kompakt
   =========================================== */

/* Large Desktop */
@media (max-width: 1440px) {
	.kbd-hero-background-image {
		padding: 100px 80px;
	}

	.kbd-hero-background-image__content {
		width: 450px;
		padding: 40px;
	}
}

/* Desktop/Tablet Landscape */
@media (max-width: 1024px) {
	.kbd-hero-background-image {
		padding: 80px 40px;
		max-height: none;
	}

	.kbd-hero-background-image__content {
		width: 400px;
		padding: 30px;
		min-height: auto;
	}

	.kbd-hero-background-image__text-content {
		font-size: 16px;
		line-height: 1.6;
	}

	/* Kein Button-Override mehr: Die Basisregel (60px, Token-Schriftgroesse)
	   gilt auf allen Viewports, damit Hero-Buttons genauso hoch sind wie
	   Buttons in normalen Absaetzen (#56). */
}

/* Tablet Portrait - STACKED LAYOUT (Bild → Textbox → Seitencontent) */
@media (max-width: 768px) {
	/* Container: von Overlay zu Stacked umstellen */
	.kbd-hero-background-image {
		display: block;
		padding: 0;
		min-height: 0;
		max-height: none;
		overflow: visible;
	}

	/* Bild läuft jetzt als eigenständiger Block oben */
	.kbd-hero-background-image__background {
		position: relative;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.kbd-hero-background-image__bg-image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	/* Content-Container: volle Breite, normaler Flow unter dem Bild */
	.kbd-hero-background-image__container {
		display: block;
		padding: 0;
		width: 100%;
		max-width: 100%;
	}

	.kbd-hero-background-image__spacer {
		display: none;
	}

	.kbd-hero-background-image__content {
		width: 100%;
		max-width: 100%;
		padding: 30px 24px;
		gap: 20px;
	}

	.kbd-hero-background-image__text {
		gap: 8px;
	}

	/* Scroll-Hinweis im Stacked-Layout ausblenden (funktioniert nur bei overlay) */
	.kbd-hero-background-image__scroll-hint {
		display: none;
	}
}

/* Mobile - kompakt */
@media (max-width: 480px) {
	.kbd-hero-background-image__container {
		padding: 0;
	}

	.kbd-hero-background-image__content {
		padding: 24px 16px;
		gap: 16px;
	}

	.kbd-hero-background-image__text-content {
		font-size: 15px;
	}

	.kbd-hero-background-image__button {
		width: 100%;
		justify-content: center;
	}
}

/* ===========================================
   SCROLL-HINWEIS (Lottie Animation)
   Mittig unter dem Content, mit dekorativen Linien
   =========================================== */

.kbd-hero-background-image__scroll-hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	width: 300px;
	z-index: 3;
}

.kbd-hero-background-image__scroll-line {
	flex: 1;
	height: 1px;
	background-color: var(--wp--preset--color--primary-blue);
	opacity: 0.3;
}

.kbd-hero-background-image__scroll-lottie {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

/* Lottie SVG weiss einfaerben (Original ist #212121) */
.kbd-hero-background-image__scroll-lottie svg path {
	stroke: var(--wp--preset--color--primary-white) !important;
	fill: var(--wp--preset--color--primary-white) !important;
}

/* ===========================================
   EVENT-MODUS STYLES
   Zwei-Spalten-Layout für Event-Details
   Content-Box geht über volle Container-Breite
   =========================================== */

/* Event-Mode: Content-Box volle Breite */
.kbd-hero-background-image--event-mode .kbd-hero-background-image__container {
	justify-content: center;
}

.kbd-hero-background-image--event-mode .kbd-hero-background-image__spacer {
	display: none;
}

.kbd-hero-background-image--event-mode .kbd-hero-background-image__content {
	width: 100%;
	max-width: 1200px;
	min-height: auto;
}

/* Event-Layout: Zwei-Spalten Container */
.kbd-hero-background-image__event-layout {
	display: flex;
	gap: 60px;
	align-items: stretch;
	width: 100%;
}

/* Linke Spalte: Titel + Button */
.kbd-hero-background-image__event-left {
	flex: 1.2;
	display: flex;
	flex-direction: column;
	gap: 30px;
	justify-content: space-between;
}

/* Event Label (z.B. "Termin") */
.kbd-hero-background-image__event-label {
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	color: var(--wp--preset--color--primary-blue);
}

/* Vertikale Trennlinie */
.kbd-hero-background-image__event-divider {
	width: 3px;
	background-color: var(--wp--preset--color--primary-blue);
	flex-shrink: 0;
}

/* Rechte Spalte: Event-Details */
.kbd-hero-background-image__event-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 50px;
	justify-content: center;
}

/* Event-Sektion (Datum/Ort) */
.kbd-hero-background-image__event-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Sektion-Label (z.B. "Datum", "Ort") */
.kbd-hero-background-image__event-section-label {
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

/* Einzelnes Event-Item (Icon + Text) */
.kbd-hero-background-image__event-item {
	display: flex;
	align-items: center;
	gap: 15px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 700;
	line-height: 1.8;
	color: var(--wp--preset--color--primary-blue);
}

.kbd-hero-background-image__event-item--top {
	align-items: flex-start;
}

/* Event-Icons */
.kbd-hero-background-image__event-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	color: var(--wp--preset--color--primary-blue);
}

/* Ort-Details Container (Name + Adresse) */
.kbd-hero-background-image__ort-details {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Location Name (fett) */
.kbd-hero-background-image__location-name {
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--body);
	color: var(--wp--preset--color--primary-blue);
}

/* Address */
.kbd-hero-background-image__address {
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.8;
	color: var(--wp--preset--color--primary-blue);
}

/* Button disabled (Termin vergangen) */
.kbd-hero-background-image__button--disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* ===========================================
   EVENT-MODUS RESPONSIVE
   =========================================== */

/* Large Desktop */
@media (max-width: 1440px) {
	.kbd-hero-background-image--event-mode .kbd-hero-background-image__content {
		padding: 40px;
	}

	.kbd-hero-background-image__event-layout {
		gap: 50px;
	}
}

/* Desktop/Tablet Landscape */
@media (max-width: 1024px) {
	.kbd-hero-background-image--event-mode .kbd-hero-background-image__content {
		padding: 30px;
	}

	.kbd-hero-background-image__event-layout {
		gap: 30px;
	}

	.kbd-hero-background-image__event-right {
		gap: 40px;
	}

	.kbd-hero-background-image__event-section-label {
		font-size: var(--wp--preset--font-size--h4);
	}
}

/* Tablet Portrait - Spalten stapeln */
@media (max-width: 768px) {
	.kbd-hero-background-image--event-mode .kbd-hero-background-image__content {
		width: 100%;
		max-width: 100%;
		padding: 30px;
	}

	.kbd-hero-background-image__event-layout {
		flex-direction: column;
		gap: 24px;
	}

	/* Trennlinie horizontal */
	.kbd-hero-background-image__event-divider {
		width: 100%;
		height: 3px;
	}

	.kbd-hero-background-image__event-right {
		gap: 40px;
	}

	.kbd-hero-background-image__event-section-label {
		font-size: var(--wp--preset--font-size--h4);
	}
}

/* Mobile - kompakt */
@media (max-width: 480px) {
	.kbd-hero-background-image--event-mode .kbd-hero-background-image__content {
		padding: 24px;
	}

	.kbd-hero-background-image__event-layout {
		gap: 20px;
	}

	.kbd-hero-background-image__event-left {
		gap: 20px;
	}

	.kbd-hero-background-image__event-label {
		font-size: var(--wp--preset--font-size--h5);
	}

	.kbd-hero-background-image__event-section-label {
		font-size: var(--wp--preset--font-size--h5);
	}

	.kbd-hero-background-image__event-right {
		gap: 30px;
	}
}

