/*
 * CB Event Detail — Plugin-CSS für die [cb_event_*]-Sektionen.
 *
 * Ziel: das visuelle Niveau des Messekalenders auf die Event-Detail-
 * Seiten übertragen. Cream-Bronze-Editorial, Bebas Neue für Display.
 *
 * Architektur:
 *   - Innere Layouts, Typografie und Branchen-Farbe regelt dieses CSS.
 *   - Äußeres Layout (Container-Background, Section-Padding, Spacing
 *     zwischen Sektionen) regelt Elementor — siehe Setup-Anleitung.
 *
 * Branchen-Farb-Adaption per CSS-Variable `--cb-event-color`, die im
 * Hero-Shortcode inline gesetzt wird. Quick-Facts und CTA erben sie
 * vom umgebenden Wrapper (Elementor-Container).
 */

@font-face {
	font-family: 'CBEvBebas';
	src: url('https://cdn.jsdelivr.net/npm/@fontsource/bebas-neue@5.0.13/files/bebas-neue-latin-400-normal.woff2') format('woff2');
	font-display: swap;
	font-weight: 400;
}

/* === Defaults === */
.cb-event-section {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #1F1B14;
	--cb-event-color: #8B5A0D;
}

.cb-event-section,
.cb-event-section * {
	box-sizing: border-box;
}

/* === Typografie === */
.cb-event-h1 {
	font-family: 'CBEvBebas', 'Bebas Neue', sans-serif;
	font-weight: 400;
	font-size: clamp(34px, 5vw, 50px);
	line-height: 1;
	letter-spacing: 0.5px;
	color: #1F1B14;
	margin: 0 0 18px;
}

.cb-event-label {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #8B5A0D;
	font-weight: 500;
}

.cb-event-link {
	display: inline-block;
	color: #8B5A0D;
	text-decoration: none;
	font-size: 12px;
	letter-spacing: 0.04em;
	font-weight: 500;
	border-bottom: 1px solid rgba(139, 90, 13, 0.5);
	padding-bottom: 1px;
	transition: color 0.15s, border-color 0.15s;
}
.cb-event-link:hover {
	color: #1F1B14;
	border-color: #1F1B14;
}

/* === Hero === */
.cb-event-hero {
	position: relative;
	padding-top: 4px; /* Platz für die Branchenfarbe-Bar */
}

.cb-event-hero__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--cb-event-color);
}

.cb-event-meta {
	font-size: 11px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #8B5A0D;
	font-weight: 500;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}

.cb-event-meta__dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	background: var(--cb-event-color);
	border-radius: 2px;
	margin-right: 8px;
	flex-shrink: 0;
}

.cb-event-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.cb-event-pill {
	display: inline-block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 4px 11px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--cb-event-pill-color, #8B5A0D) 12%, transparent);
	color: var(--cb-event-pill-color, #8B5A0D);
}
/* Fallback für Browser ohne color-mix-Support (sehr alte Chromes) */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
	.cb-event-pill { background: rgba(139, 90, 13, 0.12); }
}

.cb-event-pill--ghost {
	background: rgba(139, 90, 13, 0.10);
	color: #8B5A0D;
}

.cb-event-status {
	display: inline-block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 11px;
	border-radius: 3px;
	background: #876B2E;
	color: #F5EEDE;
	margin-left: 4px;
}
.cb-event-status.is-cancelled { background: #6B1F2A; }

.cb-event-hero__ort {
	font-size: 14px;
	color: #6B6557;
	line-height: 1.5;
}
.cb-event-hero__ort strong {
	font-weight: 500;
	color: #1F1B14;
}

.cb-event-bdg {
	display: inline-block;
	font-size: 9px;
	background: #1F1B14;
	color: #F5EEDE;
	padding: 2px 6px;
	border-radius: 2px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-left: 4px;
	vertical-align: 1px;
}

/* === Quickfacts (Drei-Spalter) === */
.cb-event-grid {
	display: grid;
	gap: 28px;
}
.cb-event-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) {
	.cb-event-grid--3 { grid-template-columns: 1fr; gap: 22px; }
}

