/* Photo gallery — equal tiles + lightbox */
.mv-gallery {
	margin: 0 0 2.5em;
}

.mv-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

/* wpautop leftover safety */
.mv-gallery br,
.mv-gallery__grid > br,
.mv-gallery__item > br {
	display: none !important;
}

.mv-gallery__item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 16px;
	background: #e8f3f0;
	box-shadow: 0 10px 28px rgba(14, 111, 102, 0.12);
	text-decoration: none;
	color: inherit;
	isolation: isolate;
	transition: transform 0.28s ease, box-shadow 0.28s ease;
	outline: none;
}

.mv-gallery__item:hover,
.mv-gallery__item:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 16px 36px rgba(14, 111, 102, 0.18);
}

.mv-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.4s ease;
}

.mv-gallery__item:hover img,
.mv-gallery__item:focus-visible img {
	transform: scale(1.07);
}

.mv-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 36px 14px 12px;
	background: linear-gradient(180deg, transparent 0%, rgba(8, 28, 26, 0.82) 72%);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.mv-gallery__zoom {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: #0e6f66;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.92);
	transition: opacity 0.22s ease, transform 0.22s ease;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mv-gallery__zoom svg {
	width: 18px;
	height: 18px;
	display: block;
}

.mv-gallery__item:hover .mv-gallery__zoom,
.mv-gallery__item:focus-visible .mv-gallery__zoom {
	opacity: 1;
	transform: scale(1);
}

html.mv-lightbox-open,
html.mv-lightbox-open body {
	overflow: hidden;
}

.mv-lightbox[hidden] {
	display: none !important;
}

.mv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.mv-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 18, 16, 0.9);
	backdrop-filter: blur(5px);
}

.mv-lightbox__figure {
	position: relative;
	z-index: 1;
	margin: 0;
	max-width: min(1100px, 90vw);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mv-lightbox__img {
	max-width: 100%;
	max-height: 76vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
	background: #0b1513;
}

.mv-lightbox__caption {
	margin-top: 14px;
	color: #e7f4f1;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
	max-width: 42rem;
}

.mv-lightbox__counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	color: rgba(255, 255, 255, 0.72);
	font-size: 13px;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
}

.mv-lightbox__close,
.mv-lightbox__nav {
	position: absolute;
	z-index: 2;
	border: 0 !important;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.18) !important;
	color: #fff !important;
	transition: background 0.2s ease, transform 0.2s ease;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	box-shadow: none !important;
	-webkit-tap-highlight-color: transparent;
}

.mv-lightbox__close:hover,
.mv-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.32) !important;
	color: #fff !important;
}

.mv-lightbox__close:active,
.mv-lightbox__nav:active {
	transform: scale(0.96);
}

.mv-lightbox__close {
	top: 16px;
	right: 16px;
	width: 46px !important;
	height: 46px !important;
	border-radius: 50% !important;
	font-size: 30px !important;
	font-weight: 400;
}

.mv-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 56px !important;
	height: 56px !important;
	border-radius: 50% !important;
	font-size: 48px !important;
	font-weight: 700;
}

.mv-lightbox__nav .mv-lightbox__arrow {
	display: block;
	line-height: 1;
	color: #fff;
	user-select: none;
	transform: translateY(-2px);
	text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.mv-lightbox__prev { left: 16px; }
.mv-lightbox__next { right: 16px; }

@media (max-width: 900px) {
	.mv-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.mv-gallery__zoom {
		opacity: 1;
		transform: scale(1);
	}

	.mv-lightbox__nav {
		width: 44px !important;
		height: 44px !important;
		font-size: 28px !important;
	}

	.mv-lightbox__prev { left: 8px; }
	.mv-lightbox__next { right: 8px; }
}

@media (max-width: 560px) {
	.mv-gallery__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.mv-gallery__caption {
		font-size: 13px;
		padding: 28px 12px 10px;
	}

	.mv-lightbox {
		padding: 12px;
	}

	.mv-lightbox__img {
		max-height: 68vh;
		border-radius: 8px;
	}
}
