/* 
   Leone Legnami - Stili Galleria
   CSS dedicato alle pagine galleria
*/

.gallery-slider {
    padding: 50px 0;
    background-color: var(--light-color);
}

.gallery-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px auto;
    justify-content: space-evenly;
    max-width: 1200px;
    padding: 0 15px;
}

.gallery-section {
    flex: 0 0 calc(33.33% - 20px);
    margin-bottom: 30px;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 200px;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.photo-card {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-container h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.slider-gallery {
    position: relative;
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.slider-wrapper {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    overflow: hidden;
}

.slider-wrapper .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-wrapper .slide.active {
    opacity: 1;
    z-index: 1;
}

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

.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.prev-slide, .next-slide {
    background-color: rgba(19, 59, 85, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.prev-slide:hover, .next-slide:hover {
    background-color: var(--secondary-color);
}

.slide-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Galleria Miniature */
.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.thumb {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thumb.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.thumb:hover {
    border-color: var(--secondary-color);
}

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

.back-link {
    text-align: center;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-thumbs {
        gap: 5px;
    }
    
    .thumb {
        width: 60px;
        height: 45px;
    }
}
