/* =============================================================
   Mithila Galleries — gallery.css  v1.0.0
   ============================================================= */

/* ── Reset ──────────────────────────────────────────────────── */
.mg-page *,
.mg-page *::before,
.mg-page *::after { box-sizing: border-box; }
.mg-page img  { max-width: 100%; height: auto; display: block; }
.mg-page ul   { list-style: none; margin: 0; padding: 0; }

.mg-container {
	width: 100%;
	max-width: 1366px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 3rem);
}

/* =============================================================
   1. PAGE HERO
   ============================================================= */
.mg-hero {
	position: relative;
	height: clamp(260px, 38vw, 440px);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--wdtSecondaryColor, #363e5a);
}

.mg-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	display: block;
}

.mg-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(10,14,30,.55) 0%, rgba(10,14,30,.7) 100%);
}

.mg-hero__inner {
	position: relative;
	z-index: 2;
	text-align: center;
	padding-inline: 1.5rem;
}

.mg-hero__title {
	font-family: var(--wdtFontTypo_Alt, 'Oswald', sans-serif);
	font-size: clamp(2.25rem, 6vw, 4rem);
	font-weight: 700;
	color: #fff;
	margin: 0 0 .75rem;
	line-height: 1.1;
}

.mg-hero__breadcrumb {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	font-size: .9rem;
	color: rgba(255,255,255,.75);
}
.mg-hero__breadcrumb a {
	color: rgba(255,255,255,.75);
	text-decoration: none;
	transition: color .2s;
}
.mg-hero__breadcrumb a:hover { color: #fff; }
.mg-hero__breadcrumb span { color: var(--wdtPrimaryColor, #d88e7d); }

/* =============================================================
   2. GALLERY BODY
   ============================================================= */
.mg-body {
	background: var(--wdtTertiaryColor, #f8eae1);
	padding-top: clamp(3rem, 6vw, 5rem);
	padding-bottom: clamp(4rem, 8vw, 7rem);
}

.mg-body__intro-wrap {
	text-align: center;
	max-width: 820px;
	margin: 0 auto 2.5rem;
}

.mg-body__heading {
	font-family: var(--wdtFontTypo_Alt, 'Oswald', sans-serif);
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 700;
	color: var(--wdtSecondaryColor, #363e5a);
	margin: 0 0 1.25rem;
	line-height: 1.15;
}

.mg-body__desc {
	font-size: .97rem;
	line-height: 1.8;
	color: #5a6070;
	margin: 0;
}

/* ── Filter tabs ── */
.mg-filters {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	flex-wrap: wrap;
	margin-bottom: 2.5rem;
}

.mg-filter-btn {
	padding: .5rem 1.35rem;
	border-radius: 2em;
	border: 2px solid rgba(54,62,90,.15);
	background: #fff;
	color: var(--wdtSecondaryColor, #363e5a);
	font-family: var(--wdtFontTypo_Base, 'Roboto', sans-serif);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
	line-height: 1;
}
.mg-filter-btn:hover {
	border-color: var(--wdtPrimaryColor, #d88e7d);
	color: var(--wdtPrimaryColor, #d88e7d);
}
.mg-filter-btn.is-active {
	background: var(--wdtPrimaryColor, #d88e7d);
	border-color: var(--wdtPrimaryColor, #d88e7d);
	color: #fff;
}
.mg-filter-btn.is-active::after {
	content: '';
	display: block;
	width: 28px;
	height: 2px;
	background: #fff;
	margin: 4px auto 0;
	border-radius: 1px;
}

/* ── Masonry grid ── */
.mg-masonry {
	columns: 5 220px;
	column-gap: 1rem;
}

.mg-masonry__item {
	break-inside: avoid;
	margin-bottom: 1rem;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	position: relative;
	background: #e8ddd4;
}

.mg-masonry__item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform .45s ease;
}

.mg-masonry__item:hover img { transform: scale(1.06); }

.mg-masonry__item--hidden {
	display: none;
}

/* ── Lightbox ── */
.mg-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0,0,0,.92);
	align-items: center;
	justify-content: center;
}
.mg-lightbox.is-open { display: flex; }

.mg-lightbox__img {
	max-width: 90vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 6px;
	display: block;
}

.mg-lightbox__close {
	position: absolute;
	top: 1.25rem;
	right: 1.5rem;
	background: none;
	border: none;
	color: #fff;
	font-size: 2rem;
	cursor: pointer;
	line-height: 1;
	padding: .25rem .5rem;
	transition: color .2s;
}
.mg-lightbox__close:hover { color: var(--wdtPrimaryColor, #d88e7d); }

.mg-lightbox__prev,
.mg-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,.12);
	border: 1.5px solid rgba(255,255,255,.25);
	color: #fff;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .2s;
}
.mg-lightbox__prev { left: 1.5rem; }
.mg-lightbox__next { right: 1.5rem; }
.mg-lightbox__prev:hover,
.mg-lightbox__next:hover { background: rgba(255,255,255,.25); }

/* ── Responsive ── */
@media (max-width: 900px) {
	.mg-masonry { columns: 3 180px; }
}
@media (max-width: 540px) {
	.mg-masonry { columns: 2 140px; }
}
