#progetti-filter {
	display: flex;
	gap: 10px;

	.filter-field {
		position: relative;
		margin-bottom: 10px;
		flex-grow: 1;
	}

	.filter-field:has(input[type='text'][name='text_filter']) {
		flex-grow: 4;
		flex-basis: 400px;
	}

	.select2 {
		width: 100% !important;
	}

	.select2 .selection .select2-selection,
	.filter-field input[type='text'],
	.filter-field select {
		padding: 16px 30px 16px 20px !important;
		width: 100%;
		box-sizing: border-box;
		border: 0;
		border-radius: 4px;
		background-color: #f8f8f8;
		font-size: 14px;
		line-height: 1.5;
		outline: none;
		&:active,
		&:hover,
		&:focus {
			background-color: #e8e8e8;
		}
	}

	.select2-container--default
		.select2-selection--single
		.select2-selection__rendered {
		color: var(--e-global-color-secondary);
		line-height: 1.5;
	}

	.filter-field input[type='text'].year-filter {
		padding-right: 30px; /* Space for icon */
	}

	.filter-field i {
		position: absolute;
		top: 18px;
		right: 10px;
		color: var(--e-global-color-secondary);
		font-weight: 400;
	}

	.filter-field i:hover {
		color: #333;
		cursor: pointer;
	}

	button[type='submit'] {
		font-family: var(--e-global-typography-accent-font-family), Sans-serif;
		font-size: var(--e-global-typography-accent-font-size);
		font-weight: var(--e-global-typography-accent-font-weight);
		text-transform: none;
		line-height: 26px;
		height: 53px;
		letter-spacing: var(--e-global-typography-accent-letter-spacing);
		text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.3);
		color: var(--e-global-color-d3e4ba3);
		background: var(--e-global-color-primary);

		border-radius: 8px 8px 8px 8px !important;
		padding: 10px 20px 10px 20px;
	}
}

button#reset-filters {
	margin-top: 10px;
	display: block;
	margin-left: auto;
	background: none;
	border: none;
	color: var(--e-global-color-secondary);
	text-transform: none;
	cursor: pointer;
	text-decoration: underline;
	font-family: Cairo;
	font-size: 18px;
	letter-spacing: 0;
	padding: 0;
	font-size: 14px;
}

button#reset-filters .cancel-icon {
	margin-right: 5px;
	font-weight: bold;
}

@media (width<=990px) {
	#progetti-filter {
		flex-wrap: wrap;
	}
	.filter-field {
		flex-basis: 25%;
		flex-grow: 2;
	}
	.filter-field:has(input[type='text'][name='text_filter']) {
		flex-basis: 100%;
	}
}

/* Aree custom select */
.custom-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	padding: 10px;
	font-size: 16px;
	font-family: 'Cairo', sans-serif;
	border: 1px solid #013667;
	border-radius: 4px;
	cursor: pointer;
}

.custom-select:focus {
	outline: none;
	border-color: var(--e-global-color-primary);
}

.select2-selection__placeholder {
	color: var(--e-global-color-secondary) !important;
}

.select2 .selection .select2-selection .select2-selection__arrow,
.select2-container--default .select2-search--dropdown {
	display: none;
}

.select2-container .select2-dropdown {
	border-radius: 4px !important;
	border: solid 1px #d8d8d8 !important;
	box-shadow: 0px 4px 10px 5px rgba(232, 232, 232, 1);
}

.select2-container .select2-selection--single .select2-selection__rendered {
	padding-right: 10px !important;
	padding-left: 0 !important;
}

/* ACCORDION PROGETTI */

.elementor-widget-container:has(.project-item) {
	border-top: solid 0.5px #013667;
	font-family: Cairo;
	font-size: 18px;
	color: var(--e-global-color-secondary);
}

.project-item {
	border-bottom: solid 0.5px var(--e-global-color-secondary);
	display: grid;
	grid-template-columns: 80px 1fr;
	grid-template-rows: repeat(2, auto);
	grid-column-gap: 0px;
	grid-row-gap: 0px;
	position: relative;
	transition: height 0.5s ease;
}

.area-icon {
	grid-area: 1 / 1 / 2 / 2;
	width: 42px;
	height: 42px;
	background: var(--e-global-color-secondary);
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center center;
	margin-top: 30px;
}

.project-header.active {
	color: var(--e-global-color-primary);
}
.project-item:has(.project-header.active) .area-icon {
	background: var(--e-global-color-primary);
}

.project-item:has(.project-content.show) {
	.project-header {
		color: var(--e-global-color-primary);
	}
	.area-icon {
		background: var(--e-global-color-primary);
	}
}

.project-header {
	padding-top: 25px;
	padding-right: max(50px, 10vw);
	cursor: pointer;
	grid-area: 1 / 2 / 2 / 3;
	span {
		display: block;
		font-size: 24px;
		font-weight: bold;
		line-height: 32px;
		margin-bottom: 25px;
	}
}

.project-content {
	display: none;
	opacity: 0;
	padding-bottom: 40px;
	padding-top: 0;
	grid-area: 2 / 2 / 3 / 3;
	line-height: 25px;
	padding-right: max(50px, 10vw);
	transition: opacity 0.5s ease;
	&.show {
		display: block;
	}
}

.project-content.show,
.project-item:has(.project-header.active) .project-content {
	opacity: 1;
}

.project-item::before {
	content: '+';
	display: block;
	position: absolute;
	top: calc(50% - 12px);
	right: 10px;
	color: var(--e-global-color-secondary);
	font-size: 24px;
}

.project-item:has(.project-header.active)::before,
.project-item:has(.project-content.show)::before {
	content: '-';
}

.project-icons {
	position: absolute;
	z-index: 20;
	top: 25px;
	right: 35px;
	padding-left: 20px;
	display: flex;
	gap: 10px;
	& i {
		font-size: 24px;
		&:hover,
		&:active,
		&:focus-visible {
			color: var(--e-global-color-primary);
		}
	}
}
.project-header:not(.active)/*,
.project-header:not(:has(.project-content.show))*/ {
	.project-icons {
		display: none;
	}
}

@media (width<=778px) {
	.project-item {
		grid-template-columns: 65px 1fr;
		.project-icons {
			right: 0;
		}
	}
	.project-header {
		padding-right: 85px;
		span {
			font-size: 22px;
			line-height: 28px;
		}
	}
}

@media (width<=600px) {
	.filter-field {
		flex-basis: 100%;
	}
	button[type='submit'] {
		margin-left: auto;
	}
}

@media (width<=480px) {
	.project-item {
		grid-template-columns: 1fr;
		.area-icon {
			display: none;
		}
		.project-content {
			padding-right: 25px;
		}
		.project-header {
			span {
				font-size: 18px;
				line-height: 24px;
			}
		}
	}
}
