/*
 * Bob Heinmiller Gallery — main stylesheet
 * Everything is scoped under .bh-gallery to avoid theme conflicts.
 */

/* ============================================================
   Base
   ============================================================ */

.bh-gallery {
	font-family: var(--bh-font);
	color: var(--bh-on-surface);
	font-size: var(--bh-fs-md);
	line-height: 1.6;
	background: var(--bh-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.bh-gallery *,
.bh-gallery *::before,
.bh-gallery *::after {
	box-sizing: border-box;
}

.bh-gallery img {
	max-width: 100%;
	height: auto;
	display: block;
}

.bh-gallery a {
	color: var(--bh-primary);
	text-decoration: none;
}

.bh-gallery a:hover {
	text-decoration: underline;
}

.bh-container {
	max-width: var(--bh-container);
	margin: 0 auto;
	padding: 0 var(--bh-gutter);
}

/* Spacing rhythm for archive/single pages */
.bh-archive .bh-container,
.bh-single  .bh-container {
	padding-top: var(--bh-space-lg);
	padding-bottom: var(--bh-space-xl);
}

.bh-single .bh-hero + .bh-container {
	padding-top: var(--bh-space-lg);
}

/* ============================================================
   Breadcrumb
   ============================================================ */

.bh-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bh-space-xs);
	font-size: var(--bh-fs-sm);
	color: var(--bh-on-surface-muted);
	margin-bottom: var(--bh-space);
}

.bh-breadcrumb a {
	color: inherit;
}

.bh-breadcrumb a:hover {
	color: var(--bh-primary);
	text-decoration: none;
}

.bh-breadcrumb span[aria-hidden] {
	color: var(--bh-outline-variant);
}

.bh-breadcrumb--light,
.bh-breadcrumb--light a,
.bh-breadcrumb--light span {
	color: rgba(255, 255, 255, 0.85);
}

.bh-breadcrumb--light a:hover {
	color: #ffffff;
}

/* ============================================================
   Page header — archive hero
   ============================================================ */

.bh-page-head {
	position: relative;
	margin: 0 0 var(--bh-space-lg);
	padding: var(--bh-space-xl) 0;
	background:
		linear-gradient(135deg, #003f0e 0%, #006e20 60%, #1c8a36 100%);
	color: #ffffff;
	overflow: hidden;
}

/* Decorative ambient glows — depth without an image */
.bh-page-head::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 85% 30%, rgba(57, 181, 74, 0.35) 0%, transparent 55%),
		radial-gradient(circle at 15% 80%, rgba(0, 0, 0, 0.25) 0%, transparent 50%);
	pointer-events: none;
}

/* Re-center the head content at container width on top of the bg */
.bh-page-head__inner {
	position: relative;
	z-index: 1;
	max-width: var(--bh-container);
	margin: 0 auto;
	padding: 0 var(--bh-gutter);
}

/* The breadcrumb sits inside the hero now */
.bh-page-head .bh-breadcrumb {
	margin-bottom: var(--bh-space);
}

