/**
 * Video Category Term Block Styles
 * Styles for the video category term page block
 */

.td-video-category-term-banner {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 0;
    margin-bottom: 0;
}

/* Remove gap above banner only when a banner image is present */
body.tax-video_category.td-video-category-has-banner .td-main-content-wrap,
body.tax-video_category.td-video-category-has-banner .tdc-content-wrap,
body.tax-video_category.td-video-category-has-banner .tdc-row,
body.tax-video_category.td-video-category-has-banner .tdc-column,
body.tax-video_category.td-video-category-has-banner .td-pb-row,
body.tax-video_category.td-video-category-has-banner .td_block_video_category_term {
    padding-top: 0 ;
    margin-top: 0 !important;
}

body.tax-video_category.td-video-category-has-banner .td-video-category-term-banner:first-child {
    margin-top: 0 !important;
}

/* No banner: keep content below the site header */
body.tax-video_category.td-video-category-no-banner .td-main-content-wrap,
body.tax-video_category.td-video-category-no-banner .tdc-content-wrap {
    padding-top: 80px !important;
}

body.tax-video_category.td-video-category-no-banner .td_block_video_category_term {
    padding-top: 0 !important;
}

body.tax-video_category.td-video-category-no-banner .td-video-category-term-title {
    margin-top: 0;
}

.td-video-category-term-banner-image {
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.td-video-category-term-banner-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 70vh;
}

.td-video-category-term-wrapper {
    display: flex;
    gap: 30px;
    max-width: 100%;
    flex-wrap: wrap;
}

.td-video-category-term-content {
    flex: 1;
    min-width: 0;
}

.td-video-category-term-title {
    font-size: 36px;
    font-weight: 400;
    color: #262626;
    margin-bottom: 30px;
    margin-top: 30px;
    font-family: 'WoodbarnRough-Regular';
    width: 100%;
    border-bottom: 1px solid #EBEBEB;
    padding-bottom: 20px;
    text-align: left;
    text-transform: uppercase;
}

.td-video-category-term-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.td-video-category-term-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.td-video-category-term-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;/* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
    cursor: pointer;
    margin-bottom: 10px;
}

.td-video-category-term-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-video-category-term-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.td-video-category-term-thumbnail:hover .td-video-category-term-play-overlay {
    opacity: 1;
}

.td-video-category-term-play-button {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    position: relative;
    transition: transform 0.3s ease;
    border: 2px solid #FFFFF5;
}

.td-video-category-term-play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 9px solid #FFFFF5;
    border-top: 5px solid transparent;
    border-bottom: 6px solid transparent;
}

.td-video-category-term-thumbnail:hover .td-video-category-term-play-button {
    transform: scale(1.1);
}

.td-video-category-term-duration {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.875rem;
    border-radius: 0 0 3px 0;
}

.td-video-category-term-headline {
    font-size: 20px;
    font-weight: 400;
    color: #262626;
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-family: 'WoodbarnRough-Regular';
    width: 100%;
}
.td-video-category-term-tag {
    display: inline-block;
    background: #262626;
    color: #FFFFF5;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 700;
    font-family: 'Montserrat';
    width: auto;
    border-radius: 5px;
    height: 22px;
}
.td-video-category-term-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.td-video-category-term-related {
    margin-bottom: 30px;
}

.td-video-category-term-related-title {
    font-size: 26px;
    font-weight: 400;
    color: #111111;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-family: 'WoodbarnRough-Regular';
    margin-top: 0;
}

.td-video-category-term-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.td-video-category-term-related-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
}

.td-video-category-term-related-icon {
    font-size: 1.25rem;
    color: #666;
}

.td-video-category-term-related-item a {
    color: #4F4B4B;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
    font-family: 'Montserrat';
    font-weight: 500;
}

.td-video-category-term-related-item a:hover {
    color: #00A9BE;
}

.td-video-category-term-advertisement {
    margin-top: 30px;
    width: 100%;
}

.td-video-category-term-ad-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.td-video-category-term-ad-link:hover {
    opacity: 0.9;
}

.td-video-category-term-ad-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.td-video-category-term-load-more-wrap {
    margin-top: 30px;
    text-align: center;
}

.td-video-category-term-load-more {
    background: transparent;
    border: 2px solid #262626;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0px;
    color: #262626;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'WoodbarnRough-Regular';
}

.td-video-category-term-load-more:hover {
    background: #262626;
    color: #FFFFF5;
    border-color: #262626;
}

.td-video-category-term-load-more.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.td-video-category-term-loading {
    display: none;
    margin-left: 12px;
    font-size: 0.9rem;
    color: #262626;
}

.td-video-category-term-related-item--active a {
    color: #00A9BE;
}

.td-video-category-term-error,
.td-video-category-term-no-posts {
    padding: 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    text-align: center;
}

/* Video Modal */
.td-video-category-term-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-video-category-term-modal button {
    position: absolute;
    top: -40px;
    right: 0;
    background: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    color: #000;
    border-radius: 3px;
}

.td-video-category-term-modal button:hover {
    background: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .td-video-category-term-wrapper {
        flex-direction: column;
        gap: 52px;
    }
    
    .td-video-category-term-sidebar {
        width: 100%;
    }
    
    .td-video-category-term-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .td-video-category-term-banner {
        margin-bottom: 0;
    }

    .td-video-category-term-banner-image img {
        max-height: 45vh;
    }

    .td-video-category-term-title {
        font-size: 2rem;
        margin-bottom: 0;
        margin-top: 24px;
    }
    
    .td-video-category-term-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .td-video-category-term-related-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .td-video-category-term-title {
        font-size: 1.5rem;
    }
    
    .td-video-category-term-related-list {
        grid-template-columns: 1fr;
    }
}

