/*
 * Galleria singolo articolo — carosello orizzontale
 * Hello Elementor Child
 */

.hec-gallery {
    position: relative;
    width: 100%;
    margin: 3rem 0;
    overflow: hidden;
}

.hec-gallery__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hec-gallery__track::-webkit-scrollbar {
    display: none;
}

.hec-gallery__item {
    flex: 0 0 auto;
    width: 70%;
    max-width: 720px;
    margin: 0;
    scroll-snap-align: start;
    aspect-ratio: 3 / 2;
    background: var(--hec-bg-soft);
    overflow: hidden;
    border-radius: 4px;
}

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

/* Frecce di navigazione */
html body button.hec-gallery__nav,
html body .hec-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid var(--hec-border) !important;
    border-radius: 50%;
    color: var(--hec-text) !important;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, opacity 0.25s ease, box-shadow 0.25s ease;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    padding: 0;
}

html body .hec-gallery__nav:hover,
html body .hec-gallery__nav:focus {
    background: #ffffff !important;
    color: var(--hec-accent) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14) !important;
    outline: none !important;
}

html body .hec-gallery__nav:active {
    transform: translateY(-50%) scale(0.95);
}

.hec-gallery__nav--prev {
    left: 1rem;
}

.hec-gallery__nav--next {
    right: 1rem;
}

.hec-gallery__nav[disabled],
.hec-gallery__nav.is-disabled {
    opacity: 0;
    pointer-events: none;
}

/* Responsive — fewer items visible on smaller screens */
@media (max-width: 768px) {
    .hec-gallery {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hec-gallery__track {
        padding: 0;
        gap: 0.75rem;
    }

    .hec-gallery__item {
        width: 85%;
    }

    html body .hec-gallery__nav {
        width: 38px;
        height: 38px;
    }

    .hec-gallery__nav--prev {
        left: 0.5rem;
    }

    .hec-gallery__nav--next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hec-gallery__item {
        width: 90%;
    }
}
