.spi-v17-wrapper { background: #000; padding: 80px 0; overflow: hidden; position: relative; }

/* 1. AUTO-HIDE CONTROLS SU INFINITE SCROLL */
.spi-v17-wrapper.mode-autoscroll .spi-footer { display: none !important; }

.embla__viewport { cursor: grab; user-select: none; }
.embla__viewport.is-dragging { cursor: grabbing; }

.embla__slide { flex: 0 0 var(--sp-w); min-width: 0; padding: 20px; position: relative; }
@media (min-width: 1024px) { .embla__slide { flex: 0 0 var(--dt-w); } }
.embla__container { display: flex; will-change: transform; }

.spi-card-v17 {
    display: block; height: var(--h-sp); border-radius: var(--spi-r);
    position: relative; overflow: hidden; background: #0a0a0a;
    text-decoration: none; transform-origin: center center;
    transition: height 0.4s ease; will-change: transform;
}

@media (min-width: 768px) { .spi-card-v17 { height: var(--h-tb); } }
@media (min-width: 1024px) { .spi-card-v17 { height: var(--h-dt); } }
@media (min-width: 1600px) { .spi-card-v17 { height: var(--h-uw); } }

.spi-img-wrap { position: absolute; inset: 0; overflow: hidden; }
.spi-parallax-img {
    position: absolute; top: 0; left: -20%; width: 140%; height: 100%;
    object-fit: cover; object-position: center; max-width: none !important; will-change: transform;
}

.spi-dimmer { position: absolute; inset: 0; background: #000; z-index: 1; will-change: opacity; }

.spi-overlay {
    position: absolute; inset: 0; padding: 50px; display: flex; align-items: flex-end; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent 60%);
    opacity: 0; transition: opacity 0.4s ease;
}
.spi-card-v17:hover .spi-overlay { opacity: 1; }

.spi-text-mask { overflow: hidden; }
.spi-title {
    color: #fff; font-size: 30px; font-weight: 300; margin: 0; letter-spacing: -0.5px;
    transform: translateY(110%); opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.is-selected .spi-title, .spi-card-v17:hover .spi-title { transform: translateY(0); opacity: 1; }

/* 2. FOOTER MODULARE E INDIPENDENTE */
.spi-footer {
    position: relative;
    height: 54px; /* Altezza fissa dettata dalle frecce */
    margin-top: 35px;
}

.spi-control-layer {
    position: absolute; inset: 0;
    display: flex; align-items: center; gap: 15px;
    padding: 0 5%;
    pointer-events: none; /* Rende il contenitore "trasparente" ai click */
}
.spi-control-layer > * { pointer-events: auto; /* Rende cliccabili solo frecce e dots */ }

/* Allineamenti Indipendenti */
.pos-left { justify-content: flex-start; }
.pos-center { justify-content: center; }
.pos-right { justify-content: flex-end; }
.pos-sides { justify-content: space-between; }

/* Frecce */
.spi-nav-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.25);
    width: 54px; height: 54px; border-radius: 50%; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    filter: invert(1); transition: all 0.3s ease;
}
.spi-nav-btn:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.spi-nav-btn svg { width: 22px; height: 22px; }

/* Dots */
.embla__dots { display: flex; gap: 10px; align-items: center; }
.embla__dot {
    background: rgba(255,255,255,0.3); width: 8px; height: 8px; border-radius: 4px; border: none;
    padding: 0; cursor: pointer; transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}
.embla__dot--selected { width: 45px; background: #fff; }

.embla__progress { height: 2px; background: rgba(255,255,255,0.15); width: 200px; margin: 40px auto; overflow: hidden; border-radius: 2px; }
.embla__progress__bar { background: #fff; width: 100%; height: 100%; transform: translateX(-100%); }
