/**
 * Modula Carousel Styler — styles
 */

/* Reset linków wewnątrz przetworzonej galerii */
.modula-gallery.mcs-active a {
	cursor: pointer;
	text-decoration: none;
}

.mcs-caption {
	font-size: 0.85rem;
	color: #fff;
	text-align: center;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.55);
}

.mcs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(20, 20, 20, 0.55);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.mcs-arrow:hover {
	background: rgba(20, 20, 20, 0.85);
	transform: translateY(-50%) scale(1.08);
}

.mcs-arrow-prev { left: 12px; }
.mcs-arrow-next { right: 12px; }

/* ============================================================
 * STYL 1: Classic
 * ============================================================ */
.mcs-classic-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 8px;
	background: #111;
}

.mcs-classic-track {
	display: flex;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mcs-classic-slide {
	flex: 0 0 100%;
	position: relative;
}

.mcs-classic-slide img {
	width: 100%;
	height: auto;
	max-height: 600px;
	object-fit: cover;
	display: block;
}

.mcs-classic-slide .mcs-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

/* Pasek miniaturek pod dużym zdjęciem w stylu "classic" */
.mcs-thumbs-strip {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	padding: 4px 2px;
	scrollbar-width: thin;
}

.mcs-thumb {
	flex: 0 0 auto;
	width: 72px;
	height: 56px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: #1a1a1a;
	opacity: 0.65;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.mcs-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mcs-thumb:hover {
	opacity: 0.9;
}

.mcs-thumb.is-active {
	opacity: 1;
	border-color: #fff;
}

/* ============================================================
 * STYL 1b: Classic Multi — N zdjęć naraz w rzędzie
 * ============================================================ */
.mcs-multi-wrap {
	position: relative;
	width: 100%;
}

.mcs-multi-viewport {
	overflow: hidden;
	border-radius: 8px;
}

.mcs-multi-track {
	display: flex;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mcs-multi-slide {
	flex: 0 0 calc(100% / var(--mcs-per-view, 3));
	position: relative;
	padding: 0 6px;
	box-sizing: border-box;
}

.mcs-multi-slide img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	display: block;
	border-radius: 6px;
}

.mcs-multi-slide .mcs-caption {
	position: absolute;
	bottom: 6px;
	left: 6px;
	right: 6px;
	border-radius: 0 0 6px 6px;
}

/* ============================================================
 * STYL 2: Coverflow
 * ============================================================ */
.mcs-coverflow-wrap {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
	perspective: 1200px;
	background: #ffffff;
	border-radius: 8px;
}

.mcs-coverflow-stage {
	position: relative;
	width: 100%;
	height: 100%;
}

.mcs-coverflow-card {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60%;
	max-width: 420px;
	height: 85%;
	transition: transform 0.45s ease, opacity 0.45s ease;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	background: #f0f0f0;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
	/* Bazowy stan: wycentrowana karta. JS dopisuje translateX/scale/rotateY
	   ZA tym centrowaniem (patrz --mcs-extra w JS), nigdy go nie zastępując. */
	transform: translate(-50%, -50%) var(--mcs-extra, translateX(0) scale(1) rotateY(0deg));
}

.mcs-coverflow-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mcs-coverflow-card .mcs-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

.mcs-coverflow-card.is-active {
	cursor: default;
}

/* ============================================================
 * STYL 3: Lightbox z miniaturkami
 * ============================================================ */
.mcs-lightbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.mcs-lightbox-thumb {
	border: none;
	padding: 0;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #1a1a1a;
}

.mcs-lightbox-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.mcs-lightbox-thumb:hover img {
	transform: scale(1.08);
}

.mcs-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
}

.mcs-lightbox-overlay.is-open {
	display: flex;
}

.mcs-lightbox-content {
	max-width: 90vw;
	max-height: 88vh;
	text-align: center;
}

.mcs-lightbox-content img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	border-radius: 4px;
}

.mcs-lightbox-close {
	position: absolute;
	top: 18px;
	right: 24px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 2.2rem;
	cursor: pointer;
	z-index: 20;
}

body.mcs-lightbox-locked {
	overflow: hidden;
}

/* ============================================================
 * STYL 4: Grid hover-zoom
 * ============================================================ */
.mcs-gridzoom {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}

.mcs-gridzoom-cell {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
}

.mcs-gridzoom-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.mcs-gridzoom-cell:hover img {
	transform: scale(1.12);
}

.mcs-gridzoom-cell .mcs-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mcs-gridzoom-cell:hover .mcs-caption {
	opacity: 1;
}

/* ============================================================
 * Responsywność
 * ============================================================ */
@media (max-width: 600px) {
	.mcs-coverflow-wrap {
		height: 280px;
	}
	.mcs-coverflow-card {
		width: 78%;
		max-width: 280px;
	}
	.mcs-arrow {
		width: 36px;
		height: 36px;
		font-size: 1.3rem;
	}
	.mcs-multi-slide img {
		height: 200px;
	}
	.mcs-thumb {
		width: 56px;
		height: 44px;
	}
}
