/* Table Thumbnails Layout */
.table-thumbnail-item {
    list-style: none !important;
    display: inline-block !important;
    vertical-align: top !important;
    margin: 0 !important;
    padding: 0 !important;
}

.table-thumbnail-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.table-thumbnail-link:hover,
.table-thumbnail-link:focus {
    transform: translateY(-2px);
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.table-thumbnail-image-wrapper {
    width: 220px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.table-thumbnail-image {
    width: 220px;
    height: 200px;
    object-fit: cover;
    display: block;
}

.table-thumbnail-title {
    width: 220px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    background-color: #4f4f4f;
    border: 1px solid #ddd;
    border-top: none;
}

.table-thumbnail-title-text {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: #FFFFFF;
    word-wrap: break-word;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-thumbnail-image-wrapper,
    .table-thumbnail-image,
    .table-thumbnail-title {
        width: 180px;
    }
    
    .table-thumbnail-image-wrapper {
        height: 160px;
    }
    
    .table-thumbnail-image {
        height: 160px;
    }
}

/* Video thumbnail styling */
.video_list .th_video_map {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: block;
    width: 100%;
    background: #f5f5f5;
}

/* Dark overlay that appears on hover */
.video_list .th_video_map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Play button circle */
.video_list .th_video_map::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: 3px solid #fff;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Play button triangle - using a separate span added via PHP */
.video_list .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    z-index: 3;
    pointer-events: none;
    transition: border-left-color 0.3s ease;
}

.video_list .th_video_map:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.video_list .th_video_map:hover::after {
    background: rgba(242, 192, 53, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video_list .th_video_map:hover .play-icon {
    border-left-color: #fff;
}

.video_list .th_video_map:hover {
    transform: scale(1.02);
}

.video_list .th_video_map img {
    display: block;
    width: 100%;
    height: 158px;
    max-width: 100%;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 0;
}

.video_list .th_video_map:hover img {
    opacity: 0.95;
}

/* Fix for video title container */
.video_list .video_title {
    min-height: 100px;
    height: auto;
    /*padding: 8px;*/
    background: #4f4f4f;
    border-top: 1px solid #ddd;
    margin-top: 0;
    word-break: break-word;
    white-space: normal;
}

.video_list .video_title table {
    width: 100% !important;
    height: 100% !important;
}

.video_list .video_title td {
    padding: 5px;
    vertical-align: middle;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: #FFFFFF;
    word-break: break-word;
    white-space: normal;
}

/* Video list item spacing */
.video_list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.video_list li {
    flex: 0 0 auto;
    width: 220px;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.video_list li:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Focus state for accessibility */
.video_list a:focus {
    outline: 3px solid #F2C035;
    outline-offset: 2px;
}

.video_list a:focus .th_video_map {
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video_list li {
        width: 180px;
    }
}

