/* Projects – griglia dell'addon SP Page Builder "asa_projects" e layout articolo "project" */

.asa-projects,
.asa-project {
	--ap-navy: #19233f;
	--ap-orange: #e9531d;
	--ap-grey: #f4f4f2;
	--ap-text: #808080;
	--ap-line: rgba(25, 35, 63, .14);
	--ap-gutter: clamp(20px, 5vw, 80px);
	--ap-max: 1060px;
	--ap-ease: cubic-bezier(.2, .7, .2, 1);
}

.asa-projects *,
.asa-projects *::before,
.asa-projects *::after,
.asa-project *,
.asa-project *::before,
.asa-project *::after {
	box-sizing: border-box;
}

/* ================================================================ Griglia (pagina Projects) */

.asa-projects__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 clamp(32px, 4vw, 56px);
}

.asa-projects__filter {
	padding: 10px 22px;
	border: 1px solid var(--ap-navy);
	border-radius: 999px;
	background: transparent;
	color: var(--ap-navy);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .25s, color .25s;
}

.asa-projects__filter:hover,
.asa-projects__filter:focus-visible,
.asa-projects__filter.is-active {
	background: var(--ap-navy);
	color: #fff;
}

.asa-projects__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(40px, 5vw, 64px) 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.asa-projects__item {
	margin: 0;
	animation: asa-projects-in .5s var(--ap-ease) both;
}

.asa-projects__item[hidden] {
	display: none;
}

.asa-projects__link {
	display: block;
	color: var(--ap-navy);
	text-decoration: none;
}

.asa-projects__link:hover,
.asa-projects__link:focus {
	color: var(--ap-navy);
	text-decoration: none;
}

.asa-projects__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--ap-grey);
}

.asa-projects__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s var(--ap-ease);
}

.asa-projects__link:hover .asa-projects__media img,
.asa-projects__link:focus-visible .asa-projects__media img {
	transform: scale(1.04);
}

.asa-projects__tag {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 8px 18px;
	border-radius: 999px;
	background: var(--ap-navy);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.asa-projects__tag::before {
	content: "•";
	margin-right: .6em;
}

.asa-projects__caption {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
}

.asa-projects__title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .18em;
	line-height: 1.4;
	text-transform: uppercase;
}

.asa-projects__arrow {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--ap-line);
	border-radius: 50%;
	transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ap-ease);
}

.asa-projects__link:hover .asa-projects__arrow,
.asa-projects__link:focus-visible .asa-projects__arrow {
	border-color: var(--ap-orange);
	background: var(--ap-orange);
	color: #fff;
	transform: translateX(4px);
}

.asa-projects__location {
	display: block;
	margin-top: 4px;
	color: var(--ap-text);
	font-size: 14px;
}

.asa-projects__empty {
	text-align: center;
}

@keyframes asa-projects-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

@media (min-width: 768px) {
	.asa-projects__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.asa-projects__tag {
		top: 22px;
		left: 22px;
	}
}

/* ================================================================ Scheda progetto */

.asa-project-page #sp-main-body {
	padding: 0;
}

.asa-project-page .body-innerwrapper {
	overflow-x: clip;
}

.asa-project {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	color: var(--ap-navy);
}

.ap-container {
	max-width: calc(var(--ap-max) + 2 * var(--ap-gutter));
	margin: 0 auto;
	padding: 0 var(--ap-gutter);
}

/* ---------------------------------------------------------------- Hero, come le altre pagine */

.ap-hero {
	position: relative;
	height: 241px;
	background: var(--ap-navy);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
}

.ap-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--ap-hero-image, none) center / cover no-repeat;
}

.ap-hero .sppb-row-overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, .25);
}

.ap-hero__inner {
	position: absolute;
	top: 50%;
	left: var(--ap-gutter);
	right: var(--ap-gutter);
	max-width: 1120px;
	margin: 0 auto;
	text-align: center;
	transform: translateY(-50%);
}

