#maincontainer{
    max-width:400px;
}

.mainvideo{
    clear:right;	
}

.mainvideo{
    margin:10px auto 15px auto;
    padding:0;
    float:none;
    background-color: transparent;
}

.mainvideo {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px; height: 0; overflow: hidden;
}

.mainvideo  iframe,
.mainvideo  object,
.mainvideo  embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.material-symbols-outlined {
    vertical-align:bottom;
}

.nav{
    text-align:right;
}

#videotutti{
    font-size:0;
}

.videocontainer p{
    font-size: 12px;
    margin: 0;
    padding: 7px 0;
    line-height: 14px;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: left;
}

#videotutti h3{
    font-size: 16px;
    margin-bottom:0;
    clear:right;
}

.videocontainer:hover .play{
    opacity:0.5;	
}

.main{
    width: calc(50% - 20px) !important;
}

.play{
    width: 80px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -40px;
    margin-top: -40px;
    opacity: 0.3;
}

.thumbnail{
    width:100%;	
    border-radius:10px;
}

.videoframecontainer{
    position: fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    display:none;
    background:rgba(0, 0, 0, 0.8);
    z-index:9999;
    padding:20px;
}

.videoframe{
    background-color: transparent;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin:auto;
    position:relative;
    border-radius: 15px;
}

.videoContainer {
    max-width: calc(90vh / 9 * 16);
    max-height: 90vh;
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.videoframe iframe, .videoframe object, .videoframe embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.chiudivideo{
    color:#fff;
    position:absolute;
    right:10px;
    top:10px;
    font-size:18px;
    cursor:pointer;
}

.veditutti{
    font-size: 14px;
    text-align: right;
    display: block;
    text-decoration: none;
}

#videotutti {
    position: relative;
    overflow: hidden;
    padding: 0 40px; /* spazio per le frecce */
}

.videocarousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 10px;
    scroll-snap-type: x mandatory;
}

.videocarousel::-webkit-scrollbar {
    display: none;
}

.videocontainer {
    flex: 0 0 calc(25% - 7px);
    scroll-snap-align: start;
    margin: 10px 0;
    position: relative;
    cursor: pointer;
}

.scrollbtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    display: block; /* di default nascoste */
}

.scrollbtn.left {
    left: 5px;
}
.scrollbtn.right {
    right: 5px;
}

/* Responsive breakpoints */
@media screen and (max-width: 800px) {
    .videocontainer {
        flex: 0 0 calc(50% - 7px);
    }
}
@media screen and (max-width: 650px) {
    .videocontainer {
        flex: 0 0 100%;
    } 
}

/* Mostra frecce solo su desktop */
@media screen and (max-width: 651px) {
    .scrollbtn {
        display: block;
    }
} 