.videocatalog {
    position: relative;
    padding-top: 40px;
    padding-bottom: 40px;
}

.videocatalog__sectiontitle {
    margin-bottom: 40px;
}

.videocatalog__grid {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.videocatalog__item {
    background-color: var(--wp--preset--color--accent-2);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0px 4px 80px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    row-gap: 15px;
    transition: background-color .25s ease;
    cursor: pointer;
    &:hover {
        background-color: var(--wp--preset--color--accent-1);
        .videocatalog__title {
            color: var(--wp--preset--color--accent-2);
        }
        .videocatalog__play-btn {
            transform: translate(-50%, -50%) scale(1.1);
        }
    }
}

.videocatalog__thumb {
    height: 256px;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.videocatalog__thumb img {
    border-radius: 15px;
}

.videocatalog__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.videocatalog__play-btn.play-beat-custom {
    position: absolute;
    svg {
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
        position: relative;
        z-index: 1;
    }
    &:hover {
        &:before, &:after {
            background-color: rgba(254, 85, 6, .5);
            content: " ";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            transform: translate(-50%, -50%) scale(1);
            z-index: 0;
            opacity: 0;
            animation: beat 1.5s infinite;
        }
        &:after {
            animation-delay: 0.75s;
        }
        svg {
            filter: brightness(0) saturate(100%) invert(35%) sepia(75%) saturate(2321%) hue-rotate(3deg) brightness(101%) contrast(110%);
        }
    }
}

.videocatalog__title {
    font-size: 1.438rem;
    line-height: 1.4;
    margin-block-start: 0;
    margin-block-end: 0;
    transition: color .25s ease;
}

.videocatalog__date {
    font-size: 1.125rem;
    transition: color .25s ease;
    color: var(--wp--preset--color--base);
}

.videocatalog__item:hover .videocatalog__date {
    color: var(--wp--preset--color--accent-2);
}

.lightbox__container--video {
    max-width: 90%;
    max-height: 90vh;
    width: 100%;
    position: relative;
}

.videocatalog__embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    background: #000;
}

.videocatalog__embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox__container {
    position: relative;
    max-width: 80% !important;
    max-height: 90% !important;
    margin: 0 auto;
}

.lightbox.lightbox--active {
    margin-top: 0;
}

@media (min-width: 768px) {
    .videocatalog__grid {
        flex-direction: row;
        flex-wrap: wrap; 
        gap: 1%;
        row-gap: 20px;
    }
    
    .videocatalog__item {
        width: 49%;
        box-sizing: border-box;
    }
    
    .lightbox__container--video {
        max-width: 800px !important;
    }
}

@media (min-width: 1024px) {
    .videocatalog__item {
        width: 32%;
    }
}

@media (min-width: 1280px) {
    .videocatalog {
        padding-top: 56px;
        padding-bottom: 56px;
    }
}