.ap-hero__title {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 40px;
	color: #fff;
}

.ap-hero__location {
	margin: 10px 0 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #fff;
}

/* ---------------------------------------------------------------- Testi */

.ap-intro {
	padding: clamp(48px, 7vw, 88px) 0 0;
}

.ap-section {
	padding: clamp(48px, 7vw, 88px) 0 0;
}

.ap-prose {
	font-size: 17px;
	line-height: 1.7;
	color: var(--ap-text);
}

.ap-prose > :last-child {
	margin-bottom: 0;
}

.ap-prose p {
	margin: 0 0 1.1em;
}

.ap-prose strong {
	color: var(--ap-navy);
}

.ap-prose h2,
.ap-section__title {
	margin: 0 0 .8em;
	font-size: clamp(24px, 2.6vw, 34px);
	font-weight: 700;
	line-height: 1.25;
	color: var(--ap-navy);
}

.ap-prose h2 span,
.ap-section__title span {
	color: var(--ap-orange);
}

.ap-prose h3 {
	margin: 1.8em 0 .5em;
	padding-top: 1.4em;
	border-top: 1px solid var(--ap-line);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ap-navy);
}

/* Primo sottotitolo subito sotto il titolo della sezione: niente separatore */
.ap-section__title + h3 {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.ap-prose h3 span {
	color: var(--ap-orange);
}

.ap-prose blockquote {
	margin: 1.6em 0;
	padding: 0 0 0 24px;
	border-left: 3px solid var(--ap-orange);
	font-size: clamp(19px, 1.8vw, 23px);
	font-style: italic;
	font-weight: 700;
	line-height: 1.45;
	color: var(--ap-navy);
}

.ap-prose blockquote p {
	margin: 0;
}

.ap-kicker {
	margin: 0 0 12px !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .2em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--ap-orange);
}

.ap-systems {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
	margin: 32px 0 0 !important;
	padding: 18px 0;
	border-top: 1px solid var(--ap-line);
	border-bottom: 1px solid var(--ap-line);
}

.ap-systems__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ap-text);
}

.ap-systems__list {
	font-size: 17px;
	font-weight: 700;
	color: var(--ap-navy);
}

/* ---------------------------------------------------------------- Caroselli (galleria e prodotti) */

[data-ap-track] {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

[data-ap-track]::-webkit-scrollbar {
	display: none;
}

.ap-carousel-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
}

.ap-carousel-nav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--ap-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ap-navy);
	cursor: pointer;
	transition: background-color .25s, border-color .25s, color .25s, opacity .25s;
}

.ap-carousel-nav__btn:hover,
.ap-carousel-nav__btn:focus-visible {
	border-color: var(--ap-navy);
	background: var(--ap-navy);
	color: #fff;
}

/* Nessuno scorrimento possibile: frecce e pallini nascosti */
.is-static .ap-carousel-nav {
	visibility: hidden;
}

.ap-carousel-nav__btn:disabled {
	opacity: .35;
	pointer-events: none;
}

.ap-carousel-nav__dots {
	display: inline-flex;
	gap: 8px;
}

.ap-carousel-nav__dots i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ap-line);
	transition: background-color .25s;
}

.ap-carousel-nav__dots i.is-active {
	background: var(--ap-orange);
}

/* Galleria: tre immagini affiancate da desktop, una e mezza su mobile */
.ap-gallery {
	padding: clamp(48px, 7vw, 88px) 0 0;
}

.ap-gallery__track {
	padding: 0 var(--ap-gutter);
	scroll-padding: 0 var(--ap-gutter);
}

.ap-gallery__item {
	flex: 0 0 82%;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ap-grey);
	scroll-snap-align: start;
}

.ap-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ap-gallery .ap-carousel-nav {
	margin-top: 22px;
}

/* ---------------------------------------------------------------- Call to action */

