/* -----------------------------------------------------------
   Gallery page
----------------------------------------------------------- */

body.is-gallery-page .site-header {
	background: #0a3d2c;
}

.gallery-header {
	background: #0a3d2c;
	padding: 48px 0 40px;
	text-align: center;
}

.gallery-header h1 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 36px;
	color: #ffffff;
	margin: 0 0 8px;
}

.gallery-header p {
	font-family: var(--font-alt);
	font-weight: 400;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
}

.gallery-content {
	background: var(--c-cream);
	padding: 32px 0 80px;
}

.gallery-section {
	margin-bottom: 32px;
}

.gallery-section__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.gallery-section__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}

.gallery-section__row .gallery-section__heading {
	margin-bottom: 0;
}

.gallery-section__bar {
	width: 4px;
	height: 32px;
	border-radius: 999px;
	background: #24624c;
	flex-shrink: 0;
}

.gallery-section h2 {
	font-family: var(--font-alt);
	font-weight: 700;
	font-size: 30px;
	color: #00171f;
	margin: 0;
}

/* Featured card */
.featured-card {
	background: #f3f0e4;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 14px;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.featured-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.featured-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.featured-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(36, 98, 76, 0.9);
	color: #f3f0e4;
	font-family: var(--font-alt);
	font-weight: 500;
	font-size: 12px;
	padding: 2px 10px;
	border-radius: 8px;
}

.featured-card__badge img {
	width: 12px;
	height: 12px;
}

.featured-card__content {
	padding: 40px 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
}

.featured-card__content h3 {
	font-family: var(--font-alt);
	font-weight: 700;
	font-size: 30px;
	color: #00171f;
	margin: 0;
}

.featured-card__content p {
	font-family: var(--font-alt);
	font-weight: 400;
	font-size: 18px;
	color: #667479;
	margin: 0 0 8px;
}

.btn-watch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #24624c;
	color: #f3f0e4;
	font-family: var(--font-alt);
	font-weight: 500;
	font-size: 14px;
	padding: 8px 16px;
	border-radius: 8px;
	width: max-content;
	border: 0;
	cursor: pointer;
}

/* Filters + showing count */
.gallery-filters {
	display: flex;
	gap: 12px;
}

.gallery-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #f3f0e4;
	border: none;
	border-radius: 8px;
	padding: 9px 13px;
	font-family: var(--font-alt);
	font-weight: 500;
	font-size: 14px;
	color: #0a0a0a;
	cursor: pointer;
}

.gallery-filter img {
	width: 16px;
	height: 16px;
}

.gallery-filter__chevron {
	margin-left: auto;
}

.gallery-showing {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-alt);
	font-weight: 500;
	font-size: 14px;
	color: #0a0a0a;
	margin: 0 0 24px;
}

.gallery-showing__badge {
	background: #f3f0e4;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 12px;
}

/* Masonry grid */
.gallery-grid {
	columns: 4;
	column-gap: 24px;
}

.gallery-card {
	display: block;
	width: 100%;
	break-inside: avoid;
	margin-bottom: 24px;
	background: #f3f0e4;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 14px;
	overflow: hidden;
	padding: 0;
	text-align: left;
	font: inherit;
	cursor: pointer;
}

.gallery-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
}

.gallery-card__media--tall {
	aspect-ratio: 2 / 3;
}

.gallery-card.is-hidden {
	display: none;
}

.gallery-load-more {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.btn-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 24px;
	padding: 12px 32px;
	border-radius: 57px;
	border: none;
	background: var(--c-dark-green);
	color: var(--c-cream);
	cursor: pointer;
}

.btn-load-more:hover {
	opacity: 0.9;
}

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

.gallery-card__type-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(36, 98, 76, 0.9);
	border-radius: 8px;
	padding: 2px 6px;
}

.gallery-card__type-badge img {
	width: 12px;
	height: 12px;
}

.gallery-card__label-badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 8px;
	padding: 2px 8px;
	font-family: var(--font-alt);
	font-weight: 500;
	font-size: 12px;
	color: #00171f;
}

.gallery-card__content {
	padding: 12px;
}

.gallery-card__content h3 {
	font-family: var(--font-alt);
	font-weight: 600;
	font-size: 14px;
	color: #00171f;
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gallery-card__content p {
	font-family: var(--font-alt);
	font-weight: 400;
	font-size: 12px;
	color: #667479;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 1100px) {
	.gallery-grid {
		columns: 3;
	}
}

@media (max-width: 900px) {
	.featured-card {
		grid-template-columns: 1fr;
	}

	.featured-card__content {
		padding: 32px 24px;
	}

	.gallery-grid {
		columns: 2;
	}
}

@media (max-width: 640px) {
	.gallery-section__row {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Figma node 1026:11442: a rigid 2-column grid with uniform card
	   heights, not the desktop's Pinterest-style masonry — the "tall"
	   variant (2/3 aspect) is neutralized below so every image gets the
	   same 3/2 crop. */
	.gallery-grid {
		columns: initial;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.gallery-card {
		margin-bottom: 0;
	}

	.gallery-card__media,
	.gallery-card__media--tall {
		aspect-ratio: 3 / 2;
	}

	.gallery-card__type-badge {
		top: 8px;
		right: 8px;
		padding: 4px 8px;
	}

	.gallery-card__label-badge {
		left: 8px;
		bottom: 16px;
		font-size: 10px;
		line-height: 15px;
	}

	.gallery-card__content {
		padding: 8px 12px 12px;
	}

	.gallery-card__content h3 {
		font-size: 13px;
		line-height: 18.2px;
	}

	.gallery-card__content p {
		font-size: 11px;
		line-height: 14.3px;
	}

	/* Figma node 1026:11535: the "Showing:" row is its own filled pill
	   (not a plain text line with just the count badge filled), sitting
	   under the All Events / All Types filters. */
	.gallery-showing {
		background: #f3f0e4;
		border-radius: 10px;
		padding: 12px 16px;
		gap: 12px;
		font-family: var(--font-alt);
		font-weight: 400;
		font-size: 13px;
		line-height: 19.5px;
		color: #667479;
		margin: 0 0 24px;
	}

	.gallery-showing__badge {
		background: rgba(36, 98, 76, 0.1);
		border-radius: 8px;
		padding: 4px 8px;
		font-family: var(--font-alt);
		font-weight: 500;
		font-size: 11px;
		line-height: 16.5px;
		color: #24624c;
	}
}

/* Lightbox modal */
.gallery-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

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

.gallery-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(5, 32, 23, 0.9);
}

.gallery-modal__card {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
	max-width: 1029px;
	max-height: calc(100vh - 80px);
	width: 100%;
}

.gallery-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.5);
	border: 0;
	cursor: pointer;
	padding: 12px;
}

.gallery-modal__close img {
	width: 24px;
	height: 24px;
}

.gallery-modal__media {
	position: relative;
	background: #000000;
	max-height: calc(100vh - 80px);
	display: flex;
}

.gallery-modal__media img#gallery-modal-image {
	width: 100%;
	max-height: calc(100vh - 80px);
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.gallery-modal__gradient {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

.gallery-modal__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	padding: 5px 14px 5px 10px;
	margin-bottom: 14px;
}

.gallery-modal__badge img {
	width: 16px;
	height: 16px;
}

.gallery-modal__badge span {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 12px;
	color: #ffffff;
	text-transform: uppercase;
}

.gallery-modal__gradient h3 {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 28px;
	color: #ffffff;
	margin: 0;
}

@media (max-width: 640px) {
	.gallery-modal {
		padding: 16px;
	}

	.gallery-modal__gradient h3 {
		font-size: 20px;
	}
}
