/* --- RESET E STRUTTURA GENERALE --- */
.big-portfolio-wrapper {
    width: 100%;
    margin: 40px 0;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    overflow-x: hidden;
}

.big-portfolio-wrapper * {
    box-sizing: border-box;
}

/* --- EFFETTO PROFONDITÀ SCROLL --- */
.big-project-item {
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
    position: relative;
    transform: scale(0.90);
    opacity: 0.25;
    transform-origin: center center;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s ease;
    will-change: transform, opacity;
}

.big-project-item:first-child {
    border-top: 1px solid #e5e5e5;
}

.big-project-item.is-centered,
.big-project-item.active {
    transform: scale(1);
    opacity: 1;
}

/* --- RIGA CHIUSA (HEADER CENTRATO DESKTOP) --- */
.big-project-header {
    cursor: pointer;
    display: grid;
    grid-template-columns: 250px minmax(300px, 800px);
    justify-content: center;
    gap: 40px;
    align-items: center;
    padding: 30px 20px;
}

.big-project-title-area {
    display: flex;
    flex-direction: column;
    text-align: right; 
    gap: 4px;
    opacity: 1;
    transition: opacity 1.2s ease, visibility 0.4s ease;
}

.big-year {
    font-size: 16px;
    font-weight: 400;
    color: #4b4a4a;
    margin-bottom: 2px;
}

.big-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000000;
    line-height: 1.2 !important;
}

.big-location {
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    color: #4b4a4a;
}

.big-project-preview {
    width: 100%;
    overflow: hidden;
}

.big-project-preview img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* 
 * NASCONDE SOLTANTO L'INTESTAZIONE ESTERNA E L'ANTEPRIMA 
 * (Il titolo interno .meta-header-info rimane VISIBILE!)
 */
.big-project-item.active .big-project-header {
    display: none !important;
}

/* --- ANIMAZIONE APERTURA SLIDER --- */
.big-project-details-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.big-project-item.active .big-project-details-wrapper {
    grid-template-rows: 1fr;
}

/* --- DETTAGLIO ESPANSO DESKTOP (2 COLONNE) --- */
.big-project-details {
    overflow: hidden;
    display: grid;
    grid-template-columns: 250px 1fr; 
    gap: 40px;
    padding: 0 5%;
    opacity: 0;
    transition: opacity 0.4s ease;
    width: 100%;
}

.big-project-item.active .big-project-details {
    padding-top: 20px;
    padding-bottom: 60px;
    opacity: 1;
    transition: opacity 0.6s ease 0.2s, padding 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

/* COLONNA SINISTRA DESKTOP */
.big-project-meta-col {
    position: relative;
    display: block;
}

.sticky-meta {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    text-align: right; 
    gap: 20px;
}

/* TITOLO INTERNO AL DETTAGLIO (VISIBILE) */
.meta-header-info { 
    margin-bottom: 10px; 
}
.meta-header-info .meta-title { 
    font-size: 16px; 
    font-weight: 700; 
    color: #000000; 
    margin-bottom: 2px; 
}
.meta-header-info .meta-location { 
    font-size: 14px; 
    color: #888888; 
    text-transform: uppercase; 
    margin-bottom: 6px; 
}
.meta-header-info .meta-year { 
    font-size: 14px; 
    color: #888888; 
}

.meta-tech-sheet { display: flex; flex-direction: column; gap: 15px; }
.meta-field { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; line-height: 1.3; }
.meta-field .meta-label { color: #999999; text-transform: uppercase; margin-bottom: 2px; font-size: 10px; }
.meta-field .meta-val { color: #000000; text-transform: uppercase; font-weight: 500; }
.meta-description { font-size: 12px; line-height: 1.6; color: #333333; margin-top: 10px; }

/* COLONNA DESTRA DESKTOP */
.big-project-gallery-col {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    user-select: none; 
}

.big-swiper-container {
    width: 100%;
    height: 80vh;
    min-height: 500px;
    overscroll-behavior-x: none; 
}

.big-swiper-container .swiper-slide { 
    height: 100%; 
    display: flex; 
    align-items: center; 
}

.big-swiper-container .swiper-slide.type-image { 
    width: auto; 
}

.big-swiper-container .swiper-slide.type-image img { 
    height: 100%; 
    width: auto; 
    max-width: none; 
    object-fit: contain; 
    display: block; 
}

/* Le slide duplicate per il mobile vengono NASCOSTE su Desktop */
.mobile-only-slide {
    display: none !important;
}

.big-swiper-container .swiper-slide.type-text { 
    width: 380px; 
    background: #ffffff; 
    padding: 0 40px; 
    display: flex; 
    align-items: center; 
}

.big-slide-text-content { 
    font-size: 16px; 
    line-height: 1.7; 
    color: #222222; 
}

.big-swiper-container .swiper-slide.type-map { 
    width: 800px; 
}

/* CONTROLLI SWIPER */
.swiper-pagination-fraction { 
    position: relative !important; 
    margin-top: 10px; 
    text-align: center !important; 
    font-size: 11px !important; 
    color: #888; 
}

.swiper-button-next, .swiper-button-prev { 
    color: #000000 !important; 
    transform: scale(0.65);
    /* Rimuove lo stroke interno che sbiancava la freccia */
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    /* Crea un alone/contorno bianco esterno perfetto ed elegante */
    filter: drop-shadow(0px 0px 2px #ffffff) drop-shadow(0px 0px 4px #ffffff);
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    opacity: 1;
    transform: scale(0.75);
}

.big-project-gallery-col.cursor-left {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, auto;
}

.big-project-gallery-col.cursor-right {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 16 16, auto;
}

/* --- RESPONSIVE MOBILE (SOTTO I 900PX) --- */
@media (max-width: 900px) {
    
    .big-project-header {
        grid-template-columns: 1fr !important;
        justify-content: flex-start !important;
        padding: 20px !important;
    }
    
    .big-project-details {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
    }
    
    .big-project-meta-col {
        display: none !important;
    }

    .mobile-only-slide {
        display: flex !important;
    }

    .big-swiper-container { 
        height: 60vh !important; 
        min-height: 350px !important; 
        padding-left: 15px !important;
    }

    .big-swiper-container .swiper-slide.type-image:first-child {
        max-width: 78vw !important;
    }

    .big-swiper-container .swiper-slide.type-image:first-child img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Slide Scheda Tecnica Mobile */
    .big-swiper-container .swiper-slide.type-tech-info {
        width: 250px !important;
        background: #ffffff !important;
        padding: 0 15px !important;
        display: flex !important;
        align-items: center !important;
    }

    .mobile-tech-header {
        margin-bottom: 15px;
    }
    .mobile-tech-header .meta-title {
        font-size: 13px;
        font-weight: 700;
        color: #000;
    }
    .mobile-tech-header .meta-location,
    .mobile-tech-header .meta-year {
        font-size: 11px;
        color: #888;
    }

    .big-slide-tech-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .big-slide-tech-content .meta-field {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .big-swiper-container .swiper-slide.type-text {
        width: 290px !important;
        padding: 0 20px !important;
		overflow: scroll;
    }
	.big-slide-text-content {
    	font-size: 12px;
		align-self: baseline;
	}
	/* Impedisce alla mappa di generare un canvas WebGL gigantesco che satura la RAM del telefono */
    .big-swiper-container .swiper-slide.type-map {
        width: 85vw !important;
        max-width: 400px !important;
    }
    
    /* Previene i crash grafici legati allo scroll hardware su iOS */
    .big-google-map-container {
        transform: translateZ(0); 
        -webkit-transform: translateZ(0);
    }
}