/* ==========================================================================
   Carousel Invelo — frontend styles
   ========================================================================== */

.civ-carousel-wrapper {
	position: relative !important;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.civ-carousel-wrapper * {
	box-sizing: border-box;
}

.civ-carousel-wrapper img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.civ-caption {
	display: block;
	margin-top: 8px;
	font-size: 14px;
	text-align: center;
	color: inherit;
}

/* -------------------------------------------------------------------- */
/* TITLE                                                                 */
/* -------------------------------------------------------------------- */

.civ-title {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	margin: 0;
	z-index: 6;
	pointer-events: none;
}

.civ-title-overlay .civ-title {
	position: absolute !important;
	top: 20px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.civ-title-overlay.civ-title-pos-left .civ-title {
	left: 20px;
	text-align: left;
}

.civ-title-overlay.civ-title-pos-center .civ-title {
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
}

.civ-title-overlay.civ-title-pos-right .civ-title {
	right: 20px;
	text-align: right;
}

.civ-title-block .civ-title {
	position: relative;
	display: block;
	margin-bottom: 20px;
	text-shadow: none;
}

.civ-title-block.civ-title-pos-left .civ-title {
	text-align: left;
}

.civ-title-block.civ-title-pos-center .civ-title {
	text-align: center;
}

.civ-title-block.civ-title-pos-right .civ-title {
	text-align: right;
}

/* -------------------------------------------------------------------- */
/* DRAG BUTTON — centered draggable handle, works in both modes         */
/* -------------------------------------------------------------------- */

.civ-drag {
	position: absolute !important;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: linear-gradient(135deg, #f4a261, #e76f51);
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
	margin: 0;
}

/* "On Hover Only" mode — invisible and out of the way until hovered,
   then fades in and gently follows the cursor. Nothing takes up space. */
.civ-drag-mode-hover .civ-drag {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.12s ease-out;
}

.civ-drag-mode-hover.civ-drag-active .civ-drag {
	opacity: 1;
	pointer-events: auto;
}

/* "Always Visible" mode — stays centered. */
.civ-drag-mode-always .civ-drag {
	opacity: 1;
	transition: transform 0.15s ease;
}

.civ-drag:active,
.civ-drag.civ-grabbing {
	cursor: grabbing;
}

.civ-drag-label {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	pointer-events: none;
}

.civ-drag-prev,
.civ-drag-next {
	font-size: 13px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 4px;
}

.civ-carousel-wrapper.civ-has-drag .civ-slider-viewport,
.civ-carousel-wrapper.civ-has-drag .civ-marquee-viewport {
	cursor: grab;
}

.civ-carousel-wrapper.civ-has-drag.civ-dragging .civ-slider-viewport,
.civ-carousel-wrapper.civ-has-drag.civ-dragging .civ-marquee-viewport {
	cursor: grabbing;
}

/* -------------------------------------------------------------------- */
/* SLIDER MODE                                                          */
/* -------------------------------------------------------------------- */

.civ-mode-slider .civ-slider-viewport {
	overflow: hidden;
	width: 100%;
	touch-action: pan-y;
}

.civ-mode-slider .civ-slider-track {
	display: flex;
	gap: 16px;
	will-change: transform;
	transition-property: transform;
	transition-timing-function: ease;
}

.civ-mode-slider .civ-slider-track.civ-no-transition {
	transition-duration: 0ms !important;
}

.civ-mode-slider .civ-slide {
	flex: 0 0 auto;
	min-width: 0;
}

.civ-mode-slider .civ-slide a {
	display: block;
}

/* Arrows */
.civ-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background-color: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	padding: 0;
}

.civ-arrow:hover {
	background-color: rgba(0, 0, 0, 0.75);
}

.civ-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.civ-arrow-prev {
	left: 10px;
}

.civ-arrow-next {
	right: 10px;
}

/* Dots */
.civ-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.civ-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #c4c4c4;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.civ-dot.civ-active {
	background-color: #2c3e50;
	transform: scale(1.2);
}

/* -------------------------------------------------------------------- */
/* MARQUEE MODE — smooth continuous scroll                              */
/* -------------------------------------------------------------------- */

.civ-mode-marquee .civ-marquee-viewport {
	overflow: hidden;
	width: 100%;
	touch-action: pan-y;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.civ-mode-marquee .civ-marquee-track {
	display: flex;
	gap: 20px;
	width: max-content;
	animation: civ-marquee-left linear infinite;
}

.civ-mode-marquee[data-direction="right"] .civ-marquee-track {
	animation-name: civ-marquee-right;
}

.civ-mode-marquee .civ-marquee-item {
	flex: 0 0 auto;
}

.civ-mode-marquee .civ-marquee-item a {
	display: block;
}

.civ-mode-marquee.civ-paused .civ-marquee-track {
	animation-play-state: paused;
}

@keyframes civ-marquee-left {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@keyframes civ-marquee-right {
	from {
		transform: translateX(-50%);
	}
	to {
		transform: translateX(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.civ-mode-marquee .civ-marquee-track {
		animation: none;
	}
}
