/* recent projects widget */
.recent-projects {
	position: relative;
}

.recent-project.diagonal::before {
	z-index: 2;
}

.recent-projects-container {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	background-color: var(--color-secondary);
	max-width: 100%;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.recent-projects > .recent-projects-title {
	text-align: center;
	position: absolute;
	top: 50%;
	left: 50%;
	translate: -50% -50%;
	z-index: 6;
	pointer-events: none;
	font-size: clamp(4rem, 4vw, 6.4rem);
	width: 100%;
	transition: 0.2s;
}

.recent-projects:hover > .recent-projects-title {
	opacity: 0;
}

.recent-project {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	position: relative;
	aspect-ratio: 1/1;
	overflow: hidden;
	border-right: 0.1rem solid var(--color-secondary);
}

.recent-project:last-child {
	border-right: none !important;
}

.recent-project-details {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: clamp(4rem, 4vw, 7rem);
	display: flex;
	flex-direction: column;
	z-index: 5;
	translate: calc(-50% + 3.5rem) calc(-50% + 3.5rem);
	transition: 0.4s;
}

.recent-project-details .recent-project-title,
.recent-project-details ul {
	color: transparent;
	position: relative;
	z-index: 4;
}

.recent-project:hover .recent-project-details {
	translate: 0 0;
	transition: 0.4s;
}

.recent-project-details::before {
	content: '';
	display: block;
	position: absolute;

	width: 0;
	height: 0;
	border-style: solid;
	border-width: 33vw 33vw 0 0;
	border-color: #fff transparent transparent transparent;

	top: 0;
	left: 0;
	z-index: 3;
	transition: 0.4s;
}

.recent-project-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: clamp(2rem, 1.8vw, 3rem);
	text-transform: uppercase;
	margin-bottom: 1.5rem;
	margin-top: -0.3rem;
	line-height: 0.9em;
	color: transparent;
	transition: 0.2s;
}

.recent-project:hover .recent-project-title {
	color: var(--color-primary);
}

.recent-project-details ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-content: stretch;
	align-items: stretch;
	gap: 0.7rem;
}

.recent-project-details ul li {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 2.4rem 1fr;
	justify-content: start;
	justify-items: start;
	align-content: center;
	align-items: center;
	gap: 0.7rem;
}

.recent-project-details ul li span {
	font-size: 1.6rem;
	line-height: 1.7;
	color: transparent;
	transition: 0.2s;
}

.recent-project:hover .recent-project-details ul li span {
	color: #000;
}

.recent-project-details ul li i {
	font-size: 2.4rem;
	color: transparent;
	transition: 0.2s;
}

.recent-project:hover .recent-project-details ul li i {
	color: var(--color-grey);
}

.recent-project-image {
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;
	object-fit: contain;
}

.recent-project-image::before {
	content: '';
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: rgba(var(--color-primary-rgb), 0.35);
	opacity: 1;
	z-index: 2;
	transition: 0.2s;
}

.recent-project:hover .recent-project-image::before {
	opacity: 0;
}

.recent-project-image > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: relative;
	z-index: 1;
}

/* large view */

@media only screen and (max-width: 1539px) {
	.recent-project-details {
		translate: calc(-50% - 6vw + 3rem) calc(-50% - 6vw + 3rem);
	}

	.recent-project-details::before {
		border-width: 45vw 45vw 0 0;
	}
}

/* large view */

@media only screen and (max-width: 1279px) {
	.recent-projects-container {
		--rp-padding: 5rem;
	}

	.recent-project-details {
		translate: calc(-50% - 8.5vw + 2.5rem) calc(-50% - 8.5vw + 2.5rem);
	}

	.recent-project-details::before {
		border-width: 50vw 50vw 0 0;
	}
}

/* tablet view */

@media only screen and (max-width: 1023px) {
	.recent-projects-container {
		height: 50vw;
	}

	.recent-project {
		width: 50vw;
		height: calc(50vw + 3rem);
		float: left;
		scroll-snap-align: start;
	}
}

/* mobile view */

