/**
 * Pani Basmati Gallery — frontend styles.
 *
 * Replicates the visual language of the Kaffen gallery (filter pills,
 * cover imagery, gold accent #b99272) without touching vendor files.
 *
 * Spacing rules:
 * - The plugin contributes NO outer vertical padding; page sections own that.
 * - Heading → filters: 30px (plugin minimum).
 * - Filters → grid:   55px.
 */

/* -------------------------------------------------------------------------
   Archive shell
   ------------------------------------------------------------------------- */
.pbg-gallery {
	padding: 0;
}

.pbg-gallery::after {
	content: '';
	display: block;
	clear: both;
}

/* -------------------------------------------------------------------------
   Filter bar
   ------------------------------------------------------------------------- */
.pbg-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 14px;
	margin: 30px 0 55px;
	position: relative;
	z-index: 2;
	text-align: center;
}

.pbg-filter__link {
	margin: 0;
	padding: 15px 30px;
	position: relative;
	font-size: 14px;
	line-height: 1.2;
	color: #9ea1a2;
	letter-spacing: 0.03em;
	font-weight: 500;
	text-transform: uppercase;
	background: #090c0f;
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	font-family: inherit;
	-o-transition: all 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	transition: all 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	-webkit-transition: all 0.7s cubic-bezier(0.3, 0, 0.3, 1);
}

.pbg-filter__link:hover {
	color: #fff;
}

.pbg-filter__link.is-active {
	color: #fff;
	background: #b99272;
}

.pbg-filter__link:focus-visible {
	outline: 2px solid #b99272;
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Gallery grid
   ------------------------------------------------------------------------- */
.pbg-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 30px;
}

/* -------------------------------------------------------------------------
   Gallery card
   ------------------------------------------------------------------------- */
.pbg-gallery-card {
	position: relative;
	min-width: 0;
}

.pbg-gallery-open {
	display: block;
	color: inherit;
	text-decoration: none;
	outline: none;
}

.pbg-gallery-open:focus-visible {
	outline: 2px solid #b99272;
	outline-offset: 4px;
}

/* Cover image — consistent 4:3 ratio. */
.pbg-gallery-card__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #14181d;
}

.pbg-gallery-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	margin: 0;
	max-width: none;
	-o-transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	-webkit-transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
}

/* Subtle hover overlay — light enough to keep the photo visible. */
.pbg-gallery-card__media::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to top, rgba(9, 12, 15, 0.55), rgba(9, 12, 15, 0.05) 55%);
	opacity: 0;
	pointer-events: none;
	-o-transition: opacity 0.5s ease;
	transition: opacity 0.5s ease;
	-webkit-transition: opacity 0.5s ease;
}

/* Centered view icon revealed on hover. */
.pbg-gallery-card__hover {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #b99272;
	color: #fff;
	font-size: 20px;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	-o-transform: scale(0.8);
	transform: scale(0.8);
	-webkit-transform: scale(0.8);
	-o-transition: all 0.5s cubic-bezier(0.3, 0, 0.3, 1);
	transition: all 0.5s cubic-bezier(0.3, 0, 0.3, 1);
	-webkit-transition: all 0.5s cubic-bezier(0.3, 0, 0.3, 1);
	box-shadow: 0 6px 24px rgba(9, 12, 15, 0.45);
}

/* Caption below the image — always readable. */
.pbg-gallery-card__caption {
	display: block;
	padding: 18px 4px 0;
	text-align: left;
}

.pbg-gallery-card__name {
	display: block;
	font-family: "Oswald", sans-serif;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
}

.pbg-gallery-card__subname {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 7px;
	margin-top: 7px;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #9ea1a2;
}

.pbg-gallery-card__cat {
	color: #b99272;
}

.pbg-gallery-card__sep {
	color: rgba(158, 161, 162, 0.6);
}

/* Hover / focus treatment — slight zoom + gentle overlay + icon. */
.pbg-gallery-open:hover .pbg-gallery-card__media img,
.pbg-gallery-open:focus-visible .pbg-gallery-card__media img {
	-ms-transform: scale(1.06);
	transform: scale(1.06);
	-webkit-transform: scale(1.06);
}

.pbg-gallery-open:hover .pbg-gallery-card__media::after,
.pbg-gallery-open:focus-visible .pbg-gallery-card__media::after {
	opacity: 1;
}

.pbg-gallery-open:hover .pbg-gallery-card__hover,
.pbg-gallery-open:focus-visible .pbg-gallery-card__hover {
	opacity: 1;
	-ms-transform: scale(1);
	transform: scale(1);
	-webkit-transform: scale(1);
}

.pbg-gallery-open:hover .pbg-gallery-card__name {
	color: #b99272;
}

/* Clean placeholder when a gallery has no images at all. */
.pbg-gallery-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #14181d;
	color: rgba(185, 146, 114, 0.35);
	font-size: 42px;
}

/* Hidden per-album lightbox items. */
.pbg-gallery-lightbox-items[hidden] {
	display: none !important;
}

.pbg-gallery-empty {
	padding: 20px 0;
	text-align: center;
	color: #9ea1a2;
}

/* -------------------------------------------------------------------------
   Single gallery (fallback page)
   ------------------------------------------------------------------------- */
.pbg-single {
	padding: 70px 0 90px;
}

.pbg-single .kf-titles {
	margin-bottom: 30px;
}

.pbg-single-meta {
	margin-bottom: 15px;
	font-size: 14px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #9ea1a2;
}

.pbg-single-meta__chip {
	display: inline-block;
	padding: 8px 18px;
	background: #b99272;
	color: #fff;
	border-radius: 5px;
	font-weight: 500;
}

.pbg-single-meta__sep {
	margin: 0 10px;
	color: #9ea1a2;
}

.pbg-single-title {
	margin: 0;
}

.pbg-single-description {
	max-width: 760px;
	margin: 0 auto 45px;
	text-align: center;
	color: #fff;
	font-size: 16px;
	line-height: 1.8;
}

.pbg-single-description p {
	margin: 0 0 15px;
}

.pbg-single-photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.pbg-single-photo {
	display: block;
	overflow: hidden;
	background: #14181d;
}

.pbg-single-photo img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center;
	display: block;
	margin: 0;
	max-width: none;
	-o-transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
	-webkit-transition: transform 0.7s cubic-bezier(0.3, 0, 0.3, 1);
}

.pbg-single-photo:hover img,
.pbg-single-photo:focus-visible img {
	-ms-transform: scale(1.05);
	transform: scale(1.05);
	-webkit-transform: scale(1.05);
}

.pbg-single-photo:focus-visible {
	outline: 2px solid #b99272;
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
	.pbg-gallery-grid,
	.pbg-single-photos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 26px;
	}
}

@media screen and (max-width: 767px) {
	.pbg-filter {
		justify-content: flex-start;
		gap: 10px;
		margin: 20px 0 35px;
	}

	.pbg-filter__link {
		padding: 13px 20px;
		font-size: 13px;
		line-height: 16px;
	}

	.pbg-gallery-grid,
	.pbg-single-photos {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.pbg-gallery-card__caption {
		padding-top: 14px;
	}

	.pbg-single {
		padding: 50px 0 60px;
	}
}
