/* CSS per il Popup */
.videogallery-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.videogallery-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 80%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 30px;
}

#videogallery-popup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.videogallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%);
}

.videogallery-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.videogallery-popup-close:hover,
.videogallery-popup-close:focus {
    color: #ccc;
}

.videogallery-header {
    position: absolute;
    width: 100%;
}

#videogallery-popup-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0px !important;
    padding: 15px 30px;
    text-align: left;
    background: linear-gradient(179deg, #0000007a, transparent);
}

.videogallery-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    text-align: left;
    background: linear-gradient(0deg, #0000005c 70%, transparent);
}

.videogallery-description {
    font-size: 16px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: pre-line;
}

.show-more-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    margin-top: 5px;
    align-self: flex-start;
}

.show-more-btn:hover,
.show-more-btn:focus {
    text-decoration: underline;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    position: absolute;
    top: 0px;
    display: none;
}

.social-share-buttons a {
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.social-share-buttons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Controlli personalizzati */
.videogallery-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: absolute;
    right: 0px;
    flex-direction: column;
    flex-wrap: nowrap;
    top: 50%;
    transform: translateY(-50%);
}

.videogallery-controls button {
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    margin-right: 15px;
}

.videogallery-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Controlli personalizzati */
.videogallery-morevideo {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: absolute;
    left: 0px;
    flex-direction: column;
    flex-wrap: nowrap;
    top: 50%;
    transform: translateY(-50%);
}

.videogallery-morevideo button {
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    margin-left: 15px;
}

.videogallery-morevideo button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

video::-webkit-media-controls {
    display: none !important;
}

video::-moz-media-controls {
    display: none !important;
}

video::-ms-media-controls {
    display: none !important;
}

video::-media-controls {
    display: none !important;
}





.videogallery-popup .videogallery-popup-content{
    transition: transform .4s ease-in-out;
}



.videogallery-popup.slide-leave.slide-next .videogallery-popup-content{
    transform: translate(-50%, -250%);
}
.videogallery-popup.slide-enter.slide-next .videogallery-popup-content{
    transform: translate(-50%, 250%);
}

.videogallery-popup.slide-leave.slide-prev .videogallery-popup-content{
    transform: translate(-50%, 250%);
}
.videogallery-popup.slide-enter.slide-prev .videogallery-popup-content{
    transform: translate(-50%, -250%);
}