.tpl-gallery__top {
	height: var(--header-mob);
	@media (min-width: 63.75em) {  /* 1020px tabletLandscape */
		display: none;
	}
}

.pin-spacer {
	margin-bottom: 0 !important;
}

.c-galgrid-wrap--outer {
	position: relative;
	overflow: hidden;
	padding-top: 80px;

	@media (min-width: 78.75em) {  /* 1260px desktop */
		padding-top: 100px;
	}
	@media (max-width: 63.74em) {
		display: none;
	}
}

.c-galgrid-wrap {
	position: relative;
	width: 100%;
	height: calc(100svh - 80px);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 40vh !important;
	overflow: hidden;
	background-color: #10234B;
	background-image: url('../img/curved_wavy.svg');
	background-repeat: repeat;
	background-size: 100px auto;

	@media (min-width: 78.75em) {  /* 1260px desktop */
		height: calc(100svh - 100px);
	}
}

/* Gallery container */
.c-galgrid {
	position: relative;
	width: 100%;
	height: 100%;
	flex: none;
}

.c-galgrid__item {
	position: relative;
	background-position: 50% 50%;
	background-size: cover;
	background-repeat: no-repeat;
	flex: none;
	filter: brightness(1);
	width: 100%;
	aspect-ratio: 3 / 4;
}

.c-galgrid__caption {
	z-index: 101;
	color: white;
	font-weight: 400;
	text-align: center;
	text-transform: uppercase;

	font-size: 3.125rem; /* 50px */
	html.wf-coignpro47-n7-active:not(.a11y--font-diff) & {
		font-family: var(--font-title);
		font-size: clamp(6.375rem, 8vw, 9.375rem); /* 102px 150px */
		letter-spacing: 0.05em;
		line-height: clamp(calc(6.375rem - 38px), 8vw, calc(9.375rem - 38px)); /* 102px 150px */
	}
}

.c-galgrid__caption--inner {
	padding-inline: 20px;
}

/* -----------------------------------------------------------------------
   Grid10 layout — spread state (initial, before scroll)
   ----------------------------------------------------------------------- */
.c-galgrid--grid10 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	width: 100%;

	@media (min-width: 63.75em) and (max-width: 87.49em) {
		/* 1020–1399px — 8 columns for better 3/4 proportions */
		grid-template-columns: repeat(8, 1fr);
		grid-template-rows: repeat(4, 1fr);
		height: 100%;
		gap: 0;
	}

	@media (min-width: 87.5em) {   /* 1400px+ — 10 columns */
		grid-template-columns: repeat(10, 1fr);
		grid-template-rows: repeat(4, 1fr);
		height: 100%;
		gap: 0;
	}

	& .c-galgrid__item {

		@media (min-width: 63.75em) {  /* Items fill their grid cell — proportions controlled by column count */
			aspect-ratio: auto;
			height: 100%;
		}
	}

	/* Caption — positioned off-screen in spread state */

	& .c-galgrid__caption {
		position: absolute;
		width: 100vw;
		height: 100vh;
		inset: 0 auto auto 0;
		margin: 100svh 0 0 0;
		display: grid;
		place-content: center;
	}
}

.c-galgrid--switch.c-galgrid--grid10 {
	grid-template-rows: 1fr auto 1fr;
	grid-template-columns: 1fr 510px 1fr;
	grid-gap: 0;
	align-items: center;
}

.c-galgrid--switch.c-galgrid--grid10 .c-galgrid__item {
	grid-row-start: 2;
	grid-column-start: 2;
	grid-row-end: 3;
	grid-column-end: 3;
	aspect-ratio: 170 / 227;
	width: 100%;
	height: auto;
	filter: brightness(0.75);
}

/* Caption slides into view — centered on screen */
.c-galgrid--switch.c-galgrid--grid10 .c-galgrid__caption {
	opacity: 1;
	margin-top: -100px;
}

/* -----------------------------------------------------------------------
   Grid position map — 8 columns (1020–1399px), spread state only
   ----------------------------------------------------------------------- */