.ap-ctas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	padding: clamp(40px, 5vw, 64px) var(--ap-gutter) 0;
}

.ap-btn {
	display: inline-flex;
	align-items: center;
	padding: 15px 34px;
	border: 1px solid var(--ap-navy);
	border-radius: 999px;
	background: var(--ap-navy);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color .25s, color .25s, border-color .25s;
}

.ap-btn:hover,
.ap-btn:focus {
	border-color: var(--ap-orange);
	background: var(--ap-orange);
	color: #fff;
	text-decoration: none;
}

.ap-btn--outline {
	background: transparent;
	color: var(--ap-navy);
}

/* ---------------------------------------------------------------- Dati di progetto */

.ap-data {
	margin-top: clamp(56px, 8vw, 104px);
	padding: clamp(48px, 6vw, 80px) 0;
	background: var(--ap-grey);
}

.ap-data__title {
	margin: 0 0 28px;
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--ap-navy);
}

.ap-data__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 48px;
	margin: 0;
}

.ap-data__row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--ap-line);
}

.ap-data__row dt {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--ap-text);
}

.ap-data__row dd {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ap-navy);
}

/* ---------------------------------------------------------------- Prodotti utilizzati */

.ap-products {
	padding: clamp(56px, 8vw, 104px) 0 0;
}

.ap-data + .ap-products {
	padding-top: clamp(48px, 6vw, 80px);
}

.ap-products__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.ap-products__title {
	margin: 0;
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.3;
	color: var(--ap-navy);
}

/* Le card partono allineate al testo e scorrono fino al bordo della pagina */
.ap-products__track {
	padding: 6px var(--ap-gutter) 30px max(var(--ap-gutter), calc((100vw - var(--ap-max)) / 2));
	scroll-padding-left: max(var(--ap-gutter), calc((100vw - var(--ap-max)) / 2));
}

.ap-product {
	flex: 0 0 min(72vw, 280px);
	margin: 0;
	scroll-snap-align: start;
}

.ap-product__link,
.ap-product > .ap-product__media {
	display: block;
}

.ap-product__link,
.ap-product:not(:has(.ap-product__link)) {
	height: 100%;
	padding: 14px 14px 22px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(25, 35, 63, .1);
	color: var(--ap-navy);
	text-decoration: none;
	transition: box-shadow .3s, transform .3s var(--ap-ease);
}

.ap-product__link:hover,
.ap-product__link:focus-visible {
	box-shadow: 0 12px 32px rgba(25, 35, 63, .16);
	color: var(--ap-navy);
	text-decoration: none;
	transform: translateY(-4px);
}

.ap-product__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 10px;
	background: var(--ap-grey);
}

.ap-product__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ap-product__name {
	display: block;
	margin-top: 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.ap-product__name span {
	color: var(--ap-orange);
}

/* ---------------------------------------------------------------- Ritorno all'elenco */

.ap-back {
	padding: clamp(40px, 5vw, 64px) var(--ap-gutter) clamp(56px, 7vw, 96px);
	text-align: center;
}

.ap-back__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ap-navy);
	text-decoration: none;
}

.ap-back__link:hover,
.ap-back__link:focus {
	color: var(--ap-orange);
	text-decoration: none;
}

/* ---------------------------------------------------------------- Da tablet */

@media (min-width: 768px) {
	.ap-hero {
		height: 600px;
	}

	.ap-hero__title {
		font-size: 90px;
		line-height: 103px;
	}

	.ap-hero__location {
		margin-top: 18px;
		font-size: 15px;
	}

	.ap-gallery__item {
		flex-basis: calc((100% - 32px) / 3);
	}

	.ap-data__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.ap-products__head .ap-carousel-nav {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asa-projects__item {
		animation: none;
	}

	[data-ap-track] {
		scroll-behavior: auto;
	}

	.asa-projects__media img,
	.asa-projects__arrow,
	.ap-product__link {
		transition: none;
	}
}
