/* Cemacon Gallery Widget */

.cemacon-gallery {
	--cemacon-gallery-gap: 10px;
	--cemacon-gallery-full-height: 420px;
	--cemacon-gallery-half-height: 300px;
	--cemacon-gallery-radius: 0px;
	--cemacon-gallery-caption-bg: rgba(0, 0, 0, 0.55);
	--cemacon-gallery-caption-color: #ffffff;
	--cemacon-gallery-placeholder-bg: #f4f4f4;
	--cemacon-gallery-placeholder-color: #666666;

	display: flex;
	flex-direction: column;
	gap: var(--cemacon-gallery-gap);
}

.cemacon-gallery__row {
	display: flex;
	gap: var(--cemacon-gallery-gap);
}

.cemacon-gallery__row--full {
	height: var(--cemacon-gallery-full-height);
}

.cemacon-gallery__row--half {
	height: var(--cemacon-gallery-half-height);
}

.cemacon-gallery__item {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	height: 100%;
	margin: 0;
	overflow: hidden;
	border-radius: var(--cemacon-gallery-radius);
}

.cemacon-gallery__link {
	display: block;
	width: 100%;
	height: 100%;
}

.cemacon-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
}

.cemacon-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0.6em 1em;
	background: var(--cemacon-gallery-caption-bg);
	color: var(--cemacon-gallery-caption-color);
	font-size: 0.9em;
	line-height: 1.4;
}

.cemacon-gallery--placeholder {
	padding: 20px;
	background: var(--cemacon-gallery-placeholder-bg);
	color: var(--cemacon-gallery-placeholder-color);
	text-align: center;
}

@media (max-width: 1024px) {
	.cemacon-gallery__item img {
		object-fit: contain;
	}

	.cemacon-gallery__row--half {
		flex-direction: column;
		height: auto;
	}

	.cemacon-gallery__row--half .cemacon-gallery__item {
		height: var(--cemacon-gallery-half-height);
	}
}
