/* ===== SPELFORM RELATED CONTENT SECTIONS ===== */

.spelform-related-section {
	width: 100%;
	padding: 4rem 0;
}

.spelform-related-section.bg-white {
	background: #ffffff;
}

.spelform-related-section.bg-gray {
	background: #f4f4f4;
}

.spelform-ovningar-section,
.spelform-traningspass-section {
	margin-bottom: 0;
	position: relative;
}

/* Section Headings */
.spelform-ovningar-section h2,
.spelform-traningspass-section h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #1a1a1a;
}

/* Section Description */
.spelform-ovningar-section p,
.spelform-traningspass-section p {
	font-size: 1.125rem;
	line-height: 1.7;
	margin-bottom: 2.5rem;
	color: #555;
	max-width: 900px;
}

/* ===== CAROUSEL WRAPPER ===== */

.spelform-carousel-wrapper {
	position: relative;
	max-width: 1410px;
	margin: 0 auto;
}

/* ===== CAROUSEL CONTAINER ===== */

.spelform-carousel {
	display: flex;
	gap: 1.75rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
	padding: 8px 8px 20px 8px; /* Add padding for card shadows and prevent edge clipping */
}

.spelform-carousel::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

/* ===== ENHANCED CARD STYLES ===== */

.ledarportal-carousel {
	flex: 0 0 calc(33.333% - 1.2rem);
	min-width: 320px;
}

/* Card Image Container */
.ledarportal-car-img {
	position: relative;
}

.ledarportal-car-img > a > img,
.ledarportal-car-img > img {
	height: 280px !important;
	width: 100% !important;
	object-fit: cover !important;
	border-radius: 8px;
}

/* Source logo in carousel - keep it small and positioned */
.ledarportal-car-img .ledarportal-card-source-logo {
	position: absolute;
	top: 12px;
	right: 12px;
	max-width: 50px;
	max-height: 50px;
	width: auto !important;
	height: auto !important;
	z-index: 10;
}

.ledarportal-car-img .ledarportal-card-source-logo img {
	width: 100% !important;
	height: auto !important;
	max-width: 50px !important;
	max-height: 50px !important;
	object-fit: contain !important;
	border-radius: 0 !important;
}

/* Card Meta (Title) */
.ledarportal-car-meta {
	padding: 0;
}

.ledarportal-car-meta h3 {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
	padding-top: 1.25rem;
	line-height: 1.5;
}

.ledarportal-car-meta h3 a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.2s ease;
	display: block;
}

.ledarportal-car-meta h3 a:hover {
	color: var(--ast-global-color-2, #29A166);
}

/* ===== CAROUSEL ARROWS ===== */

.carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	background: #1d1d1d;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10;
	padding: 0;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:hover {
	background: #2d2d2d;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.carousel-arrow:active {
	transform: translateY(-50%) scale(0.95);
}

.carousel-arrow .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
	color: #ffffff;
	transition: color 0.3s ease;
}

.carousel-arrow:hover .dashicons {
	color: #ffffff;
}

.carousel-prev {
	left: -70px;
}

.carousel-next {
	right: -70px;
}

/* Disabled State */
.carousel-arrow:disabled {
	opacity: 0.25;
	cursor: not-allowed;
	background: #1d1d1d;
	box-shadow: none;
}

.carousel-arrow:disabled:hover {
	background: #1d1d1d;
	transform: translateY(-50%);
	box-shadow: none;
}

.carousel-arrow:disabled:hover .dashicons {
	color: #ffffff;
}

.carousel-arrow:disabled .dashicons {
	color: #ffffff;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Larger tablets */
@media (max-width: 1024px) {
	.ledarportal-carousel {
		flex: 0 0 calc(50% - 0.9rem);
		min-width: 300px;
	}

	.ledarportal-car-img img {
		height: 260px !important;
	}
}

/* Move arrows inside on narrower screens */
@media (max-width: 1600px) {
	.carousel-prev {
		left: 10px;
	}

	.carousel-next {
		right: 10px;
	}
}

/* Mobile devices - App-style experience */
@media (max-width: 768px) {
	.spelform-related-section {
		padding: 2.5rem 0;
	}

	.spelform-ovningar-section h2,
	.spelform-traningspass-section h2 {
		font-size: 1.5rem;
		margin-bottom: 0.875rem;
	}

	.spelform-ovningar-section p,
	.spelform-traningspass-section p {
		font-size: 1rem;
		line-height: 1.65;
		margin-bottom: 2rem;
	}

	/* Full-width cards on mobile */
	.ledarportal-carousel {
		flex: 0 0 100%;
		min-width: 280px;
	}

	.ledarportal-car-img img {
		height: 260px !important;
		border-radius: 12px;
	}

	.ledarportal-car-meta h3 {
		font-size: 1.125rem;
		padding-top: 1rem;
	}

	/* Larger, more touchable arrows */
	.carousel-arrow {
		width: 48px;
		height: 48px;
		box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
	}

	.carousel-arrow .dashicons {
		font-size: 24px;
		width: 24px;
		height: 24px;
	}

	.carousel-prev {
		left: 12px;
	}

	.carousel-next {
		right: 12px;
	}

	/* Add scroll snap for smooth swiping */
	.spelform-carousel {
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.ledarportal-carousel {
		scroll-snap-align: start;
	}
}

/* Extra small phones */
@media (max-width: 480px) {
	.spelform-related-section {
		padding: 2rem 0;
	}

	.spelform-ovningar-section h2,
	.spelform-traningspass-section h2 {
		font-size: 1.35rem;
	}

	.spelform-ovningar-section p,
	.spelform-traningspass-section p {
		font-size: 0.95rem;
		line-height: 1.6;
		margin-bottom: 1.75rem;
	}

	.ledarportal-carousel {
		min-width: 260px;
	}

	.ledarportal-car-img img {
		height: 240px !important;
	}

	.ledarportal-car-meta h3 {
		font-size: 1.05rem;
		padding-top: 0.875rem;
	}

	.carousel-arrow {
		width: 44px;
		height: 44px;
	}

	.carousel-prev {
		left: 8px;
	}

	.carousel-next {
		right: 8px;
	}
}
