/* =====================================================
 * VIDEOCLIPS GRID IMPROVEMENTS
 * YouTube-Style Card Layout
 * ===================================================== */

/* --- 1. Grid Container --- */
.viewgrid .row {
    margin-left: -10px;
    margin-right: -10px;
}

.video-grid-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
}

/* --- 2. Video Card --- */
.video-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ccc;
}

/* --- 3. Thumbnail Container (16:9) --- */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
    display: block;
    cursor: pointer;
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail-container img {
    transform: scale(1.05);
}

/* --- 4. Play Button Overlay --- */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-overlay i {
    color: #fff;
    font-size: 28px;
    margin-left: 3px;
    /* Optical centering */
}

.video-card:hover .play-overlay {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* --- 5. Video Info Section --- */
.video-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: #030303;

    /* Truncate to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    /* 2 lines */
}

.video-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.video-title a:hover {
    color: #065fd4;
    /* YouTube blue */
}

.video-meta {
    font-size: 13px;
    color: #606060;
    margin: 0;
}

.video-meta i {
    margin-right: 4px;
}

/* --- 6. Icon New --- */
.icon_new {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* --- 7. Responsive Breakpoints --- */

/* Mobile - Force 1 column */
@media (max-width: 767px) {

    .viewgrid .video-grid-col,
    .viewgrid .col-xs-12,
    .viewgrid .col-sm-12 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    .video-title {
        font-size: 14px;
    }

    .play-overlay {
        width: 50px;
        height: 50px;
    }

    .play-overlay i {
        font-size: 24px;
    }
}

/* Tablet - 2 columns */
@media (min-width: 768px) and (max-width: 991px) {

    .viewgrid .video-grid-col,
    .viewgrid .col-sm-12 {
        width: 50% !important;
    }
}

/* Desktop - 3 columns */
@media (min-width: 992px) {

    .viewgrid .video-grid-col,
    .viewgrid .col-md-8 {
        width: 33.33% !important;
    }
}