.elr-projects,
.elr-projects * {
	box-sizing: border-box;
}

.elr-projects {
	--elr-project-accent: #a88722;
	--elr-project-text: #22221f;
	width: 100%;
	max-width: 1440px;
	margin-right: auto;
	margin-left: auto;
}

.elr-project-filters {
	display: grid;
	grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) 1fr auto auto;
	align-items: center;
	gap: 10px;
	margin-bottom: clamp(26px, 4vw, 52px);
}

.elr-project-filters label {
	display: block;
}

.elr-project-filters select {
	width: 100%;
	min-height: 42px;
	padding: 8px 38px 8px 13px;
	border: 1px solid #d9d9d5;
	border-radius: 10px;
	background-color: #fff;
	color: #282825;
	font-size: 13px;
	
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23222222' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
}

.elr-project-sort {
	grid-column: 4;
}

.elr-project-filter-submit {
	min-height: 42px;
	padding: 8px 18px;
	border: 1px solid var(--elr-project-accent);
	background: var(--elr-project-accent);
	color: #fff;
	cursor: pointer;
}

.elr-project-filters.has-js .elr-project-filter-submit {
	display: none;
}

.elr-project-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 2vw, 40px) 40px;
}

.elr-project-card {
	min-width: 0;
}

.elr-project-card--featured {
	grid-column: 1 / -1;
}

.elr-project-image-link {
	position: relative;
	display: block;
	overflow: hidden;
	background: #2e2e2a;
	color: #fff;
	text-decoration: none;
}

.elr-project-card--featured .elr-project-image-link {
	aspect-ratio: 2.25 / 1;
}

.elr-project-card:not(.elr-project-card--featured) .elr-project-image-link {
	aspect-ratio: 1.38 / 1;
}

.elr-project-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}

.elr-project-image-link:hover .elr-project-image,
.elr-project-image-link:focus-visible .elr-project-image {
	transform: scale(1.025);
}

.elr-project-image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 280px;
	color: #fff;
}

.elr-project-card--featured .elr-project-image-link::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .82) 100%);
	content: "";
	pointer-events: none;
}

.elr-project-feature-content {
	position: absolute;
	right: clamp(24px, 4vw, 55px);
	bottom: clamp(22px, 4vw, 48px);
	left: clamp(24px, 4vw, 55px);
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	color: #fff;
}

.elr-project-feature-label,
.elr-project-feature-title,
.elr-project-feature-meta {
	grid-column: 1;
}

.elr-project-feature-label {
	justify-self: start;
	margin-bottom: 7px;
	padding: 3px 8px;
	background: var(--elr-project-accent);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.elr-project-feature-title {
	font-size: clamp(17px, 1.6vw, 22px);
	font-weight: 700;
	line-height: 1.25;
}

.elr-project-feature-meta {
	margin-top: 7px;
	font-size: 13px;
}

.elr-project-feature-link {
	grid-column: 2;
	grid-row: 1 / span 3;
	align-self: end;
	padding-bottom: 2px;
	font-size: 14px;
}

.elr-project-card-content {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 2px 0;
}

.elr-project-card-title {
	margin: 0;
	font-size: clamp(17px, 1.6vw, 22px);
	font-weight: 700;
	line-height: 1.25;
}

.elr-project-card-title a,
.elr-project-card-link {
	color: var(--elr-project-text);
	text-decoration: none;
}

.elr-project-card-meta {
	margin-top: 5px;
	color: #70706b;
	font-size: 12px;
}

.elr-project-card-link {
	flex: 0 0 auto;
	padding-bottom: 2px;
	font-size: 14px;
}

.elr-projects-empty {
	padding: 28px;
	background: #f3f3ef;
	text-align: center;
}

@media (max-width: 767px) {
	.elr-project-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.elr-project-sort {
		grid-column: 1;
	}

	.elr-project-grid {
		grid-template-columns: 1fr;
	}

	.elr-project-card--featured {
		grid-column: auto;
	}

	.elr-project-card--featured .elr-project-image-link,
	.elr-project-card:not(.elr-project-card--featured) .elr-project-image-link {
		aspect-ratio: 1.25 / 1;
	}
	
	.elr-project-card-content {
		padding-bottom:20px;	
	}

	.elr-project-feature-content {
		right: 22px;
		bottom: 22px;
		left: 22px;
		grid-template-columns: 1fr;
	}

	.elr-project-feature-link {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
		margin-top: 14px;
	}
}

@media (max-width: 480px) {
	.elr-project-filters {
		grid-template-columns: 1fr;
	}

	.elr-project-sort {
		grid-column: auto;
	}

	.elr-project-card-content {
		align-items: flex-start;
		flex-direction: column;
		gap: 9px;		
	}
}

@media (prefers-reduced-motion: reduce) {
	.elr-project-image {
		transition: none;
	}
}
