/* carousel.css */
.crm-carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.slide.active {
    opacity: 1;
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
}

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev { left: 10px; }
.next { right: 10px; }

.thumbnail-container {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #f5f5f5;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.thumbnail-container::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.6;
    transition: opacity 0.3s;
    cursor: pointer;
}

.thumbnail.active {
    opacity: 1;
    box-shadow: 0 0 0 2px #007bff;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    border-radius: 20px;
}

.fullscreen-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.fullscreen-modal.active img {
    transform: scale(1);
}

.modal-close {
    position: fixed;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 30px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .zoom-button {
        width: 35px;
        height: 35px;
        opacity: 0.8; /* Sempre visibile su mobile */
        top: 15px;
        right: 15px;
    }

    .zoom-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .zoom-button {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }

    .zoom-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .slide-container {
        height: 250px;
    }
    
    .nav-button {
        width: 30px;
        height: 30px;
    }
    
    .thumbnail {
        flex: 0 0 50px;
        height: 40px;
    }
    
    .slide-info h3 {
        font-size: 0.9rem;
    }
    
    .slide-info p {
        font-size: 0.8rem;
    }
}
.zoom-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slide:hover .zoom-button {
    opacity: 1;
}

.zoom-button:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.zoom-icon {
    width: 20px;
    height: 20px;
    color: #333;
}