@media only screen and (max-width: 767px) {
	.recent-projects-container {
		height: 100vw;
	}

	.recent-project {
		width: 100vw;
		height: calc(100vw + 3rem);
	}

	.recent-project-details {
		translate: calc(-50% + 5rem) calc(-50% + 5rem);
	}

	.recent-project-details::before {
		border-width: calc(100vw - 2rem) calc(100vw - 2rem) 0 0;
	}
}

/* mobile view */
@media only screen and (max-width: 575px) {
}

/* projects page */

.project-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
}

.project-image {
	width: 100%;
	aspect-ratio: 3/2;
	overflow: hidden;
	position: relative;
}

.project-image::after {
	--triangle-size: 4rem;
	transition: 0.2s;
}

.project-image:hover::after {
	--triangle-size: 8rem;
}

.project-image::before {
	content: '\e941';
	font-family: 'icons' !important;
	speak: never;
	font-size: 2.4rem;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	color: var(--color-dark-grey);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	position: absolute;
	bottom: 0;
	right: 0;
	z-index: 3;
	opacity: 0;
	transition: 0.2s;
}

.project-image:hover::before {
	bottom: 1rem;
	right: 1rem;
	opacity: 1;
}

.project-image > img {
	width: 100%;
	height: auto;
	aspect-ratio: 3/2;
	vertical-align: middle;
	object-fit: cover;
	transition: 0.4s;
}

.project-image:hover > img {
	transform: scale(1.1);
}

.project-listings-container {
	display: block !important;
	width: 100%;
}

.project-listings {
	width: calc(100% + 4rem);
	margin: 0 -2rem;
}

.project-listings.grid:after {
	content: '';
	display: block;
	clear: both;
}

.project-listing {
	display: block;
	width: 33.33%;
	padding: 2rem;
}

.project-categories-container {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	width: 100%;
	border-bottom: 0.1rem solid var(--color-grey);
}

.project-categories {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 0;
	justify-content: center;
	align-items: stretch;
	position: relative;
	width: 100%;
	max-width: 128rem;
}

.project-categories::after {
	--category-index: 0;
	--category-column: calc(100% / (var(--category-count) + 1));

	transition: 0.4s all;
	position: absolute;
	content: '';
	display: block;
	width: var(--category-column);
	height: 5px;
	background-color: var(--color-primary);
	bottom: 0;
	left: calc(var(--category-index) * var(--category-column));
}

.project-categories:has(.filter-button.is-checked:nth-of-type(2))::after {
	--category-index: 1;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(3))::after {
	--category-index: 2;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(4))::after {
	--category-index: 3;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(5))::after {
	--category-index: 4;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(6))::after {
	--category-index: 5;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(7))::after {
	--category-index: 6;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(8))::after {
	--category-index: 7;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(9))::after {
	--category-index: 8;
}

.project-categories:has(.filter-button.is-checked:nth-of-type(10))::after {
	--category-index: 9;
}

.project-listing-details {
	padding: 20px 0;
}

.filter-button {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 4rem 0;
	cursor: pointer;
	position: relative;
	color: var(--color-primary);
	font-family: 'Barlow Semi Condensed', sans-serif;
	font-size: 1.6rem;
	text-transform: uppercase;
	font-weight: 500;
	letter-spacing: 0.1rem;
	line-height: 1em;
	transition: all 0.4s ease;
}

.filter-button:hover {
	color: var(--color-secondary);
}

.mobile-product-categories {
	display: none;
}

.project-listing-detail {
	display: grid;
	grid-template-columns: 2.4rem 1fr;
	gap: 0.7rem;
	width: 100%;
	justify-content: start;
	align-items: center;
	margin-top: 0.3rem;
}

.project-listing-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 2rem;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.05rem;
	margin-bottom: 0.7rem;
	line-height: 1em;
	color: var(--color-accent);
}

.project-listing-detail i {
	color: var(--color-dark-grey);
}

.project-listing-detail span {
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	font-size: 1.6rem;
	line-height: 2.6rem;
}

.header-title.project-title::after {
	display: none;
}

.header-title.project-title::before {
	content: '';
	display: block;
	width: 10rem;
	height: 0.2rem;
	background-color: var(--color-accent);
	margin: 2rem 0 3rem;
}

.header-container.project-header {
	align-items: flex-start;
	text-align: left;
	min-height: 60rem;
}

