/* Gallery / Our Work page-only section styles. Shared components live in components.css. */

/* ---------- Hero ---------- */

.gallery-hero-section {
	position: relative;
	overflow: hidden;
	padding: 5.625rem 0 6.875rem;
	min-height: 34rem;
	display: flex;
	align-items: center;
}

.gallery-hero-section__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.gallery-hero-section__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-hero-section__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(103deg, rgba(0, 0, 0, 0.78) 4%, rgba(0, 0, 0, 0.35) 58%), linear-gradient(90deg, rgba(29, 31, 101, 0.2), rgba(29, 31, 101, 0.2));
}

.gallery-hero-section__inner {
	position: relative;
	z-index: 1;
	/* max-width: 48rem; */
}

.gallery-hero-section__breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-primary);
	font-weight: var(--font-weight-medium);
	font-size: 1.125rem;
	color: #ffffff;
	margin-bottom: 1.5rem;
}

.gallery-hero-section__breadcrumb a {
	color: #ffffff;
}

.gallery-hero-section__breadcrumb a:hover {
	color: var(--primary-color);
}

.gallery-hero-section__breadcrumb-current {
	color: var(--primary-color);
}

.gallery-hero-section__eyebrow {
	margin-bottom: 1.5rem;
}

.gallery-hero-section__title {
	margin-bottom: 1.5rem;
}

.gallery-hero-section__title-accent {
	color: var(--primary-color);
}

.gallery-hero-section__text {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
	max-width: 36rem;
	margin-bottom: 2rem;
}

.gallery-hero-section__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

/* ---------- Stats strip ---------- */

.gallery-stats-section {
	background: #fbf8f3;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	padding: 2.5625rem 0;
}

.gallery-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.875rem;
}

.gallery-stat {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.125rem;
}

.gallery-stat__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 14px;
	background: #ffffff;
	color: var(--primary-color);
	box-shadow: var(--shadow-sm);
	flex-shrink: 0;
}

.gallery-stat__number,
.gallery-stat__label {
	display: block;
}

.gallery-stat__number {
	font-family: var(--font-primary);
	font-weight: var(--font-weight-extrabold);
	font-size: 2rem;
	letter-spacing: -0.02em;
	color: var(--heading-color);
}

.gallery-stat__label {
	color: var(--text-color-light);
	font-size: 1.0625rem;
}

/* ---------- Project categories ---------- */

.gallery-categories-section {
	padding: var(--section-spacing) 0 3.75rem;
	background: #ffffff;
}

.gallery-categories-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1.125rem;
}

.gallery-category-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	background: #ffffff;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 1.5625rem 1.1875rem;
	font-family: var(--font-secondary);
	cursor: pointer;
	transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.gallery-category-tile:hover {
	border-color: var(--primary-color);
	transform: translateY(-2px);
}

.gallery-category-tile__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 13px;
	background: var(--eyebrow-bg);
	flex-shrink: 0;
}

.gallery-category-tile__icon img {
	display: block;
	width: 22px;
	height: 22px;
}

.gallery-category-tile__label {
	font-family: var(--font-primary);
	font-weight: var(--font-weight-semibold);
	font-size: 1.125rem;
	color: var(--heading-color);
	text-align: center;
}

.gallery-category-tile__count {
	color: var(--text-color-light);
	font-size: 1rem;
}

.gallery-category-tile.is-active {
	background: var(--primary-color);
	border-color: var(--primary-color);
	box-shadow: var(--shadow-cta);
}

.gallery-category-tile.is-active .gallery-category-tile__icon {
	background: rgba(255, 255, 255, 0.22);
}

.gallery-category-tile.is-active .gallery-category-tile__icon img {
	filter: brightness(0) invert(1);
}

.gallery-category-tile.is-active .gallery-category-tile__label {
	color: #ffffff;
}

.gallery-category-tile.is-active .gallery-category-tile__count {
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- Gallery grid ---------- */

.gallery-grid-section {
	padding: 0 0 var(--section-spacing);
	background: #ffffff;
}

.gallery-grid-section__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 2rem;
}

