/**
 * SNIPPET — append to assets/css/style.css (fully scoped to .news-gallery*
 * classes). No data-URI images used, so it works under a strict CSP.
 * Thumbnails are square (1 / 1) — change aspect-ratio on .news-gallery-item
 * if the design needs a different shape.
 */

.news-gallery h3 {
	margin-bottom: 24px;
}

/* The square lives on the button, and the image fills it absolutely, so
   global img rules (height:auto, max-width, etc.) can't stretch it. */
.news-gallery-item {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 0;
	background: #eee;
	cursor: zoom-in;
	overflow: hidden;
}

.news-gallery-item .news-gallery-thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.news-gallery-item:hover .news-gallery-thumb,
.news-gallery-item:focus-visible .news-gallery-thumb {
	transform: scale(1.05);
}

/* Lightbox */
.news-gallery-modal .modal-content {
	position: relative;
	background: #000;
	border: 0;
	border-radius: 0;
}

.news-gallery-modal .carousel-item {
	text-align: center;
}

.news-gallery-full {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
}

.news-gallery-caption {
	margin: 10px 16px 0;
	color: #ddd;
	font-size: 0.9rem;
}

.news-gallery-count {
	padding: 10px 0 14px;
	text-align: center;
	color: #bbb;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
}

.news-gallery-close {
	position: absolute;
	top: -44px;
	right: 0;
	z-index: 3;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.news-gallery-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0 0 4px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.3s ease;
}

.news-gallery-nav:hover,
.news-gallery-nav:focus-visible {
	background: rgba(0, 0, 0, 0.85);
}

.news-gallery-prev {
	left: 12px;
}

.news-gallery-next {
	right: 12px;
}

@media (max-width: 767px) {
	.news-gallery-nav {
		width: 36px;
		height: 36px;
		font-size: 1.5rem;
	}
}