/* ---------- Carousel ---------- */
.icg-carousel {
	position: relative;
	overflow: hidden;
	margin: 20px 0;
}
.icg-carousel-viewport {
	overflow: hidden;
	width: 100%;
	transition: height .25s ease;
}
.icg-carousel-track {
	display: flex;
	will-change: transform;
}
.icg-fit-natural .icg-carousel-track {
	align-items: flex-start;
}
.icg-slide {
	flex-shrink: 0;
	position: relative;
}
.icg-slide img {
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	display: block;
	cursor: pointer;
}
.icg-fit-cover .icg-slide img {
	object-fit: cover !important;
}
.icg-fit-contain .icg-slide img {
	object-fit: contain !important;
	background: #111;
}
/* Natural / auto-height: no forced box at all — the frame resizes to
   match each image's real proportions, so nothing is ever cropped
   and no letterbox bars are shown either. !important guards against
   themes/page-builders that apply their own global "img { object-fit:
   cover }" style resets. */
.icg-fit-natural .icg-slide img {
	aspect-ratio: auto !important;
	width: 100% !important;
	height: auto !important;
	object-fit: initial !important;
	background: none !important;
	max-width: 100% !important;
}
.icg-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	padding: 6px 10px;
	font-size: 13px;
}
.icg-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, .45);
	color: #fff;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s;
}
.icg-arrow:hover {
	background: rgba(0, 0, 0, .75);
}
.icg-prev { left: 10px; }
.icg-next { right: 10px; }

.icg-dots {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 5;
}
.icg-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	border: 1px solid rgba(0, 0, 0, .2);
	cursor: pointer;
	padding: 0;
}
.icg-dot.is-active {
	background: #fff;
}

/* ---------- Gallery grid ---------- */
.icg-gallery {
	display: grid;
	grid-template-columns: repeat(var(--icg-columns, 4), 1fr);
	gap: var(--icg-gap, 10px);
	margin: 20px 0;
}
.icg-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1 / 1;
}
.icg-gallery-item img {
	width: 100%;
	height: 100%;
	display: block;
	cursor: pointer;
	transition: transform .3s ease;
}
.icg-fit-cover .icg-gallery-item img {
	object-fit: cover;
}
.icg-fit-contain .icg-gallery-item img {
	object-fit: contain;
	background: #111;
}
.icg-gallery-item:hover img {
	transform: scale(1.06);
}
.icg-gallery-item .icg-caption {
	opacity: 0;
	transition: opacity .2s;
}
.icg-gallery-item:hover .icg-caption {
	opacity: 1;
}

@media (max-width: 782px) {
	.icg-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Lightbox ---------- */
.icg-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .92);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.icg-lightbox-overlay.is-open {
	opacity: 1;
	visibility: visible;
}
.icg-lightbox-content {
	position: relative;
	max-width: 92vw;
	max-height: 88vh;
	text-align: center;
}
.icg-lightbox-content img {
	max-width: 92vw;
	max-height: 80vh;
	display: block;
	margin: 0 auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	border-radius: 2px;
}
.icg-lightbox-caption {
	color: #fff;
	margin-top: 12px;
	font-size: 14px;
}
.icg-lightbox-counter {
	color: #ccc;
	margin-top: 4px;
	font-size: 12px;
}
.icg-lightbox-close,
.icg-lightbox-prev,
.icg-lightbox-next {
	position: fixed;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	border: none;
	cursor: pointer;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s;
}
.icg-lightbox-close {
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 22px;
}
.icg-lightbox-prev,
.icg-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	font-size: 20px;
}
.icg-lightbox-prev { left: 20px; }
.icg-lightbox-next { right: 20px; }
.icg-lightbox-close:hover,
.icg-lightbox-prev:hover,
.icg-lightbox-next:hover {
	background: rgba(255, 255, 255, .2);
}

@media (max-width: 600px) {
	.icg-lightbox-prev { left: 6px; }
	.icg-lightbox-next { right: 6px; }
	.icg-lightbox-close { top: 8px; right: 8px; }
}
