/*
 * TPF — Our Work Grid
 * Full-bleed navy section: filter dropdown on top, gapless image grid below.
 * Tile aspect ratio matches the design (~540×338 → ~1.6:1).
 */

.tpf-owg {
	background-color: #293c7b;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 0;
	padding: 3.5rem 0 0;
	color: #ffffff;
}

/* ---------- Filter ---------- */

.tpf-owg__filter-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 0 1.5rem 3rem;
	font-family: proxima-nova, "Proxima Nova", -apple-system, BlinkMacSystemFont, sans-serif;
}

.tpf-owg__filter-prefix {
	font-size: 29px;
	font-weight: 400;
	color: #ffffff;
	line-height: 1;
}

.tpf-owg__filter {
	position: relative;
}

.tpf-owg__filter-toggle {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 1px solid #57aee6;
	color: #57aee6;
	font: inherit;
	font-weight: 700;
	font-size: 29px;
	line-height: 1;
	padding: 0.4em 1em;
	min-width: 204px;
	height: 50px;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tpf-owg__filter-toggle:hover,
.tpf-owg__filter-toggle:focus-visible {
	background-color: #57aee6;
	color: #ffffff;
	outline: none;
}

.tpf-owg__filter-caret {
	width: 12px;
	height: 7px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.tpf-owg__filter[aria-open="true"] .tpf-owg__filter-caret {
	transform: rotate(180deg);
}

.tpf-owg__filter-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 0.25rem 0;
	list-style: none;
	background: #293c7b;
	border: 1px solid #57aee6;
	z-index: 10;
	max-height: 60vh;
	overflow-y: auto;
	display: none;
}

.tpf-owg__filter[aria-open="true"] .tpf-owg__filter-menu {
	display: block;
}

.tpf-owg__filter-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpf-owg__filter-option {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	color: #ffffff;
	font: inherit;
	font-size: 18px;
	font-weight: 400;
	text-align: left;
	width: 100%;
	padding: 0.6rem 1rem;
	cursor: pointer;
}

.tpf-owg__filter-option:hover,
.tpf-owg__filter-option:focus-visible {
	background-color: #57aee6;
	color: #ffffff;
	outline: none;
}

.tpf-owg__filter-option.is-active {
	color: #57aee6;
	font-weight: 700;
}

/* ---------- Grid ---------- */

.tpf-owg__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
}

.tpf-owg[data-columns="2"] .tpf-owg__grid {
	grid-template-columns: repeat(2, 1fr);
}

.tpf-owg[data-columns="4"] .tpf-owg__grid {
	grid-template-columns: repeat(4, 1fr);
}

.tpf-owg__tile {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1.6 / 1;
	text-decoration: none;
	color: #ffffff;
	background-color: #1f2d5e;
	font-family: proxima-nova, "Proxima Nova", -apple-system, BlinkMacSystemFont, sans-serif;
}

.tpf-owg__tile.is-hidden,
.tpf-owg__tile.is-lazy-hidden {
	display: none;
}

/* ---------- Load More ---------- */

.tpf-owg__load-more {
	display: flex;
	justify-content: center;
	padding: 2.5rem 1.5rem;
}

.tpf-owg__load-more[hidden] {
	display: none;
}

.tpf-owg__load-more-btn {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 1px solid #57aee6;
	color: #57aee6;
	font-family: proxima-nova, "Proxima Nova", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 20px;
	font-weight: 700;
	padding: 0.75em 2.5em;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tpf-owg__load-more-btn:hover,
.tpf-owg__load-more-btn:focus-visible {
	background-color: #57aee6;
	color: #ffffff;
	outline: none;
}

.tpf-owg__tile-image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.tpf-owg__tile-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.66);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.tpf-owg__tile-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 1.5rem;
	text-align: center;
	color: #ffffff;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.tpf-owg__tile:hover .tpf-owg__tile-overlay,
.tpf-owg__tile:focus-visible .tpf-owg__tile-overlay,
.tpf-owg__tile:hover .tpf-owg__tile-content,
.tpf-owg__tile:focus-visible .tpf-owg__tile-content {
	opacity: 1;
}

.tpf-owg__tile-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #ffffff;
	margin: 0;
}

.tpf-owg__tile-divider {
	display: block;
	width: 172px;
	max-width: 60%;
	height: 2px;
	background-color: #57AEE6;
}

.tpf-owg__tile-subtitle {
	font-size: 20px;
	font-weight: 300;
	line-height: 1.3;
	color: #ffffff;
}

.tpf-owg__tile-subtitle:empty {
	display: none;
}

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

@media (max-width: 1024px) {
	.tpf-owg[data-columns="4"] .tpf-owg__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.tpf-owg {
		padding-top: 2.5rem;
	}
	.tpf-owg__filter-wrap {
		flex-direction: column;
		gap: 0.75rem;
		padding-bottom: 2rem;
	}
	.tpf-owg__filter-prefix {
		font-size: 22px;
	}
	.tpf-owg__filter-toggle {
		font-size: 22px;
		height: 44px;
		min-width: 200px;
	}
	.tpf-owg__grid,
	.tpf-owg[data-columns="3"] .tpf-owg__grid,
	.tpf-owg[data-columns="4"] .tpf-owg__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.tpf-owg__grid,
	.tpf-owg[data-columns="2"] .tpf-owg__grid,
	.tpf-owg[data-columns="3"] .tpf-owg__grid,
	.tpf-owg[data-columns="4"] .tpf-owg__grid {
		grid-template-columns: 1fr;
	}
}
