/* BHMA Termine – Liste und Infoblöcke (Farben/Schrift wie bhma.de) */
.bhma-termine,
.bhma-infos {
	--bhma-blau: #003D63;
	--bhma-blau-hover: #00507F;
	--bhma-hell: #2EA3F2;
	--bhma-rahmen: #D9D9D9;
	font-family: Poppins, Arial, sans-serif;
	color: var(--bhma-blau);
}

/* ---------- Liste ---------- */
.bhma-jahr { margin: 0 0 48px; }
.bhma-jahr__titel {
	font-size: 36px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bhma-blau);
	margin: 0 0 16px;
	padding: 0;
}
.bhma-termine ul.bhma-liste {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.bhma-termine ul.bhma-liste li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.bhma-termine ul.bhma-liste li::before { content: none; }

.bhma-termin {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 24px;
	padding: 14px 20px;
	background: var(--bhma-blau);
	color: #fff !important;
	border: 1px solid var(--bhma-rahmen);
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	transition: background-color .15s ease;
}
a.bhma-termin:hover,
a.bhma-termin:focus-visible { background: var(--bhma-blau-hover); color: #fff; }
a.bhma-termin:focus-visible { outline: 3px solid var(--bhma-hell); outline-offset: 2px; }

.bhma-termin__datum { flex: 0 0 170px; }
.bhma-termin__name {
	flex: 1 1 220px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}
.bhma-termin__cta { font-weight: 500; white-space: nowrap; }

/* eigene Messen hervorgehoben */
.bhma-termin--eigene {
	padding: 18px 20px;
	font-size: 16px;
	box-shadow: inset 0 0 0 3px var(--bhma-hell);
}
.bhma-termin--eigene .bhma-termin__cta { font-weight: 600; text-decoration: underline; }
.bhma-termin__logo {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	display: block;
}
.bhma-badge {
	background: #fff;
	color: var(--bhma-blau);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	padding: 2px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* ---------- Infoblöcke ---------- */
.bhma-info {
	border-top: 1px solid var(--bhma-rahmen);
	padding: 56px 0;
	scroll-margin-top: 140px; /* Platz für den Divi-Header */
}
.bhma-info__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 56px;
	align-items: flex-start;
}
.bhma-info__text { flex: 999 1 520px; min-width: 0; }
.bhma-info__eyebrow {
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.bhma-info__titel {
	margin: 0 0 8px;
	padding: 0;
	font-size: 36px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bhma-blau);
}
.bhma-info__datum { margin: 0 0 32px; padding: 0; font-size: 20px; font-weight: 600; }
.bhma-info__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 32px;
}
.bhma-info__feld--breit { grid-column: 1 / -1; }
.bhma-info__feld h4 {
	margin: 0 0 6px;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--bhma-blau);
}
.bhma-info__feld p { margin: 0; padding: 0; font-size: 15px; line-height: 1.6; color: var(--bhma-blau); }
.bhma-info__feld a { color: var(--bhma-blau); text-decoration: underline; }
.bhma-info__feld a:hover { color: var(--bhma-hell); }

.bhma-info__buttons { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 36px; }
.bhma-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 24px;
	box-sizing: border-box;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	border-radius: 3px;
}
.bhma-btn--voll { background: var(--bhma-blau); color: #fff !important; }
.bhma-btn--voll:hover { background: var(--bhma-blau-hover); }
.bhma-btn--rahmen { border: 2px solid var(--bhma-blau); color: var(--bhma-blau) !important; }
.bhma-btn--rahmen:hover { background: #f2f6f9; }

.bhma-info__flyerbox { flex: 1 1 300px; max-width: 340px; margin: 0; }
.bhma-info__flyer {
	width: 100%;
	height: auto;
	aspect-ratio: 148 / 210;
	object-fit: cover;
	display: block;
	border: 1px solid var(--bhma-rahmen);
	box-shadow: 0 6px 20px rgba(0, 61, 99, .15);
}
.bhma-info__flyerbox figcaption { font-size: 13px; margin-top: 10px; }

@media (max-width: 640px) {
	.bhma-info__grid { grid-template-columns: minmax(0, 1fr); }
	.bhma-termin__datum { flex-basis: 100%; }
	.bhma-jahr__titel, .bhma-info__titel { font-size: 28px; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Divi-Textmodul überschreibt Überschriften – hier fest setzen */
.et_pb_text .bhma-termine h3.bhma-jahr__titel,
.et_pb_text .bhma-infos h3.bhma-info__titel { font-size: 36px !important; line-height: 1.2 !important; font-weight: 600 !important; color: #003D63 !important; text-align: left !important; padding-bottom: 0 !important; }
.et_pb_text .bhma-infos .bhma-info__feld h4 { font-size: 14px !important; line-height: 1.4 !important; font-weight: 700 !important; padding-bottom: 0 !important; }
.et_pb_text .bhma-termine + p:empty, .et_pb_text p:empty:has(+ .bhma-infos) { display: none; }
@media (max-width: 640px) {
	.et_pb_text .bhma-termine h3.bhma-jahr__titel, .et_pb_text .bhma-infos h3.bhma-info__titel { font-size: 28px !important; }
}

/* Flyer-Vorschau so hoch wie der Text (Breite rechnet ein kleines Skript aus, 148:210) */
.bhma-infos .bhma-info__inner { flex-wrap: nowrap; align-items: flex-start; gap: 40px; }
.bhma-infos .bhma-info__text { flex: 1 1 0; min-width: 0; }
.bhma-infos .bhma-info__flyerbox { flex: 0 0 auto; width: 340px; max-width: none; margin: 0; }
.bhma-infos .bhma-info__flyerbox a { display: block; height: 100%; }
.bhma-infos .bhma-info__flyer { width: 100%; height: 100%; aspect-ratio: 148 / 210; object-fit: contain; object-position: top center; }
/* kompakterer Text neben dem Flyer */
.bhma-infos .bhma-info__datum { margin: 0 0 20px; font-size: 18px; }
.bhma-infos .bhma-info__grid { gap: 18px 28px; }
.bhma-infos .bhma-info__feld p { font-size: 14px; line-height: 1.5; }
.et_pb_text .bhma-infos .bhma-info__feld h4 { margin-bottom: 4px !important; }
.bhma-infos .bhma-info__buttons { margin-top: 24px; gap: 10px; }
.bhma-infos .bhma-btn { min-height: 44px; padding: 0 16px; font-size: 14px; }
@media (max-width: 900px) {
	.bhma-infos .bhma-info__inner { flex-wrap: wrap; }
	.bhma-infos .bhma-info__text { flex-basis: 100%; }
	.bhma-infos .bhma-info__flyerbox { width: min(340px, 100%); max-width: 100%; height: auto; }
}
