.ydn-carousel {
	position: relative;
	width: 100%;
}

.ydn-track-wrapper {
	position: relative;
	overflow: hidden;
	width: 100%;
	--ydn-visible: 3;
	--ydn-gap: 32px;
}

/* Skjuler den almindelige mus-cursor, når den custom navigations-cursor er aktiv */
.ydn-track-wrapper.ydn-cursor-active,
.ydn-track-wrapper.ydn-cursor-active * {
	cursor: none !important;
}

.ydn-track {
	display: flex;
	gap: var(--ydn-gap);
	transition: transform 0.4s ease;
}

.ydn-item {
	flex: 0 0 calc((100% - (var(--ydn-visible) - 1) * var(--ydn-gap)) / var(--ydn-visible));
	display: flex;
	flex-direction: column;
}

.ydn-image {
	position: relative;
	overflow: hidden;
	height: 280px;
	background-color: #eee;
	margin-bottom: 20px;
}

.ydn-img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	display: block;
	transition: transform 0.35s ease;
}

.ydn-zoom-yes .ydn-item:hover .ydn-img {
	transform: scale(1.06);
}

.ydn-content {
	display: flex;
	flex-direction: column;
}

.ydn-title {
	font-weight: 600;
	font-size: 20px;
	line-height: 1.3;
	color: #1a1a1a;
	margin-bottom: 10px;
}

.ydn-description {
	font-size: 15px;
	line-height: 1.6;
	color: #5b5b5b;
	margin-bottom: 20px;
}

.ydn-button {
	display: inline-block;
	align-self: flex-start;
	background-color: #E8493C;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	padding: 12px 24px;
	border-radius: 4px;
	margin-top: 8px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ydn-button:hover {
	background-color: #C93A2F;
	color: #fff;
}

/* Custom navigations-cursor: en cirkel der følger musen hen over kortene */
.ydn-cursor {
	position: absolute;
	top: 0;
	left: 0;
	width: 64px;
	height: 64px;
	margin-left: -32px;
	margin-top: -32px;
	border-radius: 50%;
	background-color: #E8493C;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	z-index: 10;
	transition: opacity 0.15s ease, transform 0.05s linear;
	will-change: transform;
}

.ydn-cursor.ydn-cursor-visible {
	opacity: 1;
}

.ydn-cursor.ydn-cursor-disabled {
	opacity: 0.35;
}

.ydn-cursor-icon {
	stroke: #fff;
	transition: transform 0.1s ease;
}

/* Peger mod venstre, når man er i venstre halvdel af et kort */
.ydn-cursor.ydn-cursor-prev .ydn-cursor-icon {
	transform: rotate(180deg);
}

/* Skjulte, men funktionelle knapper til tastatur- og skærmlæserbrugere */
.ydn-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 767px) {
	.ydn-track-wrapper {
		--ydn-visible: 1 !important;
	}

	.ydn-cursor {
		display: none;
	}

	/* På mobil er der ingen mus, så cursoren erstattes af rigtige, synlige knapper.
	   Farve, hjørneradius, ikon og størrelse styres via Elementors "Mobil-knapper"-sektion. */
	.ydn-carousel-nav.ydn-sr-only {
		position: absolute !important;
		width: 48px;
		height: 48px;
		clip: auto;
		margin: 0;
		overflow: visible;
		top: 50%;
		transform: translateY(-50%);
		border: none;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 6;
	}

	.ydn-nav-prev.ydn-sr-only {
		left: 10px;
	}

	.ydn-nav-next.ydn-sr-only {
		right: 10px;
	}

	.ydn-carousel-nav.ydn-sr-only:disabled {
		display: none;
	}
}
