/* DBCHS Photo Galleries — front-end (loaded with theme) */
.dbchs-gallery-page-main,
.dbchs-gallery-archive-main {
	position: relative;
	padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
	overflow: hidden;
	background: linear-gradient(180deg, #f8fafc 0%, #f5f7fb 40%, #e6ecf5 100%);
}

.dbchs-gallery-page-main::before,
.dbchs-gallery-archive-main::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 50% at 90% 0%, rgba(201, 162, 39, 0.08) 0%, transparent 55%),
		radial-gradient(ellipse 55% 45% at 0% 90%, rgba(14, 165, 233, 0.06) 0%, transparent 50%);
	pointer-events: none;
}

.dbchs-gallery-hero {
	position: relative;
	padding: clamp(2rem, 5vw, 3rem) 0 clamp(1.75rem, 4vw, 2.5rem);
	background: linear-gradient(165deg, #1e3a5f 0%, #152a45 45%, #101f33 100%);
	color: #fff;
	overflow: hidden;
}

.dbchs-gallery-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 75% 55% at 75% -10%, rgba(201, 162, 39, 0.2) 0%, transparent 55%),
		radial-gradient(ellipse 50% 40% at 0% 100%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
	pointer-events: none;
}

.dbchs-gallery-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.9), rgba(250, 204, 21, 0.45), rgba(201, 162, 39, 0.9), transparent);
	pointer-events: none;
}

.dbchs-gallery-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 920px;
	margin: 0 auto;
	text-align: center;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.dbchs-gallery-hero__kicker {
	margin: 0 0 0.65rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(250, 204, 21, 0.95);
}

.dbchs-gallery-hero__title {
	margin: 0;
	font-size: clamp(1.85rem, 4vw, 2.65rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.dbchs-gallery-hero__title::after {
	content: "";
	display: block;
	width: 5rem;
	height: 4px;
	margin: 1rem auto 0;
	border-radius: 3px;
	background: linear-gradient(90deg, #c9a227 0%, #fde68a 50%, #c9a227 100%);
}

.dbchs-gallery-hero__intro {
	margin: 1.1rem 0 0;
	font-size: clamp(0.94rem, 1.5vw, 1.06rem);
	line-height: 1.65;
	color: rgba(226, 232, 240, 0.95);
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
	font-weight: 500;
}

.dbchs-gallery-archive-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: clamp(1.15rem, 2.5vw, 1.65rem);
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem 2rem;
	list-style: none;
}

.dbchs-gallery-archive-grid--shortcode {
	padding: 1rem 0;
}

.dbchs-gallery-card {
	margin: 0;
	height: 100%;
}

.dbchs-gallery-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
	border: 1px solid rgba(30, 58, 95, 0.11);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(30, 58, 95, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dbchs-gallery-card__link:hover,
.dbchs-gallery-card__link:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 14px 40px rgba(30, 58, 95, 0.14);
	border-color: rgba(201, 162, 39, 0.35);
	outline: none;
}

.dbchs-gallery-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
	position: relative;
}

.dbchs-gallery-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(30, 58, 95, 0.15) 100%);
	pointer-events: none;
}

