:root {
	--carousel-height: 360px;
	--carousel-cap-maxw: 1100px;
	--carousel-pad: clamp(16px, 3vw, 32px);
	--carousel-color: #fff;
	--carousel-btn-bg: #e21b1b;
	--carousel-btn-hover: #c01515;
}

@media (max-width: 820px) {
	:root {
		--carousel-height: 220px;
	}
}

.carousel-wrapper {
	overflow: hidden;
}

.carousel-wrapper .swiper {
	width: 100%;
	max-width: 100vw;
	height: var(--carousel-height);
	margin: 0 auto;
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

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

.carousel-slide > a > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.carousel-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.35) 55%,
		rgba(0, 0, 0, 0.55) 100%
	);
	pointer-events: none;
}

.carousel-caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	max-width: var(--carousel-cap-maxw);
	margin-inline: auto;
	padding: var(--carousel-pad);
	display: grid;
	gap: 0.5rem;
	color: var(--carousel-color);
}

.carousel-caption__title {
	font-family: "Montserrat", sans-serif;
	font-size: clamp(1.6rem, 4vw, 3rem);
	margin: 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.carousel-caption__desc {
	font-size: var(--font-size-xs);
	opacity: 1;
	margin: 0;
}

.carousel-caption__btn {
	background: var(--carousel-btn-bg);
	color: #fff;
	padding: 0.7rem 1.1rem;
	border-radius: 4px;
	text-decoration: none;
	display: inline-block;
}

.carousel-caption__btn:hover {
	background: var(--carousel-btn-hover);
}

.carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	z-index: 10;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.carousel-nav--prev {
	left: 14px;
}

.carousel-nav--next {
	right: 14px;
}

.carousel-nav::after {
	content: "";
	width: 32px;
	height: 32px;
	display: block;
	background: no-repeat center / contain
		url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E");
}

.carousel-nav--prev::after {
	transform: scaleX(-1);
}

.carousel-pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	text-align: center;
	z-index: 10;
}

.carousel-pagination .swiper-pagination-bullet {
	width: 9px;
	height: 9px;
	background: rgba(255, 255, 255, 0.75);
	opacity: 1;
}

.carousel-pagination .swiper-pagination-bullet-active {
	background: #fff;
}

/* belt-and-suspenders if Swiper CSS didn't load */
.carousel-wrapper .swiper-wrapper {
	display: flex !important;
	width: 100% !important;
	box-sizing: border-box;
}

.carousel-wrapper .swiper-slide {
	width: 100% !important;
	flex: 0 0 100% !important;
}

html,
body {
	overflow-x: hidden;
}

/* ------------------------------
   Carousel Lightbox (front-end)
------------------------------ */
.carousel-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 99999;
}

.carousel-lightbox.is-open {
	display: flex;
}

.carousel-lightbox__img {
	max-width: min(1100px, 95vw);
	max-height: 90vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.carousel-lightbox__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	font-size: 28px;
	line-height: 44px;
	text-align: center;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.carousel-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* Prevent background scroll while lightbox is open */
html.carousel-lightbox-open,
html.carousel-lightbox-open body {
	overflow: hidden;
}

/* When lightbox is disabled, remove "link" affordance */
.carousel-wrapper[data-carousel-lightbox="0"] .carousel-slide > a {
	cursor: default;
	pointer-events: auto; /* keep clicks so JS can preventDefault */
}

.carousel-wrapper[data-carousel-lightbox="0"] .carousel-slide > a > img {
	cursor: default;
}
