/* CAMeC — pagina Project Room */
.project-room-section {
	--camec-gap: clamp(20px, 3vw, 42px);
	margin-block: clamp(48px, 8vw, 104px);
}

.project-room-section:first-child {
	margin-top: 0;
}

/* Elementor stampa questo elemento solamente quando la query non trova post. */
.project-room-section:has(.e-loop-nothing-found-message) {
	display: none;
}

/* Elimina anche i wrapper Elementor esterni, compresi spacer e padding. */
.e-con:has(> .e-con-inner > .project-room-section .e-loop-nothing-found-message),
.e-con:has(> .project-room-section .e-loop-nothing-found-message) {
	display: none !important;
}

.project-room-past {
	margin-top: 0;
}

/* Riduce la distanza dall'introduzione quando l'archivio e la prima sezione visibile. */
.e-con.e-parent:has(> .e-con-inner > .project-room-past) > .e-con-inner {
	padding-top: clamp(28px, 3vw, 40px) !important;
}

.project-room-section-title {
	margin-bottom: clamp(22px, 3vw, 40px);
}

.project-room-section-title .elementor-heading-title {
	font-size: clamp(32px, 5vw, 64px);
	line-height: .95;
	letter-spacing: -.035em;
}

.project-room-current {
	padding-block: clamp(28px, 5vw, 64px);
	border-block: 2px solid #000;
}

.project-room-current .project-room-section-title .elementor-heading-title {
	font-size: clamp(42px, 7vw, 92px);
}

.mostra-card {
	display: flex;
	height: 100%;
	flex-direction: column;
	gap: 0;
}

.mostra-card-image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #f2f2f2;
}

.mostra-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .35s ease;
}

.mostra-card:hover .mostra-card-image img {
	transform: scale(1.025);
}

.mostra-card-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding-top: 16px;
}

/* Allinea anche i loop importati prima dell'aggiunta delle classi al container. */
.project-room-section .elementor-loop-container {
	align-items: stretch;
}

.project-room-section .e-loop-item,
.project-room-section .e-loop-item > .elementor,
.project-room-section .e-loop-item > .elementor > .e-con,
.project-room-section .e-loop-item > .elementor > .e-con > .e-con-inner {
	height: 100%;
}

.project-room-section .e-loop-item > .elementor > .e-con > .e-con-inner {
	display: flex;
	flex-direction: column;
}

.project-room-section .e-loop-item > .elementor > .e-con > .e-con-inner > .e-con:last-child {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.project-room-section .e-loop-item .elementor-widget-button:last-child {
	margin-top: auto;
}

.mostra-card-title {
	margin: 0 0 7px;
	min-height: 3.2em;
}

.mostra-card-title .elementor-heading-title {
	font-size: clamp(20px, 1.65vw, 24px);
	font-weight: 900;
	line-height: 1.08;
	word-break: normal !important;
	overflow-wrap: normal;
	hyphens: none;
}

.mostra-card-artist {
	display: none !important;
}

.mostra-card-dates {
	display: flex;
	align-items: baseline;
	flex-wrap: nowrap !important;
	gap: .38em;
	margin-bottom: 18px;
	min-height: 18px;
}

.mostra-card-dates > .elementor-element {
	width: auto !important;
	min-width: 0;
	flex: 0 0 auto !important;
}

.mostra-card-dates .elementor-heading-title {
	white-space: nowrap;
}

/* Fallback per i loop importati prima che il container DATE avesse la classe. */
.project-room-section .e-loop-item > .elementor > .e-con > .e-con-inner > .e-con:last-child > .e-con {
	min-height: 36px;
}

.mostra-card-dates .elementor-widget-heading,
.mostra-card-dates .elementor-heading-title {
	width: auto;
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
}

.mostra-card-button {
	margin-top: auto;
}

.mostra-card-button .elementor-button {
	min-height: 44px;
	padding: 13px 18px;
	border: 2px solid #000;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	transition: background-color .2s ease, color .2s ease;
}

.mostra-card-button .elementor-button:hover,
.mostra-card-button .elementor-button:focus-visible {
	background: #fff;
	color: #000;
}

.project-room-current .mostra-card-title .elementor-heading-title {
	font-size: clamp(27px, 3.5vw, 44px);
}

@media (max-width: 767px) {
	.project-room-section {
		margin-block: 48px;
	}

	.mostra-card-image img {
		height: 100%;
		object-fit: contain;
	}

	.mostra-card-title {
		min-height: 0;
	}

	.mostra-card-dates {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mostra-card-image img,
	.mostra-card-button .elementor-button {
		transition: none;
	}
}