.dbchs-gallery-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dbchs-gallery-card__body {
	padding: 1.1rem 1.15rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.dbchs-gallery-card__title {
	margin: 0;
	font-size: clamp(1.05rem, 1.35vw, 1.18rem);
	font-weight: 800;
	color: #1e3a5f;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.dbchs-gallery-card__excerpt {
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.5;
	color: #5c6473;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dbchs-gallery-card__meta {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #b45309;
}

.dbchs-gallery-single {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem 2rem;
}

.dbchs-gallery-single__intro {
	margin: 0 0 clamp(1.5rem, 3vw, 2rem);
	padding: clamp(1rem, 2vw, 1.35rem) clamp(1.1rem, 2vw, 1.5rem);
	background: linear-gradient(165deg, #fff 0%, #fafbfd 100%);
	border-radius: 14px;
	border: 1px solid rgba(30, 58, 95, 0.1);
	font-size: clamp(0.94rem, 1.2vw, 1.02rem);
	line-height: 1.75;
	color: #1a1a1a;
}

.dbchs-gallery-single__intro > *:first-child {
	margin-top: 0;
}

.dbchs-gallery-single__intro > *:last-child {
	margin-bottom: 0;
}

.dbchs-gallery-masonry {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: clamp(0.65rem, 1.5vw, 0.85rem);
}

@media (min-width: 700px) {
	.dbchs-gallery-masonry {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 1rem;
	}
}

.dbchs-gallery-masonry__item {
	margin: 0;
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: #e2e8f0;
	box-shadow: 0 4px 20px rgba(30, 58, 95, 0.1);
	aspect-ratio: 4 / 3;
}

.dbchs-gallery-masonry__btn {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	cursor: zoom-in;
	background: transparent;
}

.dbchs-gallery-masonry__btn:focus-visible {
	outline: 3px solid #c9a227;
	outline-offset: 2px;
}

.dbchs-gallery-masonry__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.dbchs-gallery-masonry__btn:hover .dbchs-gallery-masonry__img {
	transform: scale(1.04);
}

.dbchs-gallery-empty {
	margin: 0;
	padding: 2rem 1.25rem;
	text-align: center;
	color: #5c6473;
	background: rgba(30, 58, 95, 0.06);
	border-radius: 12px;
	border: 1px dashed rgba(30, 58, 95, 0.2);
}

/* Lightbox */
.dbchs-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
		env(safe-area-inset-left, 0);
	background: rgba(15, 23, 42, 0.92);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dbchs-gallery-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.dbchs-gallery-lightbox__inner {
	position: relative;
	max-width: min(96vw, 1200px);
	max-height: 92vh;
	margin: auto;
}

.dbchs-gallery-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.dbchs-gallery-lightbox__close {
	position: absolute;
	top: -2.75rem;
	right: 0;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.dbchs-gallery-lightbox__close:hover,
.dbchs-gallery-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: none;
}

.dbchs-gallery-lightbox__prev,
.dbchs-gallery-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.dbchs-gallery-lightbox__prev:hover,
.dbchs-gallery-lightbox__next:hover,
.dbchs-gallery-lightbox__prev:focus-visible,
.dbchs-gallery-lightbox__next:focus-visible {
	background: rgba(201, 162, 39, 0.85);
	color: #101f33;
	outline: none;
}

.dbchs-gallery-lightbox__prev {
	left: clamp(0.25rem, 2vw, 1rem);
}

.dbchs-gallery-lightbox__next {
	right: clamp(0.25rem, 2vw, 1rem);
}

.dbchs-gallery-lightbox__counter {
	position: absolute;
	bottom: -2.25rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(226, 232, 240, 0.95);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
}

@media (max-width: 640px) {
	.dbchs-gallery-lightbox__close {
		top: auto;
		bottom: -3rem;
		right: 50%;
		transform: translateX(50%);
	}

	.dbchs-gallery-lightbox__counter {
		bottom: -3.5rem;
	}
}

.dbchs-gallery-shortcode-empty {
	margin: 1rem 0;
	padding: 1rem;
	border-radius: 8px;
	background: rgba(30, 58, 95, 0.06);
	color: #5c6473;
}

.navigation.pagination {
	margin: 0;
}

.navigation.pagination ul {
	display: flex;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
	flex-wrap: wrap;
	align-items: center;
}

.navigation.pagination li span,
.navigation.pagination li a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0.4rem 0.65rem;
	border-radius: 8px;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.navigation.pagination li a {
	color: #1e3a5f;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(30, 58, 95, 0.15);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.navigation.pagination li a:hover,
.navigation.pagination li a:focus-visible {
	background: rgba(201, 162, 39, 0.18);
	border-color: rgba(201, 162, 39, 0.45);
	outline: none;
}

.navigation.pagination li span.current {
	background: linear-gradient(165deg, #1e3a5f 0%, #152a45 100%);
	color: #fff;
	border: 1px solid rgba(30, 58, 95, 0.2);
}

.navigation.pagination li .dots {
	border: 0;
	background: transparent;
	color: #5c6473;
}
