.detail-maxbox {
    font-family: Arial, sans-serif;
}

.detail-video-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    overflow: hidden;
    padding: 18px 80px;
}

.detail-video-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 20%;
    box-sizing: border-box;
    padding: 10px;
    text-align: center;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.detail-video-thumbnail {
    position: relative;
    width: 100%;
    height: 12vw;
    background-color: #000;
}

.detail-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    box-sizing: border-box;
    padding: 0;
    border: none;
    margin: auto;
    display: block;
    width: 0;
    height: 0;
    min-width: 100%;
    max-width: 100%;
    min-height: 100%;
    max-height: 100%;

    width: initial;
    height: initial;
    object-fit: initial;
    object-position: 50% 50%;
}

.detail-video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    background-color: rgba(255, 255, 255, .4);
    backdrop-filter: blur(8px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.detail-video-caption {
    padding: 10px 0px;
    font-size: 16px;
    line-height: 20px;
    margin-bottom: 5px;
    display: inline-block;
    color: #161a1d;
    width: 100%;
    text-align: left;
}

.detail-video-duration {
    font-size: 14px;
    line-height: 16px;
    color: #5e676e;
    width: 100%;
    text-align: left;
    display: none;
}

/* Modal Styles */
.detail-modals {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 1);
}

.detail-modal-content {
    /* background-color: #fefefe; */
    padding: 20px;
    /* border: 1px solid #888; */
    width: 80%;
    max-width: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.detail-close {
    color: #f00;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
    cursor: pointer;
    z-index: 2;
}

.ideodetail-close {
    color: #fff;
    width: 30px;
    position: absolute;
    top: -26px;
    right: -12px;
    right: -28px;
}

.ideodetail-close svg {
    width: 30px;
    height: 30px;
}

.detail-close:hover,
.detail-close:focus {
    color: #900;
    text-decoration: none;
    cursor: pointer;
}

.detail-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.detail-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}

.detail-video-play-button::after {
    content: "";
    position: absolute;
    border: 8px solid rgba(0, 0, 0, 0);
    border-left: 12px solid #161a1d;
    left: calc(50% + 6px);
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Media Query for mobile devices */
@media (max-width: 1024px) {
    .detail-video-gallery {
        flex-wrap: nowrap;
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 0;
    }

    .detail-video-item:last-child {
        margin-right: 0;
    }

    .detail-video-item {
        flex: 0 0 auto;
        margin-right: 16px;
        margin-bottom: 30px;
    }

    .detail-modal-content {
        /* background-color: #fefefe; */
        /* padding: 20px; */
        /* border: 1px solid #888; */
        width: 90%;
        max-width: 90%;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 959px) {
    .detail-video-gallery {
        display: flex;
        gap: 10px;
        max-width: 1530px;
        margin: 0 auto;
        overflow-x: auto;
        overflow-y: visible;
        padding: 20px 10px;
    }

    .detail-video-item {
        width: 238px;
        padding: 20px 10px;
        margin-right: 0;
    }

    .detail-video-item {}

    .detail-video-thumbnail {
        height: 160px;
    }
.detail-modal-content{
    width: 100%;
    max-width: 100%;
    padding: 0;
}
    .ideodetail-close {
        bottom: -47%;
        right: 50%;
        top: unset;
    }
}

@media (max-width:480px) {
    .detail-video-caption {
        padding: 10px 0px;
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 5px;
        display: inline-block;
        color: #161a1d;
        width: 100%;
        text-align: left;
    }
}