.bh-page-title {
	font-size: var(--bh-fs-h1);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: #ffffff;
	margin: 0 0 var(--bh-space-sm);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.bh-page-sub {
	font-size: var(--bh-fs-lg);
	color: rgba(255, 255, 255, 0.85);
	max-width: 720px;
	margin: 0;
}

/* Archive page — extra side padding around the grid section so
   cards don't crowd the screen edges on mid-size viewports. */
.bh-archive .bh-container {
	padding-top: 0;
	padding-left: var(--bh-space-lg);
	padding-right: var(--bh-space-lg);
}

@media (max-width: 767px) {
	.bh-archive .bh-container {
		padding-left: var(--bh-space);
		padding-right: var(--bh-space);
	}
}

/* ============================================================
   Filter chips
   ============================================================ */

.bh-filters {
	display: flex;
	gap: var(--bh-space-sm);
	margin-bottom: var(--bh-space-lg);
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bh-filters::-webkit-scrollbar {
	display: none;
}

.bh-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: var(--bh-radius-full);
	font-size: var(--bh-fs-sm);
	font-weight: 500;
	background: var(--bh-surface-container);
	color: var(--bh-on-surface);
	border: 1px solid transparent;
	white-space: nowrap;
	transition: background var(--bh-duration) var(--bh-ease),
	            color var(--bh-duration) var(--bh-ease),
	            border-color var(--bh-duration) var(--bh-ease);
}

.bh-chip--filter:hover {
	background: var(--bh-surface-container-high);
	text-decoration: none;
}

.bh-chip--filter.is-active {
	background: var(--bh-primary);
	color: var(--bh-on-primary);
}

.bh-chip--service {
	position: absolute;
	top: var(--bh-space-sm);
	left: var(--bh-space-sm);
	background: rgba(0, 110, 32, 0.95);
	color: var(--bh-on-primary);
	font-size: var(--bh-fs-xs);
	padding: 4px 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	z-index: 2;
}

.bh-chip--light {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.bh-chip--status {
	background: rgba(57, 181, 74, 0.2);
	border-color: rgba(57, 181, 74, 0.5);
}

/* ============================================================
   Grid + cards
   ============================================================ */

.bh-grid {
	display: grid;
	grid-template-columns: repeat(var(--bh-cols, 3), minmax(0, 1fr));
	gap: var(--bh-space);
}

.bh-card {
	background: var(--bh-surface);
	border-radius: var(--bh-radius);
	overflow: hidden;
	box-shadow: var(--bh-shadow);
	transition: transform var(--bh-duration) var(--bh-ease),
	            box-shadow var(--bh-duration) var(--bh-ease);
}

.bh-card:hover,
.bh-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--bh-shadow-hover);
}

.bh-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.bh-card__link:hover,
.bh-card__link:focus {
	text-decoration: none;
	color: inherit;
}

.bh-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bh-surface-container);
}

/* Aspect-ratio fallback for older Safari */
@supports not (aspect-ratio: 1) {
	.bh-card__media {
		padding-top: 62.5%;
	}
	.bh-card__media > * {
		position: absolute;
		inset: 0;
	}
}

.bh-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--bh-ease);
}

.bh-card:hover .bh-card__img {
	transform: scale(1.04);
}

.bh-card__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--bh-surface-container) 0%, var(--bh-surface-container-high) 100%);
}

.bh-card__body {
	padding: var(--bh-space);
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.bh-card__title {
	font-size: var(--bh-fs-h3);
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	color: var(--bh-on-surface);
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bh-card__location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--bh-fs-sm);
	color: var(--bh-on-surface-muted);
	margin: 0;
}

.bh-card__desc {
	font-size: var(--bh-fs-md);
	color: var(--bh-on-surface-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.5;
}

.bh-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: var(--bh-space-sm);
	font-weight: 600;
	font-size: var(--bh-fs-md);
	color: var(--bh-primary);
}

.bh-card:hover .bh-card__cta .bh-icon {
	transform: translateX(4px);
}

.bh-card__cta .bh-icon {
	transition: transform var(--bh-duration) var(--bh-ease);
}

/* ============================================================
   Featured card (single-result shortcode)
   ============================================================ */

.bh-gallery--featured {
	padding: var(--bh-space) 0;
}

.bh-card--featured {
	display: block;
	background: var(--bh-surface);
	border-radius: var(--bh-radius-lg);
	overflow: hidden;
	box-shadow: var(--bh-shadow);
	position: relative;
	isolation: isolate;
	transition: transform var(--bh-duration) var(--bh-ease),
	            box-shadow var(--bh-duration) var(--bh-ease);
}

/* Subtle green accent rule on the left edge */
.bh-card--featured::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--bh-primary) 0%, var(--bh-primary-container) 100%);
	z-index: 2;
}

.bh-card--featured:hover,
.bh-card--featured:focus-within {
	transform: translateY(-3px);
	box-shadow: var(--bh-shadow-hover);
}

.bh-card--featured .bh-card__link {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	min-height: 440px;
	flex-direction: row;
}

.bh-card--featured .bh-card__media {
	aspect-ratio: auto;
	height: 100%;
	min-height: 440px;
	position: relative;
}

/* Soft inner shadow on the seam between image and body */
.bh-card--featured .bh-card__media::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	width: 60px;
	background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.04) 100%);
	pointer-events: none;
	z-index: 1;
}

