/* Aggiornamento per gestire l'altezza del popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 20px 40px 20px;
}

.popup-container {
    position: relative;
    background-color: var(--background-color);
    max-width: 1000px;
    width: 100%;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: popupFadeIn 0.3s ease;
    max-height: calc(100vh - 40px);
}

.popup-content {
    padding: 0;
    color: var(--primary-color);
    line-height: 1.6;
    max-height: calc(100vh - 300px); /* Aumentato lo spazio disponibile */
    overflow-y: auto;
}

.popup-header h3 {
    margin: 15px 0 0 15px; /* margine sopra e a sinistra */
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 20px;
    color: var(--primary-color);
}



/* Video container ridotto */

/* Video con filtro di tonalità e senza bordi arrotondati */
.workshop-video {
    width: 100%;
    padding: 20px;
    background-color: var(--background-color);
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}


.workshop-video video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center center;
    border-radius: 0; /* Rimuove i bordi arrotondati */
}


.workshop-video img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center center;
    border-radius: 0; /* Rimuove i bordi arrotondati */
}


#videotop video {
    object-position:center 20%;
}


/* Overlay per il filtro di tonalità */
.workshop-video::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background-color: #008eba;
    mix-blend-mode:color;
    pointer-events: none;
}


/* Tab stili simili al menu del sito */
.workshop-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin: 0;
    background-color: var(--background-color);
}

.workshop-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    color: var(--primary-color);
    transition: color 0.3s;
    border-bottom: 2px solid transparent;
}

.workshop-tab:hover,
.workshop-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Content styling */
.workshop-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.workshop-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Two column layout */
.workshop-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.workshop-column h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

.workshop-column p {
    margin-bottom: 15px;
}

/* Result images */
.workshop-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Immagini senza bordi e che si adattano senza tagliare */
.result-image {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Mostra l'immagine intera senza tagliarla */
    border: none; /* Rimuove il bordo */
    border-radius: 0; /* Rimuove i bordi arrotondati */
    
}



/* Responsive */
@media (max-width: 768px) {
    .workshop-video {
        height: 150px; /* Ancora più piccolo su mobile */
    }
    
    .workshop-video video {
        height: 110px;
    }
    
    .popup-content {
        max-height: calc(100vh - 250px);
    }
    
    .workshop-two-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .workshop-results {
        grid-template-columns: 1fr;
    }
    
    .workshop-tabs {
        flex-direction: column;
    }
    
    .workshop-tab {
        border-bottom: 1px solid #eee;
        border-right: none;
    }
}


/* Popup intro text styling - da aggiungere dopo .popup-content */
.popup-intro-text {
    font-size: 18px;
    margin-bottom: 25px;
    margin-right: 50%;
    color: var(--secondary-color);
}

/* Variante con testo a destra */
.popup-intro-text-right {
    font-size: 18px;
    margin-bottom: 25px;
    margin-left: 50%;
    color: var(--secondary-color);
}

/* Responsive: su mobile occupano tutta la larghezza */
@media (max-width: 768px) {
    .popup-intro-text {
        margin-right: 0 !important;
    }
    
    .popup-intro-text-right {
        margin-left: 0 !important;
    }
}