/* General Wrapper */
.video-gallery-wrapper {
    padding: 30px 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Grid Layout */
.video-items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Card */
.video-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px dashed #0f315133;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.video-card:hover {
    transform: translateY(-8px);
    border-color: #0f3151;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Card Body */
.video-card-body {
    padding: 15px;
    position: relative;
}

/* Thumbnail */
.video-thumbnail-wrapper {
    position: relative;
    margin-bottom: 15px;
}
.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}
.video-card:hover .video-thumbnail {
    transform: scale(1.02);
}

/* Play Button */
button.pb-pos.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1200 0%, #f15985 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.video-card:hover button.pb-pos.play-button {
    opacity: 1;
    z-index: 1;
}
.playIcon, .pauseIcon {
    fill: #fff;
    width: 24px;
    height: 24px;
}
.pauseIcon { display: none; }

/* Video Actions */
.video-actions {
    text-align: left;
}
.video-actions a.btn-view-video {
    text-decoration: none;
    color: #0f3151;
    font-weight: 600;
    font-size: 15px;
    display: inline-block;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
}
.video-actions a.btn-view-video:hover {
    color: #ff1200;
}
.channel-view {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}
.channel-view p {
    margin: 0;
    width: 50%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
}
p.views{
    text-align: end;
}

/* Responsive */
@media (max-width: 992px) {
    .video-g {
        flex: 0 0 48%;
    }
}
@media (max-width: 768px) {
    .video-g {
        flex: 0 0 100%;
    }
    .video-thumbnail {
        height: 160px;
    }
}
.video-g {
    width: 100%; /* fallback for smaller screens */
}

/* 1440px and up */
@media (min-width: 1440px) {
    .video-g {
        width: 23.9%;
    }
}

/* 1362px and up */
@media (max-width: 1439px) and (min-width: 1362px) {
    .video-g {
        width: 23.8%;
    }
}

/* 1366px and low */
@media (max-width: 1366px) {
    .video-gallery-wrapper{
        width: 96%;
    }
}

/* 1248px and up */
@media (max-width: 1361px) and (min-width: 1248px) {
    .video-g {
        width: 23.7%;
    }
}

/* 1152px and up */
@media (max-width: 1247px) and (min-width: 1152px) {
    .video-g {
        width: 32%;
    }
}

/* 999px and up */
@media (max-width: 1151px) and (min-width: 999px) {
    .video-g {
        width: 31.9%;
    }
}

/* 992px and up */
@media (max-width: 998px) and (min-width: 992px) {
    .video-g {
        width: 48%;
    }
}

/* Below 768px (mobile) */
@media (max-width: 768px) {
    .video-g {
        width: 100%;
    }
    .video-gallery-wrapper{
        width: 90%;
    }
}
