/* =============================================================
   M39 – History  |  Year-Card-Slider mit Progress-Bar
   ============================================================= */

section.m39_history {
	position: relative;
}

/* ---- Cards Wrapper: Cards links, Image-Stage rechts ---- */
.m39_cards_wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 80px;
}

.m39_cards_wrapper > .m39_cards {
	flex: 0 0 42%;
	max-width: 42%;
	min-width: 0;
	padding-top: 62px;
	overflow: hidden;
}

.m39_cards_wrapper > .m39_image_stage {
	flex: 1;
	min-width: 0;
}

/* ---- Slider Nav: Dots + Arrows in eigener Row, Standard-Container-Breite ---- */
.m39_slider_nav {
	display: flex;
	align-items: center;
	gap: 3rem;
	margin-top: 68px;
}

.m39_slider_nav .mM_dots_container {
	flex: 1;
	min-width: 0;
}

.m39_slider_nav .m39_arrows {
	flex-shrink: 0;
}

/* ---- Year (Slot-Maschine, im Card) ---- */
.m39_year_container {
	margin-bottom: 31px;
}

.m39_year_container h2.h1 {
	margin: 0;
	line-height: 1;
	white-space: nowrap;
}

.m39_year_slot {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	height: 1em;
	line-height: 1;
}

.m39_year_reel {
	display: flex;
	flex-direction: column;
	will-change: transform;
}

.m39_year_char {
	display: block;
	height: 1em;
	line-height: 1;
}

.m39_cards .slick-list {
	overflow: visible;
}

.m39_cards .slick-track {
	display: flex;
}

.m39_cards .slick-slide {
	height: auto;
}

/* ---- Single Card (nur noch Text) ---- */
.m39_card {
	width: 100%;
}

.m39_card_content {
	display: flex;
	flex-direction: column;
}

.m39_titel_container {
	margin-bottom: 1.5rem;
}

.m39_titel_container h4 {
	margin: 0;
}

.m39_text_container {
	padding-left: 34px;
	position: relative;
}

.m39_text_container::before {
	content: '';
	width: 10px;
	height: calc(100% - 11px);
	background: #cbc9dc;
	position: absolute;
	top: 2px;
	left: 0;
}

.m39_text_container p {
	margin: 0;
}

.m39_text_container p + p {
	margin-top: 1rem;
}

/* ---- Image Stage (geschwister von .m39_cards, eigenstaendiger Crossfade) ---- */
.m39_image_stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	margin-top: -96px;
	overflow: hidden;
	background-color: #f6f6f6;
}

.m39_image_stage--empty {
	background-color: #f6f6f6;
}

.m39_stage_img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 1;
	transition: opacity 700ms ease;
}

.m39_stage_img:not(.is-active) {
	opacity: 0;
}

/* ---- Progress (mM_dots wird vom Parent-Theme appended) ---- */
section.m39_history .mM_dots {
	position: relative;
	width: 100%;
	height: 8.5px;
	display: flex;
	align-items: center;
}

section.m39_history .mM_dots::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background-color: #c9c9ca;
	pointer-events: none;
}

section.m39_history .mM_dots .slick-dots {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0;
	width: 100%;
	height: 8.5px;
	margin: 0;
	padding: 0;
	list-style: none;
	position: relative;
	bottom: auto;
	z-index: 1;
}

section.m39_history .mM_dots .slick-dots li {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	cursor: pointer;
	line-height: 0;
}

section.m39_history .mM_dots .slick-dots li,
section.m39_history .mM_dots .slick-dots li *,
section.m39_history .mM_dots .mM_dot {
	outline: none;
}

section.m39_history .mM_dots .slick-dots li:focus,
section.m39_history .mM_dots .slick-dots li:focus-visible,
section.m39_history .mM_dots .slick-dots li *:focus {
	outline: none;
}

section.m39_history .mM_dots .mM_dot {
	position: relative;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: #c9c9ca;
	transition: all .3s ease;
}

section.m39_history .mM_dots li:hover .mM_dot {
	background-color: #40437d;
}

section.m39_history .mM_dots li.slick-active .mM_dot {
	background-color: #40437d;
}

section.m39_history .mM_dots li.slick-active .mM_dot::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 18px;
	height: 18px;
	border: 1px solid #40437d;
	border-radius: 50%;
	pointer-events: none;
}

/* ---- Pfeil-Buttons ---- */
.m39_arrows {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

.m39_prev,
.m39_next {
	width: 4.5rem;
	height: 4.5rem;
	background-color: #40437d;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background-color .3s, opacity .3s;
}

.m39_prev {
	background-color: #f0f0f0;
}

.m39_prev svg {
	width: 1.25rem;
	height: auto;
	fill: #40437d;
	transform: rotate(180deg);
	transition: fill .3s;
}

.m39_next svg {
	width: 1.25rem;
	height: auto;
	fill: #fff;
	transition: fill .3s;
}

.m39_prev:hover {
	background-color: #40437d;
}

.m39_prev:hover svg {
	fill: #fff;
}

.m39_next:hover {
	background-color: #f0f0f0;
}

.m39_next:hover svg {
	fill: #40437d;
}

.m39_prev.m39_disabled,
.m39_next.m39_disabled {
	opacity: .35;
	pointer-events: none;
}

/* ============================================================
   Responsive
   ============================================================ */

@media screen and (max-width: 1399px) {
	.m39_cards_wrapper {
		gap: 60px;
	}
}

@media screen and (max-width: 1199px) {
	section.m39_history {
		padding-top: 137px;
		overflow: hidden;
	}

	.m39_cards_wrapper {
		flex-direction: column;
		align-items: stretch;
		gap: 2rem;
	}

	.m39_cards_wrapper > .m39_cards,
	.m39_cards_wrapper > .m39_image_stage {
		flex: none;
		max-width: 100%;
		width: 100%;
	}

	.m39_cards_wrapper > .m39_cards {
		padding-top: 0;
	}

	.m39_image_stage {
		order: -1;
		margin-top: 0;
		aspect-ratio: 16 / 9;
	}

	.m39_year_container {
		margin-bottom: 3rem;
	}

	.m39_slider_nav {
		gap: 1.5rem;
		margin-top: 2rem;
	}
}

@media screen and (max-width: 991px) {
	section.m39_history {
		padding-top: 75px;
	}

	.m39_prev,
	.m39_next {
		width: 52px;
		height: 52px;
	}
}

@media screen and (max-width: 767px) {
	.m39_titel_container {
		margin-bottom: 1rem;
	}

	.m39_prev svg,
	.m39_next svg {
		width: 1rem;
	}
}

@media screen and (max-width: 575px) {
	section.m39_history {
		padding-top: 35px;
	}

	.m39_year_container {
		margin-bottom: 22px;
	}

	.m39_text_container {
		padding-left: 0;
	}

	.m39_text_container::before {
		display: none;
	}

	.m39_slider_nav {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 1.5rem;
	}

	.m39_slider_nav .m39_arrows {
		align-self: flex-end;
	}
}
