/* ============================
   OVERLAY
============================ */

.overlay-carosello {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ============================
   MODAL
============================ */

.carosello-modal {
    background: #fff;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    padding: 20px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

/* ============================
   CHIUDI
============================ */

.close-carosello {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    /* bianca, sempre visibile */
    z-index: 10000;
    padding: 4px 10px;
    /* la tiene dentro il bordo */
}

/* ============================
   CAROSELLO
============================ */

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
}

.carousel-slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================
   ZOOM
============================ */

/* Wrapper immagine dentro il modal */
.carousel-zoom-wrapper {
    width: 100%;
    height: 70vh;
    overflow: hidden;
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Immagine: inizialmente tutta visibile */
.carousel-zoom-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

/* ============================
   FRECCE
============================ */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    color: #333;
}

.btn-prev {
    left: 20px;
}

.btn-next {
    right: 20px;
}

/* ============================
   PUNTINI
============================ */

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

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

.news-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 22px;
    background: #52707c;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    /* <<< MANINA SEMPRE */
    transition: background 0.25s ease;
}