/* CMI Post Slider – fade slideshow (replacement for "Advanced post slider" template three). */
.cmi-ps {
	position: relative;
	box-sizing: border-box;
	margin-bottom: 50px;
	background: var(--cmi-ps-bg, #fff);
	border: var(--cmi-ps-border, 1px solid #444);
	box-shadow: var(--cmi-ps-shadow, 0 1px 4px #000);
}
.cmi-ps *, .cmi-ps *::before, .cmi-ps *::after { box-sizing: border-box; }

/* Slides are stacked in one grid cell so the slider takes the height of the tallest slide. */
.cmi-ps-track { display: grid; }
.cmi-ps-slide {
	grid-area: 1 / 1;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0 1.2em;
	padding: 0.8vw;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--cmi-ps-speed, 1000ms) linear, visibility 0s linear var(--cmi-ps-speed, 1000ms);
}
.cmi-ps-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity var(--cmi-ps-speed, 1000ms) linear, visibility 0s;
}
.cmi-ps-thumb { flex: 0 0 auto; max-width: 100%; }
.cmi-ps-thumb img { display: block; max-width: 100%; height: auto; }
.cmi-ps-text { flex: 1 1 260px; min-width: 0; color: var(--cmi-ps-text, #444); font-size: 14px; line-height: 1.45; }
.cmi-ps-title { margin: 5px 0 10px; font-size: 20px; line-height: 1.2; color: var(--cmi-ps-title, #565656); }
.cmi-ps-title a { color: inherit; text-decoration: none; }
.cmi-ps-title a:hover, .cmi-ps-title a:focus { color: var(--cmi-ps-title-hover, #000); }
.cmi-ps-excerpt { margin: 0; }

/* Previous / next */
.cmi-ps-prev, .cmi-ps-next {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 26px;
	line-height: 30px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s;
}
.cmi-ps-prev { left: 10px; }
.cmi-ps-next { right: 10px; }
.cmi-ps:hover .cmi-ps-prev, .cmi-ps:hover .cmi-ps-next,
.cmi-ps-prev:focus-visible, .cmi-ps-next:focus-visible { opacity: 1; }

/* Bullets + play/pause, under the slider like the old bxSlider pager */
.cmi-ps-nav {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -35px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
}
.cmi-ps-pager { display: flex; gap: 6px; }
.cmi-ps-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background: #666;
	cursor: pointer;
}
.cmi-ps-dot.is-active, .cmi-ps-dot:hover { background: #000; }
.cmi-ps-toggle {
	position: relative;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.cmi-ps-toggle::before, .cmi-ps-toggle::after {
	content: "";
	position: absolute;
	top: 4px;
	width: 3px;
	height: 10px;
	background: #666;
}
.cmi-ps-toggle::before { left: 5px; }
.cmi-ps-toggle::after { left: 10px; }
.cmi-ps.is-paused .cmi-ps-toggle::before {
	left: 6px;
	width: 0;
	height: 0;
	background: transparent;
	border-style: solid;
	border-width: 5px 0 5px 9px;
	border-color: transparent transparent transparent #666;
}
.cmi-ps.is-paused .cmi-ps-toggle::after { display: none; }
.cmi-ps button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

@media (max-width: 639px) {
	.cmi-ps-slide { padding: 10px; }
	.cmi-ps-thumb { flex-basis: 100%; }
	.cmi-ps-thumb img { margin: 0 auto 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.cmi-ps-slide, .cmi-ps-slide.is-active { transition: none; }
}