.bh-card--featured .bh-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bh-card--featured .bh-chip--service {
	top: var(--bh-space);
	left: var(--bh-space);
	font-size: var(--bh-fs-sm);
	padding: 6px 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bh-card--featured .bh-card__body {
	padding: var(--bh-space-lg);
	gap: 14px;
	background:
		linear-gradient(135deg, var(--bh-surface) 0%, var(--bh-surface-alt) 100%);
	justify-content: center;
}

.bh-card__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--bh-fs-xs);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bh-primary);
	margin: 0;
}

.bh-card__eyebrow-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bh-primary-container);
	box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.2);
	animation: bh-pulse 2s ease-in-out infinite;
}

@keyframes bh-pulse {
	0%, 100% { box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.2); }
	50%      { box-shadow: 0 0 0 6px rgba(57, 181, 74, 0.05); }
}

.bh-card--featured .bh-card__title {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	-webkit-line-clamp: 3;
	margin: 0;
}

.bh-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bh-space);
	font-size: var(--bh-fs-sm);
	color: var(--bh-on-surface-muted);
}

.bh-card__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--bh-primary);
	font-weight: 600;
}

.bh-card--featured .bh-card__desc {
	font-size: var(--bh-fs-lg);
	color: var(--bh-on-surface-variant);
	-webkit-line-clamp: 4;
	line-height: 1.6;
	margin: 4px 0 0;
}

.bh-card__btn {
	align-self: flex-start;
	margin-top: var(--bh-space-sm);
	padding: 14px 28px;
	font-size: var(--bh-fs-md);
	box-shadow: 0 4px 14px rgba(0, 110, 32, 0.25);
}

.bh-card--featured:hover .bh-card__btn {
	box-shadow: 0 6px 20px rgba(0, 110, 32, 0.35);
}

.bh-card--featured:hover .bh-card__btn .bh-icon {
	transform: translateX(4px);
}

.bh-card__btn .bh-icon {
	transition: transform var(--bh-duration) var(--bh-ease);
}

/* Responsive — stack on tablet & below */
@media (max-width: 900px) {
	.bh-card--featured .bh-card__link {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.bh-card--featured .bh-card__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}
	.bh-card--featured .bh-card__media::after {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 40px;
		background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.04) 100%);
	}
	.bh-card--featured .bh-card__body {
		padding: var(--bh-space);
	}
	.bh-card--featured .bh-card__title {
		font-size: 26px;
	}
	.bh-card--featured .bh-card__desc {
		font-size: var(--bh-fs-md);
	}
	.bh-card__btn {
		width: 100%;
		justify-content: center;
	}
}

/* ============================================================
   Buttons
   ============================================================ */

.bh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: var(--bh-radius);
	font-size: var(--bh-fs-md);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background var(--bh-duration) var(--bh-ease),
	            color var(--bh-duration) var(--bh-ease),
	            border-color var(--bh-duration) var(--bh-ease),
	            transform var(--bh-duration) var(--bh-ease);
	text-decoration: none;
}

.bh-btn:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.bh-btn--primary {
	background: var(--bh-primary);
	color: var(--bh-on-primary);
}

.bh-btn--primary:hover {
	background: var(--bh-on-primary-container);
	color: var(--bh-on-primary);
}

.bh-btn--ghost {
	background: transparent;
	color: var(--bh-primary);
	border-color: var(--bh-primary);
}

.bh-btn--ghost:hover {
	background: var(--bh-primary);
	color: var(--bh-on-primary);
}

/* ============================================================
   Pagination
   ============================================================ */

.bh-pagination {
	margin-top: var(--bh-space-lg);
	display: flex;
	justify-content: center;
}

.bh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	margin: 0 4px;
	border-radius: var(--bh-radius);
	font-size: var(--bh-fs-sm);
	font-weight: 500;
	color: var(--bh-on-surface);
	background: var(--bh-surface-container);
	text-decoration: none;
	transition: background var(--bh-duration) var(--bh-ease);
}

.bh-pagination .page-numbers:hover {
	background: var(--bh-surface-container-high);
}

