/* Photo galleries: listing (/gallery/) and single gallery pages. */

.gallery-page {
	padding: 34px 0 50px;
	background: #141414;
	color: #fff;
}

.gallery-page__title {
	margin: 0 0 22px;
	padding-right: 12px;
	border-right: 4px solid #CE2626;
	font-family: 'aanmu', 'mv waheed', sans-serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.5;
}

/* Photo-count badge */
.gallery-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	direction: rtl;
	font-family: 'mv faseyha', sans-serif;
	font-size: 13px;
	line-height: 1.7;
	backdrop-filter: blur(4px);
}

/* ---------- Listing: hero ---------- */
.gallery-hero {
	position: relative;
	display: block;
	overflow: hidden;
	margin-bottom: 28px;
	border-radius: 10px;
	aspect-ratio: 16 / 7;
	color: #fff;
	text-decoration: none;
}
.gallery-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}
.gallery-hero:hover .gallery-hero__img {
	transform: scale(1.03);
}
.gallery-hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 70%);
}
.gallery-hero__text {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 28px 30px;
}
.gallery-hero__name {
	font-family: 'aanmu', 'mv waheed', sans-serif;
	font-size: 34px;
	line-height: 1.6;
}
.gallery-hero__meta,
.gallery-card__meta {
	color: #b5b5b5;
	font-family: 'mv faseyha', sans-serif;
	font-size: 14px;
}

/* ---------- Listing: card grid ---------- */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px 20px;
}
.gallery-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: #fff;
	text-decoration: none;
}
.gallery-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
}
.gallery-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.gallery-card:hover .gallery-card__img,
.gallery-card:focus-visible .gallery-card__img {
	transform: scale(1.05);
}
.gallery-card .gallery-badge {
	position: absolute;
	top: 10px;
	left: 10px;
}
.gallery-card__name {
	font-family: 'aanmu', 'mv waheed', sans-serif;
	font-size: 19px;
	line-height: 1.8;
	transition: color .2s ease;
}
.gallery-card:hover .gallery-card__name,
.gallery-card:focus-visible .gallery-card__name {
	color: #ff8a8a;
}

/* Skeleton shimmer on the dark page */
.gallery-page img.pic:not(.is-loaded) {
	background-color: #262626;
	background-image: linear-gradient(90deg, #262626 0, #333 40%, #262626 80%);
}

/* ---------- Pagination ---------- */
.gallery-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 36px;
}
.gallery-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	justify-content: center;
	border: 1px solid #333;
	border-radius: 999px;
	color: #ddd;
	font-family: 'mv faseyha', sans-serif;
	text-decoration: none;
}
.gallery-pagination .page-numbers.current,
.gallery-pagination a.page-numbers:hover {
	border-color: #CE2626;
	background: #CE2626;
	color: #fff;
}
.gallery-pagination .screen-reader-text {
	display: none;
}

.gallery-empty {
	padding: 70px 20px;
	text-align: center;
	color: #9a9a9a;
	font-family: 'mv faseyha', sans-serif;
	font-size: 18px;
}
.gallery-empty .bi {
	display: block;
	margin-bottom: 10px;
	font-size: 42px;
	color: #CE2626;
}

/* ---------- Single gallery ---------- */
.gallery-head {
	max-width: 860px;
	margin: 0 auto 30px;
	text-align: center;
}
.gallery-head__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	color: #CE2626;
	font-family: 'aanmu', 'mv waheed', sans-serif;
	font-size: 17px;
	text-decoration: none;
}
.gallery-head__back:hover {
	color: #ff8a8a;
}
.gallery-head__title {
	margin: 0 0 12px;
	font-family: 'aanmu', 'mv waheed', sans-serif;
	font-size: 38px;
	font-weight: 400;
	line-height: 1.7;
}
.gallery-head__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	color: #b5b5b5;
	font-family: 'mv faseyha', sans-serif;
	font-size: 14px;
}
.gallery-head__intro {
	margin-top: 16px;
	color: #d6d6d6;
	font-family: 'randhoo', sans-serif;
	font-size: 18px;
	line-height: 2;
}

