/* Gallery slider component
   Used by: service_detail.php, contatti.php, index.php
   Markup: <div class="gallery-slider" data-gallery data-interval="5000">...</div> */

.gallery-slider {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    background: #000;
    aspect-ratio: 16 / 9;
}

.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.gallery-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .gallery-slider {
        aspect-ratio: 4 / 3;
        border-radius: 12px;
    }
    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    .gallery-prev { left: 8px; }
    .gallery-next { right: 8px; }
}
