/**
 * In Post Gallery — frontend styles
 * Author: Dizajn Arena (https://www.dizajnarena.com)
 */

.ipg-slider {
	max-width: 100%;
	margin: 24px 0;
}

.ipg-viewport {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
	background: #000;
	min-height: 200px;
	transition: height 0.35s ease;
}

.ipg-track {
	display: flex;
	align-items: stretch;
	height: 100%;
	transition: transform 0.4s ease;
}

.ipg-slide {
	flex: 0 0 100%;
	max-width: 100%;
	height: 100%;
}

.ipg-slide-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	cursor: zoom-in;
}

.ipg-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.ipg-arrow:hover {
	background: rgba(0, 0, 0, 0.75);
}

.ipg-prev {
	left: 10px;
}

.ipg-next {
	right: 10px;
}

.ipg-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 2;
}

.ipg-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, transform 0.2s;
}

.ipg-dot:hover {
	background: rgba(255, 255, 255, 0.8);
}

.ipg-dot.is-active {
	background: #fff;
	transform: scale(1.2);
}

.ipg-thumbs {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	overflow-x: auto;
	padding: 4px 0;
}

.ipg-thumb {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	background: none;
	opacity: 0.6;
	transition: opacity 0.2s, border-color 0.2s;
}

.ipg-thumb:hover {
	opacity: 0.85;
}

.ipg-thumb.is-active {
	opacity: 1;
	border-color: #d63638;
}

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

/* Grid layout: small thumbnails side by side. */
.ipg-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0;
}

.ipg-grid-item {
	flex: 0 0 auto;
}

.ipg-grid-img {
	display: block;
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 4px;
	cursor: zoom-in;
	transition: opacity 0.2s;
}

.ipg-grid-img:hover {
	opacity: 0.85;
}

/* Click-to-enlarge popup. Created lazily by JS on first click, so
   pages where nobody clicks an image never pay any extra cost. */
.ipg-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 40px;
}

.ipg-lightbox.is-open {
	display: flex;
}

.ipg-lightbox-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.ipg-lightbox-close,
.ipg-lightbox-prev,
.ipg-lightbox-next {
	position: fixed;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.ipg-lightbox-close:hover,
.ipg-lightbox-prev:hover,
.ipg-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.25);
}

.ipg-lightbox-close {
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
}

.ipg-lightbox-prev,
.ipg-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 18px;
}

.ipg-lightbox-prev {
	left: 16px;
}

.ipg-lightbox-next {
	right: 16px;
}