.cb-event-fact .cb-event-label {
	margin-bottom: 10px;
	display: block;
}

.cb-event-fact__main {
	font-family: 'CBEvBebas', 'Bebas Neue', sans-serif;
	font-size: 22px;
	line-height: 1.15;
	color: #1F1B14;
	letter-spacing: 0.3px;
	margin-bottom: 4px;
	font-variant-numeric: tabular-nums;
}

.cb-event-fact__sub {
	font-size: 13px;
	color: #6B6557;
	line-height: 1.5;
	margin-bottom: 12px;
}

.cb-event-fact .cb-event-link {
	margin-top: 4px;
}

/* === CTA-Fuß === */
.cb-event-cta__wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
	align-items: center;
}

.cb-event-btn {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
	padding: 12px 26px;
	border-radius: 3px;
	text-decoration: none;
	font-family: inherit;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	border: 1px solid transparent;
}

.cb-event-btn--primary {
	background: #1F1B14;
	color: #F5EEDE;
}
.cb-event-btn--primary:hover {
	background: #3a3128;
	color: #F5EEDE;
}

.cb-event-btn--secondary {
	background: transparent;
	color: #1F1B14;
	border-color: #1F1B14;
}
.cb-event-btn--secondary:hover {
	background: #1F1B14;
	color: #F5EEDE;
}

/* === Section-Headings (h2) für 3reasons, services, venue, etc. === */
.cb-event-h2 {
	font-family: 'CBEvBebas', 'Bebas Neue', sans-serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 1;
	letter-spacing: 0.5px;
	color: #1F1B14;
	margin: 0 0 22px;
}

/* === Grid-Varianten === */
.cb-event-grid--1 { grid-template-columns: 1fr; }
.cb-event-grid--2 { grid-template-columns: repeat(2, 1fr); gap: 36px; }
.cb-event-grid--venue { grid-template-columns: minmax(220px, 1fr) 1.4fr; gap: 28px; align-items: start; }

@media (max-width: 720px) {
	.cb-event-grid--2,
	.cb-event-grid--venue { grid-template-columns: 1fr; gap: 24px; }
}

