:root {
    --first-image-delay: 0.3s;
    --second-image-start-delay: 1.6s;
    --slider-interval: 1.5s;
    --transition-duration: 5s;
    --change-delay: 0s;
}

body {
    overflow: hidden;
    overflow-y: hidden !important;
}

.left {
    width: 50% !important;
}

.left .sub_navigation {
    transform: translateY(-5px);
}

article.layout_1_2 {
    display: flex !important;
    flex-wrap: wrap !important;
    padding-bottom: 150px !important;
    height: 100% !important;
    width: 100% !important;
}

.right {
    width: 50% !important;
    position: relative;
    overflow: hidden;
    z-index: 999;
}

.right img {
    position: absolute;
    width: calc(90%);
    max-height: 85vh;
    object-fit: contain;
    opacity: 0;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: opacity var(--transition-duration) cubic-bezier(0.4, 0.0, 0.2, 1) ease;
    will-change: opacity;
}

.right img.visible {
    opacity: 1 !important;
    transition: opacity var(--transition-duration) cubic-bezier(0.4, 0.0, 0.2, 1) ease !important;
}

.right img.fade-out {
    opacity: 0 !important;
    transition: opacity var(--transition-duration) cubic-bezier(0.4, 0.0, 0.2, 1) ease !important;
}

.right img.fade-in {
    opacity: 1 !important;
    transition: opacity var(--transition-duration) cubic-bezier(0.4, 0.0, 0.2, 1) ease !important;
}

/* Classe speciale per la prima immagine con delay personalizzato */
.right img.first-image {
    transition: opacity var(--transition-duration) cubic-bezier(0.4, 0.0, 0.2, 1) ease var(--first-image-delay) !important;
}

/* Classe per transizione sequenziale senza sovrapposizioni */
.right img.sequential-fade-out {
    opacity: 0 !important;
    transition: opacity calc(var(--transition-duration) * 0.6) cubic-bezier(0.4, 0.0, 0.2, 1) ease !important;
}

.right img.sequential-fade-in {
    opacity: 1 !important;
    transition: opacity calc(var(--transition-duration) * 0.6) cubic-bezier(0.4, 0.0, 0.2, 1) ease calc(var(--transition-duration) * 0.4) !important;
}

.info_img {
    position: fixed;
    right: 40px;
    bottom: 20px;
    color: rgb(177, 177, 177);
}

.privacy_policy {
    position: absolute;
    bottom: 20px;
    left: 60px;
    text-decoration: none;
    color: rgb(194, 194, 194);
    transition: .2s;
}

.privacy_policy:hover {
    color: rgb(79, 79, 79);
}

/* Indicatori immagini */
.image-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Controlli navigazione (opzionali) */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    z-index: 10;
}

.right img.visible+.right::before {
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Info overlay (opzionale) */
.image-info {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Accessibilità */
.indicator-dot:focus,
.image-nav:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

/* Animazioni aggiuntive */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.right img {
    animation: fadeIn 0.5s ease forwards;
    will-change: opacity, transform;
}

.indicator-dot,
.image-nav {
    will-change: transform, opacity;
}

/* Preloader per immagini */
.image-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: slideBackground 2s linear infinite;
    z-index: 1;
}

@keyframes slideBackground {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }

    100% {
        background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px;
    }
}

.right img.loaded~.image-preloader {
    display: none;
}

/* Gesture hints per mobile */
.gesture-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
    z-index: 10;
    pointer-events: none;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    20%,
    80% {
        opacity: 1;
    }
}

/* Stati per screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}