/**
 * Progetti Custom Post Type Styles
 * @package HelloElementorChild
 * LOADED GLOBALLY ON ALL PAGES
 */

/* ====================
   ARCHIVE PROGETTI STYLES
   ==================== */

.progetti-archive {
	padding: 40px 0;
}

.progetti-container {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 20px;
}

.page-header {
	display: none;
	text-align: center;
	margin-bottom: 60px;
}

.page-title {
	font-size: 2.5rem;
	margin-bottom: 20px;
	color: #333;
	font-weight: 300;
	letter-spacing: -0.02em;
}

.progetti-list {
	margin-bottom: 60px;
}

.progetto-item {
	margin-bottom: 0;
}

.progetto-row {
	display: flex;
	align-items: flex-start;
	min-height: 200px;
}

.progetto-info {
	width: 30%;
	padding-right: 30px;
	flex-shrink: 0;
}

.progetto-visual {
	width: 70%;
	flex-shrink: 0;
}

.progetto-title {
	margin: 0;
	line-height: 1.3;
	text-align: right;
}

.progetto-title a {
	text-decoration: none;
	transition: color 0.3s ease;
	font-weight: 500 !important;
	color: #1b1b1b !important;
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
}

.progetto-title a:hover {
}

.progetto-location {
	margin-top: 5px;
	font-size: 12px;
	line-height: 1.4;
	text-align: right;
	color: var(--e-global-color-secondary);
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
	text-transform: uppercase;
}

.progetto-year {
	font-size: 0.9rem;
	color: #999;
	font-weight: 500;
}

.progetto-image-link {
	display: block;
	text-decoration: none;
}

.progetto-image-container {
	position: relative;
	width: 100%;
	/*aspect-ratio: 16/9;*/
	/*overflow: hidden;*/
	border-radius: 4px;
}

.progetto-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.progetto-image-link:hover .progetto-image {
	/* transform: scale(1.02);*/
}

.progetto-placeholder {
	width: 100%;
	height: 100%;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 14px;
	border: 2px dashed #ddd;
	border-radius: 4px;
}

.progetto-separator {
	height: 30px;
	margin: 0;
	border-bottom: none;
}

.no-projects {
	text-align: center;
	padding: 80px 20px;
	color: #666;
	font-size: 1.1rem;
}

/* Animation styles */
.progetto-item.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.progetto-item.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Image loading states */
.progetto-image {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.progetto-image[data-src] {
	opacity: 0.7;
	filter: blur(2px);
}

.progetto-image:not([data-src]) {
	opacity: 1;
	filter: none;
}

/* Focus styles for accessibility */
.progetto-image:focus,
.progetto-title a:focus,
.progetto-image-link:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

/* Loading animation for images */
@keyframes shimmer {
	0% {
		background-position: -468px 0;
	}
	100% {
		background-position: 468px 0;
	}
}

.progetto-placeholder.loading {
	background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
	background-size: 800px 104px;
	animation: shimmer 1.5s linear infinite;
}

/* ====================
   SINGLE PROGETTO STYLES
   ==================== */

.progetto-single {
	padding: 40px 0;
}

.progetto-single.overlay-mode {
	padding: 0;
}

.progetto-single .container {
	/*max-width: 1200px;*/
	margin: 0 auto;
	/*padding: 0 20px;*/
}

.progetto-breadcrumb {
	margin-bottom: 20px;
	font-size: 0.9rem;
	color: #666;
}

.progetto-breadcrumb a {
	color: #007cba;
	text-decoration: none;
}

.progetto-breadcrumb a:hover {
	text-decoration: underline;
}

.separator {
	margin: 0 10px;
}

.progetto-single .progetto-title {
	font-size: 2.5rem;
	margin-bottom: 30px;
	color: #333;
	line-height: 1.2;
}

.progetto-meta-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 15px;
	margin-bottom: 40px;
	padding: 25px;
	background: #f8f9fa;
	border-radius: 8px;
}

.meta-item {
	font-size: 0.95rem;
	line-height: 1.4;
}

.meta-item strong {
	color: #333;
	display: inline-block;
	min-width: 80px;
}

.progetto-featured-image {
	margin-bottom: 40px;
	text-align: center;
}