.bh-pagination .page-numbers.current {
	background: var(--bh-primary);
	color: var(--bh-on-primary);
}

.bh-pagination .page-numbers.dots {
	background: transparent;
}

/* ============================================================
   Empty state
   ============================================================ */

.bh-empty {
	text-align: center;
	padding: var(--bh-space-xl) var(--bh-space);
	background: var(--bh-surface-alt);
	border-radius: var(--bh-radius-md);
}

.bh-empty__title {
	font-size: var(--bh-fs-h3);
	font-weight: 600;
	margin: 0 0 var(--bh-space-sm);
	color: var(--bh-on-surface);
}

.bh-empty__body {
	color: var(--bh-on-surface-muted);
	margin: 0 0 var(--bh-space);
	max-width: 480px;
	margin-left: auto;
	margin-right: auto;
}

.bh-empty--inline {
	padding: var(--bh-space) 0;
	background: transparent;
}

/* ============================================================
   Single project — Hero
   ============================================================ */

.bh-hero {
	position: relative;
	min-height: 480px;
	background-size: cover;
	background-position: center;
	background-color: var(--bh-on-surface);
	color: #ffffff;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.bh-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.15) 0%,
		rgba(0, 0, 0, 0.35) 50%,
		rgba(0, 0, 0, 0.75) 100%
	);
}

.bh-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-top: var(--bh-space-lg);
	padding-bottom: var(--bh-space-lg);
}

.bh-hero__title {
	font-size: var(--bh-fs-h1);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #ffffff;
	margin: 0 0 var(--bh-space);
	max-width: 880px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bh-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bh-space-sm);
}

/* ============================================================
   Single — Layout
   ============================================================ */

.bh-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: var(--bh-space-lg);
	margin-bottom: var(--bh-space-xl);
}

.bh-content {
	font-size: var(--bh-fs-lg);
	line-height: 1.7;
	color: var(--bh-on-surface);
}

.bh-content > * + * {
	margin-top: var(--bh-space);
}

.bh-content h2 {
	font-size: var(--bh-fs-h2);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--bh-on-surface);
	margin-top: var(--bh-space-lg);
}

.bh-content h3 {
	font-size: var(--bh-fs-h3);
	font-weight: 600;
	color: var(--bh-on-surface);
	margin-top: var(--bh-space-lg);
}

.bh-content img {
	border-radius: var(--bh-radius-md);
	margin: var(--bh-space) 0;
}

.bh-content ul,
.bh-content ol {
	padding-left: 1.5em;
}

.bh-content blockquote {
	border-left: 4px solid var(--bh-primary);
	padding: var(--bh-space-sm) var(--bh-space);
	background: var(--bh-surface-alt);
	border-radius: 0 var(--bh-radius) var(--bh-radius) 0;
	font-style: italic;
	color: var(--bh-on-surface-variant);
}

/* ============================================================
   Single — Sticky CTA sidebar
   ============================================================ */

.bh-sidebar {
	position: relative;
}

.bh-cta-card {
	position: sticky;
	top: 100px;
	background: var(--bh-surface-alt);
	border: 1px solid var(--bh-surface-container);
	border-radius: var(--bh-radius-md);
	padding: var(--bh-space);
	box-shadow: var(--bh-shadow-card);
}

.bh-cta-card__title {
	font-size: var(--bh-fs-h3);
	font-weight: 700;
	margin: 0 0 var(--bh-space-sm);
	color: var(--bh-on-surface);
	letter-spacing: -0.01em;
}

.bh-cta-card__body {
	font-size: var(--bh-fs-md);
	color: var(--bh-on-surface-muted);
	margin: 0 0 var(--bh-space);
	line-height: 1.6;
}

.bh-cta-card .bh-btn {
	width: 100%;
	margin-bottom: var(--bh-space-sm);
}

.bh-cta-card .bh-btn:last-child {
	margin-bottom: 0;
}

/* ============================================================
   Single — Photos / lightbox triggers
   ============================================================ */

.bh-section-title {
	font-size: var(--bh-fs-h2);
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 var(--bh-space);
	color: var(--bh-on-surface);
}

.bh-photos {
	margin-bottom: var(--bh-space-xl);
}

.bh-photo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bh-space-sm);
}