.gallery-grid-section__count {
	margin: 0;
	font-family: var(--font-primary);
	font-weight: var(--font-weight-semibold);
	font-size: 1.1875rem;
	color: var(--heading-color);
}

.gallery-grid-section__count [data-gallery-showing-count],
.gallery-grid-section__count [data-gallery-total-count] {
	color: var(--primary-color);
	font-weight: var(--font-weight-semibold);
}

.gallery-grid-section__sort {
	margin: 0;
	font-family: var(--font-primary);
	font-size: 1.125rem;
	color: var(--text-color-light);
}

.gallery-grid-section__sort span {
	font-weight: var(--font-weight-semibold);
	color: var(--heading-color);
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
}

.gallery-card {
	border: 1px solid var(--border-color);
	border-radius: var(--radius-xl);
	overflow: hidden;
	background: #ffffff;
	background-image: linear-gradient(160deg, #efe6d6, #dbc9ae);
}

.gallery-card[hidden] {
	display: none;
}

.gallery-card__media {
	aspect-ratio: 5 / 4;
	overflow: hidden;
}

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

.gallery-card__body {
	background: #ffffff;
	padding: 1.4375rem 1.625rem 1.625rem;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.gallery-card__title {
	font-size: 1.3125rem;
	margin: 0;
}

.gallery-card__meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text-color-light);
	font-size: 1.0625rem;
}

.gallery-card__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #d9c7ac;
	flex-shrink: 0;
}

.gallery-grid-section__empty {
	text-align: center;
	color: var(--text-color-light);
	margin: 3rem 0 0;
}

.gallery-grid-section__footer {
	display: flex;
	justify-content: center;
	margin-top: 1.25rem;
}

/* ---------- Featured project ---------- */

.gallery-featured-section {
	padding: var(--section-spacing) 0;
	background: var(--light-bg);
}

.gallery-featured-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 4rem;
	align-items: center;
}

.gallery-featured-media {
	position: relative;
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	background: linear-gradient(160deg, #efe6d6, #dbc9ae);
}

.gallery-featured-media__img {
	width: 100%;
	aspect-ratio: 5 / 4;
	object-fit: cover;
	display: block;
}

.gallery-featured-content__title {
	margin: 0.6rem 0 1rem;
}

.gallery-featured-content__text {
	margin-bottom: 0;
}

.gallery-featured-stats {
	display: flex;
	gap: 1.125rem;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	padding: 1.5625rem 0;
	margin: 1.75rem 0;
}

.gallery-featured-stats__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.gallery-featured-stats__value {
	font-family: var(--font-primary);
	font-weight: var(--font-weight-extrabold);
	font-size: 1.875rem;
	letter-spacing: -0.02em;
	color: var(--primary-color);
}

.gallery-featured-stats__label {
	color: var(--text-color-light);
	font-size: 1rem;
}

/*
 * .gallery-featured-section (right before the shared CTA banner) is
 * var(--light-bg), so give the CTA banner wrapper white here to keep the
 * alternation going instead of two light-tint sections back to back.
 */
body.page-template-template-gallery .cta-banner-section {
	background: #ffffff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
	.gallery-categories-grid {
		grid-template-columns: repeat(3, 1fr);
	}

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

@media (max-width: 991.98px) {
	.gallery-stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}

	.gallery-featured-grid {
		grid-template-columns: 1fr;
	}

	.gallery-featured-media__img {
		height: 24rem;
	}
}

@media (max-width: 767.98px) {
	.gallery-categories-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.gallery-grid {
		grid-template-columns: 1fr;
	}

	.gallery-featured-stats {
		flex-wrap: wrap;
	}

	.gallery-featured-stats__item {
		flex: 1 1 40%;
	}
}

@media (max-width: 575.98px) {
	.gallery-stats-grid {
		grid-template-columns: 1fr;
	}

	.gallery-categories-grid {
		grid-template-columns: 1fr;
	}

	.gallery-grid-section__toolbar {
		flex-direction: column;
		align-items: flex-start;
	}
}