.featured-image {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.progetto-single .progetto-content {
	margin-bottom: 50px;
	font-size: 1.1rem;
	line-height: 1.6;
	color: #444;
}

.progetto-collection {
	margin-bottom: 50px;
	position: relative;
	width: 100vw;
	height: 100vh;
	margin-left: calc(-50vw + 50%);
	pointer-events: auto;
	padding-right: 50px;
}

.progetti-overlay .progetto-collection {
	width: 100%;
	height: 100%;
	margin-left: 0;
	margin-bottom: 0;
}

.progetto-collection h2 {
	font-size: 1.8rem;
	margin-bottom: 30px;
	color: #333;
	padding-bottom: 10px;
}

.collection-items {
	display: flex;
	gap: 45px;
	overflow-x: scroll !important;
	overflow-y: hidden !important;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	position: relative;
	cursor: grab;
	width: 100% !important;
	height: 100% !important;
}

.collection-items::-webkit-scrollbar {
	display: none;
}

.collection-items {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

/* Collection items as carousel slides */
.collection-item {
	height: 80vh !important;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-sizing: border-box;
	flex-shrink: 0;
}

.progetti-overlay .collection-item {
	/*height: 100% !important;*/
}

/* Info slide, text slides and quote slides - 20% width */
.collection-item-info,
.collection-item-text,
.collection-item-quote {
	width: 20vw !important;
	min-width: 20vw !important;
	max-width: 20vw !important;
	flex: 0 0 20vw !important;
}

/* Image slides - auto width based on aspect ratio */
.collection-item-image {
	width: auto !important;
	min-width: auto !important;
	max-width: none !important;
	flex: 0 0 auto !important;
}

/* Image slide content */
.collection-item-image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.collection-image {
	height: 100%;
}

.collection-img {
	width: auto !important;
	height: 100% !important;
	max-height: none !important;
	max-width: none !important;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
}

.progetti-overlay .collection-img {
	max-height: 100% !important;
}

/* Text slide content */
.collection-item-text {
	background: #fff;
	padding: 0;
	border-radius: 0;
	border: none;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

/* Quote slide content */
.collection-item-quote {
	background: #fff;
	padding: 0;
	border-radius: 0;
	border: none;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.collection-text, .collection-quote {
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-secondary-font-family);
	font-size: 14px;
	width: 100%;
}

/* Quote collection styles */
.collection-quote-text {
	margin: 0;
	text-align: left;
	line-height: 1.6;
	font-size: 16px;
	font-weight: 500;
	position: relative;
}

/* Info slide styles */
.collection-item-info {
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-secondary-font-family);
	align-items: center;
}

.collection-info-content {
	width: 100%;
	text-align: left;
	padding: 0 0 0 20px;
	box-sizing: border-box;
}

.collection-info-title {
	font-family: var(--e-global-typography-secondary-font-family) !important;
	color: var(--e-global-color-primary);
	font-size: 17px;
	font-weight: 600 !important;
	margin-bottom: 3px;
	line-height: 1.2;
	text-align: right;
	font-weight: 600;
}

.collection-info-field-head {
	font-family: var(--e-global-typography-secondary-font-family) !important;
	display: flex;
	flex-direction: column;
	font-size: 14px;
	text-align: right;
	color: var(--e-global-color-secondary);
	font-weight: 400;
	margin-bottom: 30px;
}

.collection-info-fields {
	font-family: var(--e-global-typography-secondary-font-family) !important;
	display: grid;
	gap: 10px;
	text-align: right;
}

.collection-info-field {
	display: flex;
	flex-direction: column;
}

.collection-info-field .field-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--e-global-color-primary);
	text-transform: uppercase;
}

.collection-info-field .field-value {
	font-size: 12px;
	font-weight: 400;
	color: var(--e-global-color-secondary);
	text-transform: uppercase;
}

/* Navigation controls removed - using only keyboard and drag */



.progetto-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #e1e1e1;
}

.nav-previous {
	text-align: left;
}

.nav-next {
	text-align: right;
}

.nav-link {
	display: block;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
	text-decoration: none;
	color: #333;
	transition: all 0.3s ease;
}

.nav-link:hover {
	background: #007cba;
	color: #fff;
	transform: translateY(-2px);
}

.nav-direction {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 5px;
}

.nav-title {
	display: block;
	font-size: 1rem;
	opacity: 0.8;
}







/* ====================
   RESPONSIVE STYLES
   ==================== */

