main {
    display: flex;
    flex-direction: column;
    row-gap: 0.8em;
    background-image: linear-gradient(rgba(17, 119, 150, 0.4), rgba(3, 9, 12, 0.9)), url("../webp/foto/distributori.webp");
    background-size: cover;
    background-position: 5%;
    background-repeat: no-repeat;
    align-items: center;
    justify-content: flex-start;
}

main h1 {
    margin-top: 1em;
}

main > h2:last-of-type {
    margin-top: 0.8em;
}

main > h2:last-of-type, main > h3:last-of-type {
    font-size: 1.7em;
    font-weight: 600;
}

main p {
    color: whitesmoke;
    font-weight: 400;
    line-height: 1.3em;
    font-size: 1.1em;
    margin: 0em 1em 1em 1em;
    max-width: 50em;
    text-shadow: 0px 0px 40px rgba(0, 0, 0, 0.7), 0px 0px 10px rgba(0, 0, 0, 0.6);
}

.distributore {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: linear-gradient(0deg, #b1b1b1, #c9c9c9);
    border-radius: 5px;
    margin-top: 5em;
    margin-bottom: 1em;
    padding: 10px 30px 20px 30px;
    width: 75%;
    max-width: 350px;
    height: 75vh;
    overflow: hidden;
    transition: 0.3s linear;
    box-shadow: 0px 10px 10px #0000004f, 0px 5px 5px #0000004f;
}

.distributore button:first-of-type {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3em;
}

.distributore button:first-of-type img {
    transform: rotate(180deg);
    width: 1.8em;
}

.distributore button {
    position: relative;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px;
    width: 100%;
    font: 700 18px'Poppins';
    background-color: #40d1f1;
    border: none;
    box-shadow: 0px 3px 5px #000000a0; 
    color: rgb(5, 5, 10);
    transition: 0.1s ease-in-out;
}

.distributore button img {
    position: absolute;
    left: 0.5em;
}

.distributore button:hover {
    background-color: #1d9acc;
    color: whitesmoke;
    transition: 0.1s ease-in-out;
}

.distributore button:hover img {
    filter: brightness(0) saturate(100%) invert(74%) sepia(77%) saturate(1%) hue-rotate(47deg) brightness(110%) contrast(95%);
    transition: 0.1s ease-in-out;
}

.monitor {
    position: relative;
    display: none;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    container-type: size;
}

.monitor > div {
    position: relative;
    justify-content: center;
    display: none;
    flex-wrap: wrap;
    gap: 2px;
    background-color: #202020;
    border: rgba(245, 245, 245, 0.5) 1px solid;
    border-radius: 5px;
    padding: 15px;
    overflow-x: hidden;
}

.monitor > div:not(.overlay_zoom) {
    padding: 0;
}

.distributore .menu_distributori {
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
    justify-content: flex-start;
    align-content: center;
    row-gap: 10px; 
    color: whitesmoke;
    font-size: 2em;
    font-weight: 700;
    line-height: 1em;
    text-shadow: 0px 0px 20px black;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url("../webp/distributori/laservideo.webp");
    background-position: 100% 80%;
    background-size: cover;
}

.distributore::after {
    content: "";
    position: absolute;
    display: block;
    height: 100%;
    width: 100%;
    background-color: transparent;
    animation: led 8s linear infinite alternate;
    margin: 0;
    top: 0;
    pointer-events: none;
}

.distributore .menu_distributori div {
    display: flex;
    column-gap: 10px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 85%;
}

.distributore .menu_distributori h2 {
    margin-top: 8vh;
    margin-bottom: 1em;
    font-size: 1.2em;
    line-height: 1em;
}

.distributore .menu_distributori h3 {
    font-size: 1em;
    margin-top: 1em;
    line-height: 1em;
}

.distributore .menu_distributori h2, .distributore .menu_distributori h3 {
    font-size: clamp(10px, 8vw, 1.2em);
}

.distributore .menu_distributori button {
    width: 100%;
    height: 100%;
    margin: 0px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.distributore .menu_distributori::before {
    display: none;
}



@keyframes led {
    0% {
        box-shadow: inset 0px 0px 40px red;
    }
    25% {
        box-shadow: inset 0px 0px 40px lime;
    }
    50% {
        box-shadow: inset 0px 0px 40px yellow;
    }
    75% {
        box-shadow: inset 0px 0px 40px magenta;
    }
    100% {
        box-shadow: inset 0px 0px 40px cyan;
    }
}


.distributore .overlay_istruzioni {
    text-align: center;
    align-content: center;
    position: absolute;
    color: whitesmoke;
    display: block;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 0px 0px 10px black;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5;
    animation: scorri 2s ease-in-out;
    opacity: 0;
    line-height: 1em;
    touch-action: none;
    overscroll-behavior: contain;
}

@keyframes scorri {
    0% {opacity: 0;}
    10% {opacity: 1;}
    90% {opacity: 1;}
    100% {opacity: 0;}
}

.distributore div::-webkit-scrollbar {
    display: none;
}

.distributore div img {
    width: clamp(30px, 10vw, 48px);
    background-color: whitesmoke;
}

.finger_scroll {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -100%);
    min-width: 80px;
    z-index: 10;
    opacity: 0;
    animation: scrolling 2s ease-in-out;
    background-color: transparent !important;
}

@keyframes scrolling {
    0% {translate: 0% 15%; opacity: 0;}
    10% {translate: 0% 15%; opacity: 1;}
    20% {translate: 0% 15%;}
    30% {translate: 0% -15%;}
    40% {translate: 0% -15%;}
    60% {translate: 0% 15%;}
    70% {translate: 0% 15%;}
    80% {translate: 0% -15%;}
    90% {translate: 0% -15%; opacity: 1;}
    100% {translate: 0% -15%; opacity: 0;}
}

.distributore .monitor .overlay_zoom {
    display: none;
    position: sticky;
    top: 0;
    height: 100cqh;
    margin-bottom: -100cqh;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    z-index: 10;
    overscroll-behavior: contain;
}

.distributore .monitor .overlay_zoom img {
    width: 60%;
    box-shadow: 0px 10px 10px black;
    animation: popup 0.3s ease-in-out;
}

.distributore .monitor .overlay_zoom button {
    position: absolute;
    background-color: transparent;
    box-shadow: none;
    font-size: 3em;
    width: 1em;
    margin: 0;
    right: 0.1em;
    top: 0.1em;
    padding: 0;
    color: whitesmoke;
    text-shadow: 0px 5px 5px rgba(0, 0, 0, 0.8);
}

@keyframes popup {
    from {opacity: 0; width: 20%;}
    to {opacity: 1; width: 60%;}
}


span {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    max-width: 50em;
    margin-bottom: 5em;
}

span img {
    width: 20%;
    height: 20%;
    max-width: 100px;
    max-height: 100px;
    filter: drop-shadow(0px 3px 3px #0000009c) drop-shadow(0px 5px 10px #00000036);
}



@media screen and (max-width: 768px) {

    .distributore .menu_distributori div button {
        font-size: 1.5em;
    }

    main {
        background-image: linear-gradient(rgba(17, 119, 150, 0.4), rgba(3, 9, 12, 0.9)), url("../webp/foto/distributori verticale.webp");
    }

    main h1 {
        font-size: 1.7em;
        line-height: 0.5em;
    }

    main p {
        font-size: 0.8em;
        text-align: justify;
        text-align-last: left;
        width: 85%;
    }
}