@media (min-width: 63.75em) and (max-width: 87.49em) {
	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-1 {
		grid-row-start: 1;
		grid-column-start: 1;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-2 {
		grid-row-start: 1;
		grid-column-start: 2;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-3 {
		grid-row-start: 1;
		grid-column-start: 4;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-4 {
		grid-row-start: 1;
		grid-column-start: 5;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-5 {
		grid-row-start: 3;
		grid-column-start: 5;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-6 {
		grid-row-start: 1;
		grid-column-start: 7;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-7 {
		grid-row-start: 1;
		grid-column-start: 8;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-8 {
		grid-row-start: 3;
		grid-column-start: 8;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-9 {
		grid-row-start: 2;
		grid-column-start: 7;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-10 {
		grid-row-start: 4;
		grid-column-start: 8;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-11 {
		grid-row-start: 3;
		grid-column-start: 7;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-12 {
		grid-row-start: 2;
		grid-column-start: 2;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-13 {
		grid-row-start: 3;
		grid-column-start: 1;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-14 {
		grid-row-start: 3;
		grid-column-start: 4;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-15 {
		grid-row-start: 4;
		grid-column-start: 3;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-16 {
		grid-row-start: 4;
		grid-column-start: 6;
	}
}

/* -----------------------------------------------------------------------
   Grid position map — 10 columns (1400px+), spread state only
   ----------------------------------------------------------------------- */
@media (min-width: 87.5em) {
	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-1 {
		grid-row-start: 1;
		grid-column-start: 1;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-2 {
		grid-row-start: 1;
		grid-column-start: 2;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-3 {
		grid-row-start: 1;
		grid-column-start: 4;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-4 {
		grid-row-start: 1;
		grid-column-start: 5;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-5 {
		grid-row-start: 3;
		grid-column-start: 6;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-6 {
		grid-row-start: 1;
		grid-column-start: 7;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-7 {
		grid-row-start: 1;
		grid-column-start: 9;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-8 {
		grid-row-start: 3;
		grid-column-start: 10;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-9 {
		grid-row-start: 2;
		grid-column-start: 8;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-10 {
		grid-row-start: 4;
		grid-column-start: 9;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-11 {
		grid-row-start: 3;
		grid-column-start: 8;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-12 {
		grid-row-start: 2;
		grid-column-start: 2;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-13 {
		grid-row-start: 3;
		grid-column-start: 1;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-14 {
		grid-row-start: 3;
		grid-column-start: 4;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-15 {
		grid-row-start: 4;
		grid-column-start: 3;
	}

	.c-galgrid--grid10:not(.c-galgrid--switch) .pos-16 {
		grid-row-start: 4;
		grid-column-start: 7;
	}
}


.c-filtgal {
	padding-block: 60px;
	@media (min-width: 63.75em) {  /* 1020px tabletLandscape */
		margin-block: 80px;
	}
}

.c-filtgal__title {
	font-size: clamp(2rem, 4vw, 3rem); /* 32px 48px */
	font-weight: 700;
	text-transform: uppercase;
	color: var(--brand-1);
	margin-bottom: 40px;
	text-align: center;

	html.wf-tradegothicltstd-n7-active & {
		font-family: var(--font-tradeg);
	}
}

.c-filtgal__select-wrap {
	display: block;
	margin-bottom: 30px;
	padding: 0 20px;

	@media (min-width: 63.75em) {  /* 1020px tabletLandscape */
		display: none;
	}
}

.c-filtgal__select {
	display: block;
	width: 100%;
	height: 56px;
	padding: 0 50px 0 24px;
	border: 2px solid var(--brand-1);
	border-radius: var(--radius-round);
	background-color: transparent;
	color: var(--brand-1);
	font-family: var(--font-tradeg);
	font-size: 1rem; /* 16px */
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232d2926' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 20px center;
	background-size: 16px;
}

.c-filtgal__filters {
	display: none;
	margin-bottom: 60px;
	align-items: center;
	gap: 0;

	@media (min-width: 63.75em) {  /* 1020px tabletLandscape */
		display: flex;
	}
}

.c-filtgal__filters-line {
	flex: 1;
	height: 0;
	border-top: 3px dashed var(--brand-1);
}

.c-filtgal__filters-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding: 0 20px;
}

.c-filtgal__filter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	padding: 10px 25px;
	border: 2px solid var(--brand-1);
	border-radius: var(--radius-round);
	background: transparent;
	color: var(--brand-1);
	font-family: var(--font-tradeg);
	font-size: 1.125rem; /* 18px */
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
	white-space: nowrap;

	&:hover {
		background-color: var(--brand-1);
		color: #fff;
	}

	&.is_active {
		background-color: var(--brand-1);
		color: #fff;
	}
}

.c-filtgal__grid {
	width: 100%;
	display: grid;
	grid-template-columns: 100%;
	gap: 16px;

	@media (min-width: 43.75em) {  /* 700px  tabletPortrait */
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	@media (min-width: 63.75em) {  /* 1020px tabletLandscape */
		grid-template-columns: repeat(3, 1fr);
		gap: 40px;
	}
	.c-filtgal__item--landscape,
	.c-filtgal__item--square,
	.c-filtgal__item--portrait {
		width: 100%;
	}
}

.c-filtgal__col {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.c-filtgal__item {
	position: relative;
	border: 10px solid white;
	overflow: hidden;
	background-color: var(--brand-2);
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.20);
	transition: opacity 0.35s ease, transform 0.35s ease;

	&.is_fading {
		opacity: 0;
		transform: scale(0.95);
	}

	&.is_hidden {
		display: none;
	}

	&[data-cats=""] {
		cursor: pointer;
	}

	.c-filtgal__item-imgw,
	.c-filtgal__item-videow {
		position: relative;
		overflow: hidden;
		width: 100%;
		display: block;
	}
	&.c-filtgal__item--landscape .c-filtgal__item-imgw,
	&.c-filtgal__item--landscape .c-filtgal__item-videow {
		aspect-ratio: 4 / 3;
	}

	&.c-filtgal__item--square .c-filtgal__item-imgw,
	&.c-filtgal__item--square .c-filtgal__item-videow {
		aspect-ratio: 1 / 1;
	}

	&.c-filtgal__item--portrait .c-filtgal__item-imgw,
	&.c-filtgal__item--portrait .c-filtgal__item-videow {
		aspect-ratio: 4 / 5;
	}
	&.c-filtgal__item--landscape .c-filtgal__item-imgw,
	&.c-filtgal__item--landscape .c-filtgal__item-videow {
		aspect-ratio: 4 / 3;
	}

	&.c-filtgal__item--square .c-filtgal__item-imgw,
	&.c-filtgal__item--square .c-filtgal__item-videow {
		aspect-ratio: 1 / 1;
	}

	&.c-filtgal__item--portrait .c-filtgal__item-imgw,
	&.c-filtgal__item--portrait .c-filtgal__item-videow {
		aspect-ratio: 4 / 5;
	}
	&:hover {
		.c-filtgal__item-img {
			transform: scale(1.04);
		}
		.c-filtgal__item-caption {
			opacity: 1;
		}
	}
}

.c-filtgal__item-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.c-filtgal__item-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.c-filtgal__item-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
	color: white;
	font-size: 0.875rem; /* 14px */
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.c-filtgal__item-play {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	display: flex;
	align-items: center;
	text-decoration: none;
	color: black;

	&:hover, &:focus {
		text-decoration: none;
	}
	&:hover {
		.c-filtgal__play-icon {
			transform: translateX(0);
		}
	}
}

.c-filtgal__play-icon {
	color: white;
	border-radius: var(--radius-round);
	background-color: var(--brand-1);
	outline: 1.5px solid var(--color-bg);
	outline-offset: -3px;
	font-size: 1rem; /* 16px */
	width: 40px;
	height: 40px;
	display: grid;
	place-content: center;
	transform: translateX(20px);
	transition: transform 0.3s ease;
}

.c-filtgal__play-text {
	font-family: var(--font-tradeg);
	background-color: var(--brand-3);
	border: 2px solid white;
	text-transform: uppercase;
	font-size: 1rem; /* 16px */
	font-weight: 700;
	padding-inline: 20px 5px;
	padding-block: 5px;
	white-space: nowrap;
	box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.30);
	color: var(--brand-1);
}

.c-filtgal__item-play {
	opacity: 0.9;
	&:hover {
		transform: translate(-50%, -50%) scale(1.05);
		opacity: 1;
	}
}