@media (max-width: 768px) {
	/* Archive responsive */
	.progetti-container {
		padding: 0 15px;
	}
	
	.page-title {
		font-size: 2rem;
	}
	
	.progetto-row {
		flex-direction: column;
		min-height: auto;
	}
	
	.progetto-info {
		width: 100%;
		padding-right: 0;
		margin-bottom: 20px;
	}
	
	.progetto-visual {
		width: 100%;
	}
	
	.progetto-title {
		font-size: 1.3rem;
		margin-bottom: 10px;
	}
	
	.progetto-separator {
		height: 30px;
		margin: 0;
		border-bottom: none;
	}
	
	/* Single responsive */
	.progetto-single .progetto-title {
		font-size: 2rem;
	}
	
	.progetto-meta-grid {
		grid-template-columns: 1fr;
		padding: 20px;
	}
	
	.progetto-navigation {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.nav-next {
		text-align: left;
	}
	
	.collection-items {
		gap: 30px;
	}
	
	.collection-item-text,
	.collection-item-quote {
		padding: 20px;
	}
}

@media (max-width: 480px) {
	.progetti-archive {
		padding: 20px 0;
	}
	
	.progetti-container {
		padding: 0 10px;
	}
	
	.page-title {
		font-size: 1.75rem;
	}

	.progetto-info {
		width: 100%;
		padding-right: 0;
		margin-bottom: 5px;
	}
	
	.progetto-visual {
		width: 100%;
	}
	
	.progetto-title {
		font-size: 12px !important;
		margin-bottom: 0;
		text-align: left;
	}

	.progetto-location {
		font-size: 11px !important;
		text-align: left;
		margin-top: 0;
	}	
	
	.progetto-image-container {
		border-radius: 2px;
	}
	
	.progetto-separator {
		height: 20px;
		margin: 0;
		border-bottom: none;
	}
}

@media (max-width: 480px) {
	.progetti-archive,
	.progetto-single {
		padding: 20px 0;
	}
	
	.progetti-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.progetto-single .progetto-title {
		font-size: 1.75rem;
	}
	
	.page-title {
		font-size: 1.75rem;
	}
	
	.progetto-meta-grid {
		padding: 15px;
	}
	
	.nav-link {
		padding: 15px;
	}
}

/* ====================
   SCROLL ANIMATION STYLES
   ==================== */

/* Container per l'effetto zoom durante lo scroll */
.progetti-list,
.progetti-list-mobile {
	transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transform-origin: center center;
}

/* Classe applicata durante lo scroll per l'effetto zoom */
.progetti-list.scrolling,
.progetti-list-mobile.scrolling {
	transform: scale(0.95);
}

/* Smooth scroll per il contenitore */
.progetti-shortcode-wrapper {
	scroll-behavior: smooth;
}

/* Animazione per elementi individuali durante lo scroll */
.progetto-item,
.progetto-item-mobile {
	transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* Effetto parallax leggero durante lo scroll */
.progetto-item.scroll-effect,
.progetto-item-mobile.scroll-effect {
	transform: translateY(-2px);
	opacity: 0.98;
}

/* ====================
   SHORTCODE STYLES
   ==================== */

.progetti-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 255, 255, 1);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Assicura che possa contenere elementi positioned absolutely */
}

.progetti-overlay-content {
	width: 100%;
	height: 100%;
	position: relative;
	/*background: #FFFFFF;
	max-width: 1400px;
	max-height: 900px;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);*/
	overflow: hidden;
}

.progetti-close-button {
	position: absolute;
	top: 50px;
	right: 50px;
	background: rgba(255, 255, 255, 0.8);
	color: #000;
	padding: 3px;
	border: none;
	cursor: pointer;
	font-family: var(--e-global-typography-secondary-font-family), Sans-serif;
	font-size: 11px;
	font-weight: 400;
	z-index: 10001;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	user-select: none;
	text-decoration: underline;
}

.progetti-close-button:hover {
	text-decoration: none;
}

.progetti-close-button:active {
	text-decoration: none;
}

.progetto-overlay-trigger {
	cursor: pointer;
}

.collection-nav-bar {
	text-align: center;
	padding: 0 0 20px 0;
	position: relative;
	z-index: 1001;
}

.nav-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
}