/* === 3 Gründe === */
.cb-event-reason__num {
	font-family: 'CBEvBebas', 'Bebas Neue', sans-serif;
	font-size: 38px;
	line-height: 1;
	color: var(--cb-event-color, #8B5A0D);
	margin-bottom: 10px;
	letter-spacing: 0.5px;
	font-variant-numeric: tabular-nums;
}

.cb-event-reason__text {
	font-size: 13.5px;
	line-height: 1.6;
	color: #1F1B14;
	margin: 0;
}

/* === Services (WYSIWYG-Prose) === */
.cb-event-services__col .cb-event-label {
	display: block;
	margin-bottom: 14px;
}

.cb-event-prose {
	font-size: 13.5px;
	line-height: 1.7;
	color: #1F1B14;
}
.cb-event-prose p { margin: 0 0 10px; }
.cb-event-prose p:last-child { margin-bottom: 0; }
.cb-event-prose ul,
.cb-event-prose ol {
	margin: 0 0 10px;
	padding-left: 20px;
}
.cb-event-prose li { margin-bottom: 4px; }
.cb-event-prose a {
	color: #8B5A0D;
	text-decoration: none;
	border-bottom: 1px solid rgba(139, 90, 13, 0.4);
}
.cb-event-prose a:hover {
	color: #1F1B14;
	border-color: #1F1B14;
}
.cb-event-prose strong { font-weight: 500; }
.cb-event-prose em { font-style: italic; }

/* === Venue: Adress-Block + Map-Preview === */
.cb-event-venue__name {
	font-weight: 500;
	font-size: 15px;
	color: #1F1B14;
	margin-bottom: 10px;
}
.cb-event-venue__address {
	font-size: 13.5px;
	line-height: 1.55;
	color: #6B6557;
	margin-bottom: 14px;
}
.cb-event-venue__phone {
	font-size: 13.5px;
	color: #6B6557;
	margin-bottom: 12px;
}
.cb-event-venue__phone a {
	color: #1F1B14;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}
.cb-event-venue__phone a:hover { color: #8B5A0D; }

/* Venue-Spalten dürfen schrumpfen — sonst kollabiert aspect-ratio. */
.cb-event-venue__info,
.cb-event-venue__map { min-width: 0; }

/* Map-Preview: klickbare Karte ohne iframe, ohne Cookie-Sperre nötig.
   Öffnet Google Maps in neuem Tab — DSGVO-konform, keine Drittabhängigkeit.

   Wichtig: width:100% + min-height als Fallback, weil <a> mit aspect-ratio
   ohne explizite Breite/Höhe auf 0×0 kollabieren kann (besonders in
   Elementor-Wrappern, die ihre Kinder nicht zwingen die volle Spalte zu
   füllen). */
.cb-event-map-preview {
	display: block;
	position: relative;
	width: 100%;
	min-height: 220px;
	aspect-ratio: 16 / 9;
	border-radius: 4px;
	background:
		linear-gradient(135deg, rgba(139,90,13,0.10) 0%, rgba(139,90,13,0.18) 100%),
		radial-gradient(circle at 35% 45%, rgba(155,61,95,0.08) 0%, transparent 50%),
		radial-gradient(circle at 70% 60%, rgba(58,98,118,0.08) 0%, transparent 50%);
	text-decoration: none;
	color: #1F1B14;
	overflow: hidden;
	transition: transform 0.15s ease-out;
	border: 0.5px solid rgba(139, 90, 13, 0.2);
}
.cb-event-map-preview:hover {
	transform: translateY(-1px);
	border-color: rgba(139, 90, 13, 0.5);
}
.cb-event-map-preview__inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(245, 238, 222, 0.85);
	padding: 16px;
}
.cb-event-map-preview__icon {
	color: #1F1B14;
	margin-bottom: 4px;
}
.cb-event-map-preview__label {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #1F1B14;
	text-align: center;
}
.cb-event-map-preview__sub {
	font-size: 11px;
	color: #6B6557;
	text-align: center;
}

/* === Aussteller-Grid === */

.cb-event-brands-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}

@media (max-width: 720px) {
	.cb-event-brands-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
	.cb-event-brands-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

.cb-event-brand {
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
	border: 0.5px solid rgba(139, 90, 13, 0.2);
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.15s ease-out, border-color 0.15s;
	position: relative;
	min-height: 60px; /* Fallback wenn aspect-ratio nicht greift */
}

.cb-event-brand:hover {
	transform: translateY(-1px);
	border-color: rgba(139, 90, 13, 0.5);
}

.cb-event-brand img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cb-event-brand.is-hidden { display: none; }

.cb-event-brands-more {
	display: block;
	margin: 18px auto 0;
	background: transparent;
	color: #8B5A0D;
	border: 1px solid rgba(139, 90, 13, 0.4);
	padding: 10px 22px;
	font-size: 12px;
	letter-spacing: 0.05em;
	font-weight: 500;
	border-radius: 3px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cb-event-brands-more:hover {
	background: rgba(139, 90, 13, 0.08);
	border-color: #8B5A0D;
	color: #1F1B14;
}

/* === Moodboard === */

.cb-event-moodboard-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

@media (max-width: 720px) {
	.cb-event-moodboard-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
	.cb-event-moodboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.cb-event-mood {
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.15s ease-out;
	position: relative;
	min-height: 60px; /* Fallback */
	background: rgba(139, 90, 13, 0.05);
}

.cb-event-mood:hover {
	transform: scale(1.02);
}

.cb-event-mood img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.15s;
}

.cb-event-mood:hover img { opacity: 0.92; }
