/* ==========================================================================
   Halaman Gallery
   Nuansa mengikuti Find Us dan landing page: hitam putih, banyak ruang
   kosong, huruf kecil. Foto disusun masonry (kolom CSS) supaya foto potret
   tidak terpotong, lalu dibuka di lightbox.
   ========================================================================== */

/* Judul halaman bawaan tema tidak dipakai, judul ada di dalam galeri. */
body.ewu-gallery-page .page-header,
body.ewu-gallery-page .entry-title {
	display: none;
}

.ewu-gal {
	max-width: 1280px;
	margin: 0 auto;
	padding: 120px 32px 90px;
	color: #111;
}

.ewu-gal a {
	color: inherit;
}

/* --- Dua bahasa: pilihan bahasa dari atribut di <html> --- */
.ewu-gal .ewu-gal__en {
	display: none;
}

html[data-ewu-lang="en"] .ewu-gal .ewu-gal__en {
	display: inline;
}

html[data-ewu-lang="en"] .ewu-gal .ewu-gal__id {
	display: none;
}

/* --- Judul --- */
.ewu-gal__head {
	margin-bottom: 40px;
	text-align: center;
}

body .ewu-gal .ewu-gal__title {
	margin: 0 0 14px;
	font-family: var(--ewu-serif, "Abhaya Libre", serif);
	font-size: clamp(44px, 7vw, 88px);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.01em;
	text-transform: none;
}

.ewu-gal .ewu-gal__sub {
	margin: 0;
	font-family: var(--ewu-sans, "Poppins", sans-serif);
	font-size: 16px;
	line-height: 1.6;
	opacity: 0.65;
}

/* --- Filter --- */
.ewu-gal__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 22px;
	margin: 0 0 44px;
}

.ewu-gal .ewu-gal__filter {
	padding: 6px 0;
	border: 0;
	border-bottom: 1px solid transparent;
	border-radius: 0;
	background: none;
	color: #111;
	font-family: "Roboto Mono", ui-monospace, monospace;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.5;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ewu-gal .ewu-gal__filter:hover,
.ewu-gal .ewu-gal__filter:focus-visible,
.ewu-gal .ewu-gal__filter.is-active {
	background: none;
	color: #111;
	opacity: 1;
}

.ewu-gal .ewu-gal__filter.is-active {
	border-bottom-color: #111;
}

/* --- Grid masonry --- */
.ewu-gal__grid {
	column-count: 3;
	column-gap: 14px;
}

.ewu-gal__item {
	margin: 0 0 14px;
	break-inside: avoid;
}

/* Setelah dirapikan skrip: kolom flex, tiap foto masuk kolom terpendek. */
.ewu-gal__grid.is-masonry {
	display: flex;
	align-items: flex-start;
	column-count: auto;
	gap: 14px;
}

.ewu-gal__col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.ewu-gal__grid.is-masonry .ewu-gal__item {
	margin: 0;
}

.ewu-gal__item[hidden] {
	display: none;
}

.ewu-gal__link {
	display: block;
	overflow: hidden;
	background: #f1f1ef;
}

.ewu-gal .ewu-gal__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.5s ease, transform 0.6s ease;
}

/* Foto baru tampil setelah termuat. Hanya berlaku kalau skrip jalan. */
.ewu-gal.has-js .ewu-gal__img:not(.is-loaded) {
	opacity: 0;
}

.ewu-gal__link:hover .ewu-gal__img,
.ewu-gal__link:focus-visible .ewu-gal__img {
	transform: scale(1.03);
}

.ewu-gal .ewu-gal__link:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.ewu-gal__caption {
	margin: 8px 2px 0;
	font-family: "Roboto Mono", ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	line-height: 1.5;
	opacity: 0.55;
}

/* --- Penutup --- */
.ewu-gal__foot {
	margin-top: 72px;
	text-align: center;
	font-family: var(--ewu-sans, "Poppins", sans-serif);
}

.ewu-gal__foot p {
	margin: 0 0 14px;
	font-size: 15px;
	opacity: 0.7;
}

.ewu-gal__foot .ewu-gal__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 28px;
	opacity: 1;
}

.ewu-gal__links a {
	font-family: "Roboto Mono", ui-monospace, monospace;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-decoration: underline;
	text-underline-offset: 5px;
	text-transform: uppercase;
}

/* --- Lightbox --- */
.ewu-gal__box {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 17, 17, 0.95);
}

.ewu-gal__box[hidden] {
	display: none;
}

.ewu-gal__stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(92vw, 1100px);
	margin: 0;
}

.ewu-gal__big {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	object-fit: contain;
}

.ewu-gal__bigvid {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	background: #000;
}

.ewu-gal__bigvid[hidden],
.ewu-gal__big[hidden] {
	display: none;
}

/* Ikon play di atas poster video */
.ewu-gal__link {
	position: relative;
}

.ewu-gal__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(17, 17, 17, 0.35);
	pointer-events: none;
}

.ewu-gal__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -9px 0 0 -6px;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
}

.ewu-gal__bigcap {
	margin-top: 14px;
	color: #fff;
	font-family: "Roboto Mono", ui-monospace, monospace;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-align: center;
	opacity: 0.75;
}

.ewu-gal .ewu-gal__close,
.ewu-gal .ewu-gal__nav {
	position: absolute;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: #fff;
	font-family: var(--ewu-sans, "Poppins", sans-serif);
	font-weight: 300;
	line-height: 1;
	opacity: 0.8;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ewu-gal .ewu-gal__close:hover,
.ewu-gal .ewu-gal__nav:hover,
.ewu-gal .ewu-gal__close:focus-visible,
.ewu-gal .ewu-gal__nav:focus-visible {
	background: none;
	color: #fff;
	opacity: 1;
}

.ewu-gal .ewu-gal__close {
	top: 14px;
	right: 20px;
	width: 48px;
	height: 48px;
	font-size: 40px;
}

.ewu-gal .ewu-gal__nav {
	top: 50%;
	width: 56px;
	height: 80px;
	margin-top: -40px;
	font-size: 56px;
}

.ewu-gal .ewu-gal__nav--prev {
	left: 8px;
}

.ewu-gal .ewu-gal__nav--next {
	right: 8px;
}

.ewu-gal__count {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	color: #fff;
	font-family: "Roboto Mono", ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-align: center;
	opacity: 0.5;
}

body.ewu-gal-open {
	overflow: hidden;
}

@media (max-width: 899px) {
	.ewu-gal {
		padding: 96px 16px 64px;
	}

	.ewu-gal__grid {
		column-count: 2;
		column-gap: 10px;
	}

	.ewu-gal__item {
		margin-bottom: 10px;
	}

	.ewu-gal__grid.is-masonry,
	.ewu-gal__col {
		gap: 10px;
	}

	.ewu-gal__filters {
		margin-bottom: 30px;
	}

	.ewu-gal .ewu-gal__nav {
		width: 44px;
		font-size: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ewu-gal .ewu-gal__img {
		transition: none;
	}

	.ewu-gal__link:hover .ewu-gal__img {
		transform: none;
	}
}
