/* Život hvězdy – Image slider shortcode */

.zh-slider {
	--zh-slider-radius: 0;
	--zh-slider-dot: rgba(232, 67, 147, 0.35);
	--zh-slider-dot-active: #e84393;
	--zh-slider-shadow: none;

	position: relative;
	width: 100%;
	max-width: 100%;
	border-radius: var(--zh-slider-radius);
	overflow: hidden;
	box-shadow: var(--zh-slider-shadow);
	isolation: isolate;
	line-height: 0;
}

.zh-slider--rounded {
	--zh-slider-radius: 20px;
	--zh-slider-shadow: 0 12px 40px rgba(45, 45, 95, 0.14);
}

.zh-slider--fullwidth {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.zh-slider__track {
	position: relative;
	width: 100%;
	overflow: hidden;
	transition: height 0.45s ease;
}

.zh-slider__slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.65s ease, visibility 0.65s ease;
	z-index: 1;
}

.zh-slider__slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 2;
}

.zh-slider__media {
	width: 100%;
	height: 100%;
}

.zh-slider__link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.zh-slider__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	user-select: none;
	-webkit-user-drag: none;
}

/* Pevný box (height / ratio) */
.zh-slider--fixed-ratio .zh-slider__track,
.zh-slider--fixed-height .zh-slider__track {
	transition: none;
}

.zh-slider--fixed-ratio .zh-slider__track {
	aspect-ratio: var(--zh-slider-ratio, 21 / 9);
	height: auto;
}

.zh-slider--fixed-height .zh-slider__track {
	height: var(--zh-slider-height);
}

.zh-slider--fixed-ratio .zh-slider__slide,
.zh-slider--fixed-height .zh-slider__slide {
	inset: 0;
}

.zh-slider--fixed-ratio .zh-slider__media,
.zh-slider--fixed-height .zh-slider__media {
	position: absolute;
	inset: 0;
}

.zh-slider--fixed-ratio .zh-slider__img,
.zh-slider--fixed-height .zh-slider__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center;
}

.zh-slider--fit-cover.zh-slider--fixed-ratio .zh-slider__img,
.zh-slider--fit-cover.zh-slider--fixed-height .zh-slider__img {
	object-fit: cover;
}

/* Max. výška – celá fotka, bez zvětšení a bez ořezu */
.zh-slider--max-height .zh-slider__track {
	height: auto;
	max-height: none;
	transition: height 0.45s ease;
}

.zh-slider--max-height .zh-slider__slide {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	inset: auto;
	top: 0;
	left: 0;
	width: 100%;
}

.zh-slider--max-height .zh-slider__media {
	position: static;
	width: auto;
	max-width: 100%;
	height: auto;
}

.zh-slider--max-height .zh-slider__link {
	display: block;
	width: auto;
	height: auto;
}

.zh-slider--max-height .zh-slider__img {
	position: static;
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: var(--zh-slider-max-height);
	margin: 0 auto;
}

/* Dots */
.zh-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 16px;
	pointer-events: none;
	line-height: 1;
}

.zh-slider__dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: var(--zh-slider-dot);
	cursor: pointer;
	pointer-events: auto;
	transition: width 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.zh-slider__dot:hover {
	background: rgba(151, 112, 233, 0.75);
	transform: scale(1.1);
}

.zh-slider__dot.is-active {
	width: 24px;
	background: var(--zh-slider-dot-active);
}

.zh-slider__dot:focus-visible {
	outline: 2px solid #e84393;
	outline-offset: 2px;
}

/* Arrows (optional) */
.zh-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #2d2d5f;
	cursor: pointer;
	transform: translateY(-50%);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.2s ease, background 0.2s ease;
	line-height: 1;
}

.zh-slider:hover .zh-slider__arrow,
.zh-slider:focus-within .zh-slider__arrow {
	opacity: 1;
}

.zh-slider__arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.05);
}

.zh-slider__arrow--prev {
	left: 14px;
}

.zh-slider__arrow--next {
	right: 14px;
}

.zh-slider__arrow:focus-visible {
	outline: 2px solid #e84393;
	outline-offset: 2px;
	opacity: 1;
}

@media (max-width: 768px) {
	.zh-slider--rounded {
		--zh-slider-radius: 16px;
	}

	.zh-slider__dots {
		bottom: 12px;
		gap: 6px;
	}

	.zh-slider__arrow {
		width: 38px;
		height: 38px;
		opacity: 1;
	}

	/* Max-height slider — celá fotka přes šířku, bez ořezu (výšku drží JS) */
	.zh-slider--max-height .zh-slider__track {
		max-height: none !important;
	}

	.zh-slider--max-height .zh-slider__slide {
		display: block !important;
		top: 0 !important;
		left: 0 !important;
		width: 100% !important;
	}

	.zh-slider--max-height .zh-slider__media,
	.zh-slider--max-height .zh-slider__link {
		display: block !important;
		width: 100% !important;
		height: auto !important;
		max-width: 100% !important;
	}

	.zh-slider--max-height .zh-slider__img {
		display: block !important;
		position: static !important;
		width: 100% !important;
		height: auto !important;
		max-width: 100% !important;
		max-height: none !important;
		object-fit: contain !important;
		margin: 0 auto !important;
	}
}

@media (max-width: 640px) {
	.zh-slider--rounded {
		--zh-slider-radius: 16px;
	}

	.zh-slider__dots {
		bottom: 12px;
		gap: 6px;
	}

	.zh-slider__dot {
		width: 7px;
		height: 7px;
	}

	.zh-slider__dot.is-active {
		width: 20px;
	}

	.zh-slider__arrow {
		width: 36px;
		height: 36px;
		opacity: 1;
	}

	.zh-slider__arrow--prev {
		left: 10px;
	}

	.zh-slider__arrow--next {
		right: 10px;
	}
}

@media (max-width: 480px) {
	.zh-slider--fullwidth {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}
