/* Mahamevnawa Social Gallery */
.mmsg {
	--mmsg-gap: 8px;
	--mmsg-n: var(--mmsg-cols, 4);
	position: relative;
	margin: 1.5em 0;
}
.mmsg-item {
	display: block;
	line-height: 0;
	overflow: hidden;
	border-radius: 4px;
	background: #eee;
}
.mmsg-item img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.25s ease;
}
.mmsg-item:hover img,
.mmsg-item:focus-visible img {
	transform: scale(1.03);
}
.mmsg-item:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
}

/* Grid */
.mmsg--grid {
	display: grid;
	grid-template-columns: repeat(var(--mmsg-n), 1fr);
	gap: var(--mmsg-gap);
}
.mmsg--grid .mmsg-item img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* Masonry */
.mmsg--masonry {
	columns: var(--mmsg-n);
	column-gap: var(--mmsg-gap);
}
.mmsg--masonry .mmsg-item {
	break-inside: avoid;
	margin-bottom: var(--mmsg-gap);
}

/* Slider */
.mmsg--slider .mmsg-track {
	display: flex;
	gap: var(--mmsg-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}
.mmsg--slider .mmsg-track::-webkit-scrollbar {
	display: none;
}
.mmsg--slider .mmsg-item {
	flex: 0 0 100%;
	scroll-snap-align: center;
}
.mmsg--slider .mmsg-item img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.mmsg-prev,
.mmsg-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 26px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
}
.mmsg-prev { left: 8px; }
.mmsg-next { right: 8px; }
.mmsg-prev:hover,
.mmsg-next:hover,
.mmsg-prev:focus-visible,
.mmsg-next:focus-visible {
	background: rgba(0, 0, 0, 0.8);
}
.mmsg-dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}
.mmsg-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c3c4c7;
	cursor: pointer;
}
.mmsg-dot[aria-current="true"] {
	background: #2271b1;
}

/* Responsive columns */
@media (max-width: 900px) {
	.mmsg { --mmsg-n: var(--mmsg-cols-md, 3); }
}
@media (max-width: 600px) {
	.mmsg { --mmsg-n: var(--mmsg-cols-sm, 2); }
}

/* Editor-only notice */
.mmsg-notice {
	margin: 1em 0;
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
	color: #3c3200;
}

@media (prefers-reduced-motion: reduce) {
	.mmsg-item img { transition: none; }
	.mmsg--slider .mmsg-track { scroll-behavior: auto; }
}
