.cis-slider {
	position: relative;
	width: var(--cis-width, 100%);
	max-width: 100%;
	height: var(--cis-h, 500px);
	margin: 0 auto 1.5em;
	overflow: hidden;
	box-sizing: border-box;
	border: var(--cis-bw, 0px) var(--cis-bs, solid) var(--cis-bc, #fff);
	background: var(--cis-bg, #000);
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	outline-offset: 2px;
	min-width: 0;
}
/* Custom size with a px width: shrink height together with width so the
   slider keeps its shape inside narrow containers / tablets. */
.cis-slider.cis-scale:not(.cis-auto) {
	height: auto;
	aspect-ratio: var(--cis-car, 16 / 9);
}
/* Fit-container mode: take the container's width; fill its height when it has
   one, otherwise follow the shape of the (first) image. */
.cis-slider.cis-auto {
	width: 100%;
	height: 100%;
	min-height: 0;
	margin-bottom: 0;
	aspect-ratio: var(--cis-ar, 16 / 9);
}
/* Shape mode (ratio="16/9"): width follows the container, height follows the
   shape on every screen, so the slider always fits. */
.cis-slider.cis-ratio:not(.cis-auto) {
	height: auto;
	aspect-ratio: var(--cis-rd, 16 / 9);
}
.cis-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--cis-speed, 700ms) ease, transform var(--cis-speed, 700ms) ease, visibility 0s linear var(--cis-speed, 700ms);
}
.cis-slide.cis-active {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	z-index: 1;
	transition: opacity var(--cis-speed, 700ms) ease, transform var(--cis-speed, 700ms) ease, visibility 0s linear 0s;
}

/* ---- Transition effects ------------------------------------------------
   .cis-after  = waiting to enter from the right / bottom
   .cis-before = already left towards the left / top */
.cis-fx-slide .cis-slide { opacity: 1; transform: translateX(100%); }
.cis-fx-slide .cis-slide.cis-before { transform: translateX(-100%); }

.cis-fx-slideup .cis-slide { opacity: 1; transform: translateY(100%); }
.cis-fx-slideup .cis-slide.cis-before { transform: translateY(-100%); }

.cis-fx-zoom .cis-slide { transform: scale(1.25); }
.cis-fx-zoom .cis-slide.cis-before { transform: scale(.8); }

.cis-fx-flip { perspective: 1400px; }
.cis-fx-flip .cis-slide { transform: rotateY(90deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cis-fx-flip .cis-slide.cis-before { transform: rotateY(-90deg); }

.cis-fx-none .cis-slide,
.cis-fx-none .cis-slide.cis-active { transition: none; }

.cis-slider .cis-img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: var(--cis-fit, cover);
	filter: brightness(var(--cis-brightness, 1));
	opacity: var(--cis-opacity, 1) !important;
	-webkit-user-drag: none;
	pointer-events: none;
}
.cis-title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 48px 24px 38px;
	color: #fff;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
	background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0));
}
.cis-pos-left .cis-title { text-align: left; }
.cis-pos-right .cis-title { text-align: right; }
.cis-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -22px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, .45);
	cursor: pointer;
	transition: background .2s;
}
.cis-arrow:hover,
.cis-arrow:focus-visible { background: rgba(0, 0, 0, .75); }
.cis-prev { left: 12px; }
.cis-next { right: 12px; }
.cis-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 4px;
}
.cis-dot {
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	position: relative;
}
.cis-dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .5);
	transition: background .2s, transform .2s;
}
.cis-dot.cis-active::before { background: #fff; transform: scale(1.25); }
.cis-notice { padding: 10px 14px; background: #fff3cd; border-left: 4px solid #f0b429; }

/* Tablet: 768px - 1024px (also applies below, unless mobile overrides) */
@media (max-width: 1024px) {
	.cis-slider:not(.cis-auto) { width: var(--cis-wt, 100%); height: var(--cis-ht, 400px); }
	.cis-slider.cis-scale:not(.cis-auto) { height: var(--cis-ht, 400px); aspect-ratio: auto; }
	.cis-slider.cis-tscale:not(.cis-auto) { height: auto; aspect-ratio: var(--cis-tcar, 16 / 9); }
	.cis-slider.cis-ratio:not(.cis-auto) { height: var(--cis-ht, 400px); aspect-ratio: auto; }
	.cis-slider.cis-tratio:not(.cis-auto) { height: auto; aspect-ratio: var(--cis-rt, 16 / 9); }
}

/* Mobile: 767px and below */
@media (max-width: 767px) {
	.cis-slider:not(.cis-auto) { width: var(--cis-wm, 100%); height: var(--cis-hm, 260px); }
	.cis-slider.cis-scale:not(.cis-auto),
	.cis-slider.cis-tscale:not(.cis-auto) { height: var(--cis-hm, 260px); aspect-ratio: auto; }
	.cis-slider.cis-mscale:not(.cis-auto) { height: auto; aspect-ratio: var(--cis-mcar, 16 / 9); }
	.cis-slider.cis-ratio:not(.cis-auto),
	.cis-slider.cis-tratio:not(.cis-auto) { height: var(--cis-hm, 260px); aspect-ratio: auto; }
	.cis-slider.cis-mratio:not(.cis-auto) { height: auto; aspect-ratio: var(--cis-rm, 16 / 9); }
	.cis-dots { bottom: 4px; }
	.cis-dot { width: 18px; height: 18px; }
	.cis-title { padding: 28px 14px 34px; font-size: .95rem; }
	.cis-arrow { width: 34px; height: 34px; margin-top: -17px; }
	.cis-arrow svg { width: 18px; height: 18px; }
	.cis-prev { left: 6px; }
	.cis-next { right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.cis-slide, .cis-slide.cis-active { transition: none; }
}