.bh-photo {
	all: unset;
	cursor: pointer;
	border-radius: var(--bh-radius);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--bh-surface-container);
	display: block;
	position: relative;
	transition: transform var(--bh-duration) var(--bh-ease),
	            box-shadow var(--bh-duration) var(--bh-ease);
}

.bh-photo:hover,
.bh-photo:focus-visible {
	transform: scale(1.02);
	box-shadow: var(--bh-shadow-hover);
}

.bh-photo:focus-visible {
	outline: 3px solid var(--bh-primary);
	outline-offset: 2px;
}

.bh-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms var(--bh-ease);
}

/* ============================================================
   Related
   ============================================================ */

.bh-related {
	margin-bottom: var(--bh-space-xl);
}

/* ============================================================
   View-all link (shortcode)
   ============================================================ */

.bh-view-all {
	margin: var(--bh-space) 0 0;
	text-align: center;
}

/* ============================================================
   Lightbox
   ============================================================ */

.bh-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--bh-space);
	animation: bh-fade-in 200ms var(--bh-ease);
}

.bh-lightbox[hidden] {
	display: none;
}

@keyframes bh-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.bh-lightbox__img {
	max-width: 95vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: var(--bh-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bh-lightbox__close,
.bh-lightbox__prev,
.bh-lightbox__next {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--bh-radius-full);
	width: 48px;
	height: 48px;
	font-size: 28px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--bh-duration) var(--bh-ease);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.bh-lightbox__close:hover,
.bh-lightbox__prev:hover,
.bh-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.2);
}

.bh-lightbox__close { top: var(--bh-space); right: var(--bh-space); }
.bh-lightbox__prev  { left: var(--bh-space);  top: 50%; transform: translateY(-50%); }
.bh-lightbox__next  { right: var(--bh-space); top: 50%; transform: translateY(-50%); }

.bh-lightbox__counter {
	position: absolute;
	bottom: var(--bh-space);
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: var(--bh-fs-sm);
	font-family: var(--bh-font);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1023px) {

	.bh-page-title { font-size: 36px; }
	.bh-hero__title { font-size: 36px; }

	.bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.bh-layout {
		grid-template-columns: 1fr;
		gap: var(--bh-space);
	}

	.bh-cta-card {
		position: static;
	}

	.bh-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.bh-single .bh-container {
		padding-top: var(--bh-space);
		padding-bottom: var(--bh-space-lg);
	}

	.bh-archive .bh-container {
		padding-bottom: var(--bh-space-lg);
	}

	.bh-page-head {
		padding: var(--bh-space-lg) 0;
	}

	.bh-hero { min-height: 380px; }
}

