.wp-block-heading a {
    text-decoration: none;
    color: inherit;
}

.wp-block-heading a:hover {

    color: var(--wp--preset--color--link-color);
}


.alignwide,
.site-wrapper {
    max-width: 1320px;
    margin: 0 auto;
}

.wp-block-group-heading {
    margin-bottom: clamp(35px, 3.5vw, 56px);
    position: relative;
}

.wp-block-video-gallery .wp-block-group-heading {
    text-align: center;
}

.wp-block-section {
    position: relative;
    padding-bottom: var(--wp--custom--spacing--section-block-top);
    padding-top: var(--wp--custom--spacing--section-block-top);

}

.site-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.site-col {

    padding: 0 20px 30px;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.3333%;
}

h2 {
    font-size: 42px;
    line-height: 1.25;
}

h4 {
    font-size: 24px;
}

.section-heading+.section-content-wrapper {
    margin-top: 56px;
}

.wp-block-post-group a {
    text-decoration: none;
}

/** CSS Starts here */


.video-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


.video-card {
    position: relative;
    cursor: pointer;
    width: 100%;
    background-color: var(--wp--preset--color--background);
    border-radius: 10px;
    box-shadow: 0px 0px 80px -15px rgba(142, 132, 133, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}


.video-card:hover {
    box-shadow: 0px 15px 120px -10px rgba(142, 132, 133, 0.25);
}


.video-card:nth-child(1) {
    animation-delay: 0.1s;
}

.video-card:nth-child(2) {
    animation-delay: 0.2s;
}

.video-card:nth-child(3) {
    animation-delay: 0.3s;
}

.video-card:nth-child(4) {
    animation-delay: 0.4s;
}


.video-card:hover {
    transform: translateY(-8px);
}




.video-thumbnail {
    position: relative;
    overflow: hidden;
}


.thumbnail-image {
    width: 100%;
    height: 224px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    transition: transform 0.4s ease;
}


.video-card:hover .thumbnail-image {
    transform: scale(1.08);
}


.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}


.video-card:hover .play-overlay {
    opacity: 1;
}


.play-button {
    width: 56px;
    height: 56px;
    background: rgba(49, 39, 33, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    position: absolute;
    z-index: 99;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.15);
    /* Scale with position */
    background: rgba(49, 39, 33, 0.6);
}


.play-icon {
    width: 32px;
    height: 32px;
    fill: var(--wp--preset--color--background);
}


.category-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    background: var(--wp--preset--color--button-color-secondary);
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 22px;
    opacity: 1;
    transform: translateX(-50%);
    transition: all 0.2s ease;
    height: 26px;
    max-width: 300px;
    /* adjust this value as needed */
    width: auto;
    /* This makes the width auto-adjust to content */
    min-width: 0;
    /* Ensures there's no minimum width being enforced */
    text-align: center;
    display: block;
    box-sizing: border-box;
    /* ensures padding doesn't affect width */
    white-space: nowrap;
}


.video-card:nth-child(1) .category-badge {
    animation-delay: 0.3s;
}

.video-card:nth-child(2) .category-badge {
    animation-delay: 0.4s;
}

.video-card:nth-child(3) .category-badge {
    animation-delay: 0.5s;
}

.video-card:nth-child(4) .category-badge {
    animation-delay: 0.6s;
}



.video-card .card-content {
    padding: 35px;
    position: relative;
    transition: background-color 0.2s ease;
}


.video-card:hover .card-content {
    background-color: #fefefe;
}




.video-card:hover .video-title {
    color: var(--wp--preset--color--button-color)
}


.video-description {
    color: #000000;
    font-size: 15px;
    line-height: 24px;
    transition: color 0.2s ease;
}


.video-card:hover .video-description {
    color: #333333;
}


/* Modal Styles */
.wp-block-video-gallery-modal.modal-backdrop {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(15px);
    background-color: rgba(236, 236, 236, 0.8);
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    max-width: 100% !important;
    min-height: 100vh;
    z-index: 999999;
    margin: 0
}


.wp-block-video-gallery-modal.modal-backdrop.show {
    opacity: 1;
}

.wp-block-video-gallery-modal .modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    margin: 0 auto;
    max-height: 100%;
    min-height: 100vh;
    padding: 0 25px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.wp-block-video-gallery-modal .modal-container.show {
    opacity: 1;
    transform: scale(1);
}

.wp-block-video-gallery-modal .modal-video-area {
    margin-bottom: 35px;
}

.wp-block-video-gallery-modal .modal-description {
    margin-bottom: 0;
}

.wp-block-video-gallery-modal .modal-content {
    width: 1202px;
    border-radius: 10px;
    box-shadow: 0px 0px 80px 10px rgba(0, 0, 0, 0.12);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--wp--preset--color--background);
    padding: 30px;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--table-heading-color);
}


.close-button {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    /* padding: 8px; */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 45px;
    height: 45px;
    line-height: 1;
    box-sizing: border-box;
}


.close-button:hover {
    background: var(--wp--preset--color--button-color);
}

.close-button:hover .close-icon {
    color: var(--wp--preset--color--background)
}

.wp-block-video-gallery-modal .close-icon {
    width: 24px;
    height: 24px;
    color: var(--wp--preset--color--foreground)
}


.modal-video-area {
    aspect-ratio: 16 / 9;
    /* maintains 16:9 ratio */
    width: 100%;
    overflow: hidden;
}


.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}


.video-player {
    width: 100%;
    height: 100%;
}


.video-player iframe,
.video-player video {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
}


.modal-play-button {
    width: 80px;
    height: 80px;
    background: rgba(49, 39, 33, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    border: none;
    transition: all 0.2s ease;
}


.modal-play-button:hover {
    transform: scale(1.1);
    background: rgba(49, 39, 33, 0.9);
}


.modal-play-icon {
    width: 32px;
    height: 32px;
    fill: white;
    margin-left: 4px;
}


.modal-info {
    opacity: 0;
    transform: translateY(20px);
    animation: modalInfoIn 0.4s ease forwards 0.2s;
    padding: clamp(30px, 5vw, 42px);
}

.wp-block-video-gallery-modal .modal-info {
    width: 100%;
    padding: 0;
}


.modal-title {
    letter-spacing: -0.5px;
    font-size: var(--wp--preset--font-size--post-title);
    color: var(--wp--preset--color--button-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}


.modal-description {
    color: var(--wp--preset--color--body-text);
    font-size: 15px;
    line-height: 1.6;
}


/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes badgeIn {
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}


@keyframes modalInfoIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive */



@media (min-width: 567px) {
    .video-card {
        width: calc(50% - 10px);
    }
}

@media (min-width: 1024px) {

    .video-card {
        width: calc(25% - 15px);
    }
}

@media (min-width: 1200px) {
    .video-grid {
        gap: 30px;
    }

    .video-card {
        width: calc(25% - 23px);
    }
}