.collection-back, .nav-left, .nav-right {
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
	font-size: 14px;
	color: var(--e-global-color-primary) !important;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
	cursor: pointer;
	padding: 5px;
}

.collection-back:hover, .nav-left:hover, .nav-right:hover {
	color: var(--e-global-color-secondary) !important;
}

.nav-separator {
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
	font-size: 12px;
	color: var(--e-global-color-primary);
	font-weight: 500;
	letter-spacing: 1px;
	user-select: none;
}

/* ====================
   MOBILE VERSION STYLES
   ==================== */

.progetti-mobile .progetti-list-mobile {
	display: flex; 
	flex-direction: column;
	gap: 30px;
}

.progetto-item-mobile {
	/*padding-bottom: 30px;*/
}

/* Single project mobile styles */
.progetti-single-mobile {
	padding: 20px 10px;
}

.progetti-single-mobile .progetto-item-mobile {
	margin-bottom: 20px;
}

.progetto-title-mobile {
	font-size: 12px !important;
	text-align: left;
	margin: 0;
	line-height: 1.3;
	font-weight: 500 !important;
	color: #1b1b1b !important;
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
}

.progetto-location-mobile {
	line-height: 1.4;
	color: var(--e-global-color-secondary);
	font-family: var( --e-global-typography-secondary-font-family ), Sans-serif !important;
	text-transform: uppercase;
	font-size: 11px !important;
	text-align: left;
	margin-top: 0;
	margin-bottom: 5px;;
}

.progetto-content-mobile {
	position: relative;
	width: 100%;
}

.progetto-image-mobile {
	width: 100%;
	position: relative;
	cursor: pointer;
}

.progetto-image-mobile img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
}

.progetto-collection-carousel-mobile {
	position: absolute;
	top: 0;
	left: 120%;
	width: 100%;
	height: 100%;
	transition: left 0.3s ease;
	overflow: hidden;
	display: block;
	cursor: grab;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10;
}

.progetto-collection-carousel-mobile.active {
	left: 0;
}

.progetto-collection-carousel-mobile::-webkit-scrollbar {
	display: none;
}

.progetto-collection-carousel-mobile.grabbing {
	cursor: grabbing;
}

.progetto-collection-carousel-mobile.grabbing .carousel-content {
	cursor: grabbing;
}

.carousel-close-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 20px;
	font-weight: bold;
	color: #333;
	z-index: 20;
	transition: background 0.3s ease;
	pointer-events: auto;
}

.carousel-close-btn:hover {
	background: rgba(255, 255, 255, 1);
}

.carousel-content {
	width: 100%;
	height: 100%;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	user-select: none;
}

.carousel-content::-webkit-scrollbar {
	display: none;
}

.collection-item-mobile {
	flex: 0 0 auto;
	margin-right: 10px;
	height: 100% !important;
	width: auto !important;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #FFF;
	user-select: none;
	pointer-events: none;
}

.collection-item-mobile:last-child {
	margin-right: 0;
}

/* Styling per immagini della collection */
.collection-item-mobile .collection-item-image {
	height: 100% !important;
	width: auto !important;
	flex: 0 0 auto !important;
	display: flex;
	align-items: center;
	justify-content: center;
}

.collection-item-mobile .collection-item-image img {
	height: 100%;
	width: auto;
	max-width: none;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	user-select: none;
	pointer-events: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}

/* Styling per quote mobile */
.collection-item-mobile .collection-quote-text {
	font-size: 13px;
}

/* Styling per text mobile */
.collection-item-mobile .collection-text {
	font-size: 9px;
}

/* Styling per testi e citazioni della collection mobile */
.collection-item-mobile .collection-item-text,
.collection-item-mobile .collection-item-quote {
	width: 100vw !important;
	height: unset !important;
	overflow-y: auto;
	padding: 0px 20px;
	background: #FFF;
	border-radius: 4px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 20vw !important;
  	max-width: none !important;
  	flex: inherit !important;
	max-height: 100% !important;
}

/* Navigation styles for archive and single pages */
.progetto-navigation {
	margin-top: 40px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
}

/* Mobile navigation adjustments */
@media (max-width: 768px) {
	.progetto-navigation {
		margin-top: 20px;
		padding: 15px;
	}
	
	.progetti-single-mobile .progetto-navigation {
		margin-top: 30px;
	}
}