.header-container.project-header .header-content {
	/* padding-bottom: 0; */
	max-width: 160rem;
	margin: 0 auto;
}

.project-block-container {
	place-content: center;
	place-items: center;
}

.project-block-landscape {
	grid-template-columns: 2fr 1fr;
}

.project-block-portrait {
	grid-template-columns: 1fr 2fr;
}

.project-hero-image {
	display: block;
	height: auto;
	width: 100%;
	margin-top: calc((0rem - var(--block-spacing)) * 2);
}

.project-header .header-content {
	padding-bottom: calc(var(--block-spacing) + 4rem);
}

.project-hero-image > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.project-attributes-container {
	width: 100%;
	container-type: inline-size;
	container-name: attributes;

	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
}

.project-attributes {
	display: inline-grid;
	grid-template-columns: 2.4rem max-content auto;
	column-gap: 0.7rem;
	row-gap: 0.4rem;
	width: auto;
}

.project-attribute {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	justify-content: start;
	align-items: start;
	column-gap: 0.7rem;
	row-gap: 0.4rem;
	width: 100%;
	font-size: 1.6rem;
	font-weight: 300;
	line-height: 2.6rem;
}


@container attributes (max-width: 600px) {
	/* .project-block-container {
		grid-template-columns: 1fr;
	} */
}

/* large view */
@media only screen and (max-width: 1539px) {
	.project-details {
		transform: translateX(-100%) translateY(-100%);
	}

	.project-details > h2 {
		font-size: 4rem;
	}

	.project-categories {
		max-width: 100rem;
	}

	.filter-button {
		letter-spacing: 0.05rem;
	}

	.project-block-landscape,
	.project-block-portrait {
		grid-template-columns: 1fr 1fr;
	}
}

/* tablet view */
@media only screen and (max-width: 1023px) {
	.project-details {
		top: 2rem;
		left: 2rem;
	}

	.project-details > h2 {
		font-size: 2rem;
	}

	.project-listing {
		width: 49.9%;
	}

	.project-categories {
		max-width: 75rem;
	}

	.filter-button {
		font-size: 1.5rem;
	} 

	.project-block-container {
		padding-left: 4rem;
		padding-right: 4rem;
		justify-content: start;
		justify-items: start;
		row-gap: var(--block-spacing);
	}

	.project-attributes-container {
		align-items: flex-start;
		padding-top: var(--block-spacing);
		border-top: 1px solid var(--color-grey);
	}

	.project-header .header-scroll-down {
		display: none !important;
	}

	.project-block-landscape,
	.project-block-portrait {
		grid-template-columns: 1fr;
	}

}

/* mobile view */
@media only screen and (max-width: 767px) {
	.mobile-product-categories {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		justify-content: center;
		width: 100%;
		position: relative;
	}

	.mobile-product-categories::after {
		content: '\e93c';
		font-family: 'icons' !important;
		speak: never;
		font-size: 2.4rem;
		font-style: normal;
		font-weight: normal;
		font-variant: normal;
		text-transform: none;
		line-height: 1;
		color: var(--color-dark-grey);
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;

		position: absolute;
		top: 50%;
		right: 4rem;
		translate: 0 -50%;
		transition: 0.2s;
	}

	.mobile-product-categories:has(select:focus)::after {
		rotate: 180deg;
	}

	.mobile-product-categories select {
		background-color: transparent;
		border: 0 none;
		border-bottom: 0.1rem solid var(--color-grey);
		color: #333;
		font-size: 1.8rem;
		margin: 0;
		padding: 2rem 4rem;
		width: 100%;
		-moz-appearance: none;
		-webkit-appearance: none;
		appearance: none;
		outline: none;
	}

	.mobile-product-categories select option {
		background-color: #fff;
		color: #000;
	}

	.project-categories-container {
		display: none;
	}

	.project-listings {
		width: 100%;
		margin: 0;
	}

	.project-listing {
		width: 100%;
		padding: 1rem 0;
	}

	.header-container.project-header .header-content {
		max-width: 100%;
	}

	.project-hero-image {
		margin-top: calc((0rem - (var(--block-spacing) * 2)) * 1.5);
	}

	.project-block-container {
        row-gap: calc(var(--block-spacing) * 2);
    }
}