@media (max-width: 767px) {

	.bh-gallery { font-size: 15px; }

	.bh-page-title { font-size: 30px; }
	.bh-hero__title { font-size: 28px; }
	.bh-section-title { font-size: 24px; }

	.bh-page-sub { font-size: var(--bh-fs-md); }

	.bh-grid {
		grid-template-columns: 1fr;
		gap: var(--bh-space-sm);
	}

	/* shortcode columns force 1-up on mobile too */
	.bh-gallery--shortcode .bh-grid {
		grid-template-columns: 1fr !important;
	}

	.bh-photo-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.bh-hero { min-height: 280px; }

	.bh-hero__inner {
		padding-top: var(--bh-space);
		padding-bottom: var(--bh-space);
	}

	.bh-content { font-size: var(--bh-fs-md); }
	.bh-content h2 { font-size: 24px; }
	.bh-content h3 { font-size: 20px; }

	.bh-card__body { padding: var(--bh-space-sm) var(--bh-space); }

	.bh-btn { padding: 14px 20px; }

	.bh-lightbox__close,
	.bh-lightbox__prev,
	.bh-lightbox__next {
		width: 44px;
		height: 44px;
		font-size: 24px;
	}

	.bh-lightbox__close { top: 12px; right: 12px; }
	.bh-lightbox__prev  { left: 8px; }
	.bh-lightbox__next  { right: 8px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.bh-gallery *,
	.bh-gallery *::before,
	.bh-gallery *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ============================================================
   Theme conflict overrides
   ------------------------------------------------------------
   The active WordPress theme wraps our <main> in a narrow
   content container and applies its own <a> color rules.
   This block forces a full-bleed layout and re-asserts our
   button styling at higher specificity.
   ============================================================ */

/* Full-bleed breakout: escape the theme's narrow content wrapper
   so the hero spans edge-to-edge. .bh-container inside still
   constrains content to 1200px and centers it.
   Uses position:relative + left:50% + margin-left:-50vw which
   wins against more themes than the calc() variant. */
body .bh-gallery.bh-gallery {
	position: relative !important;
	left: 50% !important;
	right: 50% !important;
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: -50vw !important;
	margin-right: -50vw !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
	clear: both !important;
}

/* Hide a sidebar that the theme is rendering on bh_project pages.
   These are the most common WP / page-builder sidebar selectors. */
body.single-bh_project #sidebar,
body.single-bh_project #secondary,
body.single-bh_project .sidebar,
body.single-bh_project .widget-area,
body.single-bh_project aside.sidebar,
body.single-bh_project .sidebar-primary,
body.single-bh_project .et_pb_sidebar,
body.single-bh_project .fl-sidebar,
body.single-bh_project .vc_sidebar {
	display: none !important;
}

/* Force the theme's content wrapper to full width on our pages. */
body.single-bh_project .content-area,
body.single-bh_project #primary,
body.single-bh_project .site-main,
body.single-bh_project #content,
body.single-bh_project main {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Make sure the hero image renders correctly. */
body .bh-gallery .bh-hero {
	width: 100% !important;
	max-width: none !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}

/* Buttons — force text to render, override theme link colors.
   Themes commonly do `.entry-content a { color: inherit }` or
   apply `text-indent`/`font-size: 0` button resets. */
.bh-gallery a.bh-btn,
.bh-gallery a.bh-btn:link,
.bh-gallery a.bh-btn:visited,
.bh-gallery a.bh-btn:hover,
.bh-gallery a.bh-btn:active,
.bh-gallery a.bh-btn:focus {
	text-indent: 0 !important;
	font-size: var(--bh-fs-md) !important;
	line-height: 1 !important;
	letter-spacing: 0.01em !important;
	text-decoration: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	display: inline-flex !important;
	overflow: visible !important;
	text-shadow: none !important;
	white-space: normal !important;
}

.bh-gallery a.bh-btn--primary,
.bh-gallery a.bh-btn--primary:link,
.bh-gallery a.bh-btn--primary:visited,
.bh-gallery a.bh-btn--primary:active {
	background: var(--bh-primary) !important;
	color: #ffffff !important;
	border-color: var(--bh-primary) !important;
}

.bh-gallery a.bh-btn--primary:hover,
.bh-gallery a.bh-btn--primary:focus {
	background: var(--bh-on-primary-container) !important;
	color: #ffffff !important;
}

.bh-gallery a.bh-btn--ghost,
.bh-gallery a.bh-btn--ghost:link,
.bh-gallery a.bh-btn--ghost:visited,
.bh-gallery a.bh-btn--ghost:active {
	background: transparent !important;
	color: var(--bh-primary) !important;
	border-color: var(--bh-primary) !important;
}

.bh-gallery a.bh-btn--ghost:hover,
.bh-gallery a.bh-btn--ghost:focus {
	background: var(--bh-primary) !important;
	color: #ffffff !important;
}

/* Sidebar CTA card buttons specifically — make sure full-width
   doesn't get clobbered by inline-block link overrides. */
.bh-gallery .bh-cta-card a.bh-btn {
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Defensive: re-assert breadcrumb link colors against
   theme link styles, plus card title links. */
.bh-gallery a.bh-card__link,
.bh-gallery a.bh-card__link:hover,
.bh-gallery a.bh-card__link:visited {
	color: inherit !important;
	text-decoration: none !important;
}

.bh-gallery .bh-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

/* Bump the version of the bh-gallery wrapper rules just enough
   to beat most theme `.entry-content`-style selectors. */
.bh-gallery .bh-container {
	max-width: var(--bh-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--bh-gutter);
	padding-right: var(--bh-gutter);
	width: 100%;
	box-sizing: border-box;
}