/* Masonry-style photo wall */
.gallery-wall {
	column-count: 3;
	column-gap: 14px;
}
.gallery-wall__item {
	margin: 0 0 14px;
	break-inside: avoid;
}
.gallery-wall__item a {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	cursor: zoom-in;
}
.gallery-wall__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .4s ease, opacity .2s ease;
}
.gallery-wall__item a:hover .gallery-wall__img,
.gallery-wall__item a:focus-visible .gallery-wall__img {
	transform: scale(1.03);
}
.gallery-wall__item figcaption {
	padding: 6px 2px 0;
	color: #9a9a9a;
	font-family: 'mv faseyha', sans-serif;
	font-size: 14px;
	line-height: 1.8;
}

.gallery-share {
	display: flex;
	justify-content: center;
	margin: 30px 0 10px;
}
.gallery-share .share-btn--copy {
	background: #2b2b2b;
	color: #ddd;
}

.gallery-more {
	margin-top: 10px;
}
.gallery-page .section-head__title {
	color: #fff;
}
.gallery-page .section-head__line {
	background: #333;
}
.gallery-page .section-head__more {
	border-color: #333;
	background: transparent;
	color: #ccc;
}

/* ---------- Full-screen viewer ---------- */
html.gallery-viewer-open {
	overflow: hidden;
}
.gallery-viewer {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 8, 8, .96);
}
.gallery-viewer[hidden] {
	display: none;
}
.gallery-viewer__top {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	color: #ddd;
	direction: ltr;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
}
.gallery-viewer__close,
.gallery-viewer__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	transition: background .2s ease;
}
.gallery-viewer__close {
	width: 42px;
	height: 42px;
	font-size: 18px;
}
.gallery-viewer__nav {
	position: absolute;
	top: 50%;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	font-size: 22px;
}
.gallery-viewer__nav--prev { right: 18px; }
.gallery-viewer__nav--next { left: 18px; }
.gallery-viewer__close:hover,
.gallery-viewer__nav:hover,
.gallery-viewer__close:focus-visible,
.gallery-viewer__nav:focus-visible {
	background: #CE2626;
}
.gallery-viewer__stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 70px 90px 30px;
}
.gallery-viewer__img {
	max-width: 100%;
	max-height: calc(100% - 50px);
	object-fit: contain;
	border-radius: 4px;
	transition: opacity .2s ease;
}
.gallery-viewer.is-loading .gallery-viewer__img {
	opacity: .35;
}
.gallery-viewer__caption {
	max-width: 760px;
	padding-top: 12px;
	color: #ccc;
	font-family: 'mv faseyha', sans-serif;
	font-size: 15px;
	line-height: 1.8;
	text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.gallery-grid { grid-template-columns: repeat(2, 1fr); }
	.gallery-wall { column-count: 2; }
	.gallery-hero { aspect-ratio: 16 / 9; }
	.gallery-hero__name { font-size: 26px; }
}
@media (max-width: 767px) {
	.gallery-page { padding: 24px 0 40px; }
	.gallery-page__title { font-size: 26px; }
	.gallery-hero { aspect-ratio: 4 / 3; border-radius: 8px; }
	.gallery-hero__text { padding: 18px; }
	.gallery-hero__name { font-size: 22px; }
	.gallery-grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
	.gallery-card__name { font-size: 16px; }
	.gallery-head__title { font-size: 28px; }
	.gallery-wall { column-gap: 8px; }
	.gallery-wall__item { margin-bottom: 8px; }
	.gallery-viewer__stage { padding: 64px 8px 20px; }
	.gallery-viewer__nav { display: none; } /* swipe instead */
}
@media (prefers-reduced-motion: reduce) {
	.gallery-hero__img, .gallery-card__img, .gallery-wall__img { transition: none; }
}
