/* 由外层 portal-main 提供外边距，与 experts 一致 */
.footage-container {
    width: 100%;
    padding: 0 0 clamp(2rem, 6vmin, 3.125rem);
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}
a:hover {
    text-decoration: none;
    color: inherit;
}

/* ================= Hero Section ================= */
.footage-hero {
    display: flex;
    gap: var(--portal-space-lg);
    margin-bottom: var(--portal-space-lg);
    height: min(25rem, 55vh);
}

/* 仅主卡、无右侧缩略图时占满宽 */
.footage-hero--single {
    height: auto;
    min-height: min(16rem, 40vh);
}
.footage-hero--single .hero-left {
    flex: 1;
    width: 100%;
    max-width: 100%;
}

/* Hero Left */
.hero-left {
    flex: 1.5; /* Larger main video */
    position: relative;
    /* border-radius: 8px; */
    overflow: hidden;
}

.hero-main-card {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main-card:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: clamp(1rem, 3vmin, 1.875rem);
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.hero-overlay h3 {
    color: #fff;
    font-size: var(--portal-font-title);
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.play-btn-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--portal-hero-play-btn);
    height: var(--portal-hero-play-btn);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--portal-font-title);
    opacity: 0;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.6);
}

.hero-main-card:hover .play-btn-large {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Hero Right */
.hero-right {
    flex: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: var(--portal-space-16);
    height: 100%;
}

.hero-grid-item {
    position: relative;
    /* border-radius: 6px; */
    overflow: hidden;
    display: block;
}

.hero-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-grid-item:hover img {
    transform: scale(1.05);
}

.hero-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--portal-space-sm) var(--portal-space-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.hero-grid-overlay p {
    color: #fff;
    font-size: var(--portal-font-caption);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: var(--portal-font-content);
    opacity: 0;
    transition: opacity 0.2s;
}

.hero-grid-item:hover .play-btn-small {
    opacity: 1;
}

/* ================= Main Content Layout ================= */
.footage-content {
    display: flex;
    gap: var(--portal-space-lg);
    width: 100%;
}

.content-left {
    flex: var(--portal-content-sidebar-ratio);
    min-width: 0;
}

.content-right {
    flex: var(--portal-sidebar-ratio);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-lg);
}

/* 无侧栏时主栏占满 */
.footage-content > .content-left:only-child {
    flex: 1;
    max-width: 100%;
}

/* 左侧录像分类：保留 video.htm 旧结构样式（category-section/category-tabs/tab-item） */
.category-section {
    margin-bottom: 0;
    background: var(--portal-bg-card);
    padding: var(--portal-space-16);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9375rem;
    padding-bottom: var(--portal-space-md);
}
.category-tabs {
    display: flex;
    gap: 0;
}
.tab-item {
    font-size: var(--portal-font-content);
    font-weight: 600;
    color: var(--portal-text);
    cursor: pointer;
    padding: var(--portal-space-sm) var(--portal-space-xl);
    transition: all 0.2s;
    background-color: transparent;
}
.tab-item.active {
    background-color: var(--portal-primary);
    color: var(--portal-text-inverse);
}
.tab-item:hover:not(.active) {
    color: var(--portal-primary);
    background-color: var(--portal-bg-hover);
}
.category-more {
    font-size: var(--portal-font-caption);
    color: var(--portal-text-muted);
}
.category-more:hover {
    color: var(--portal-primary);
}

/* 左侧录像分类：/footage 复用首页块（portal-block-recommend + portal-info-body）时的补充 */
.footage-main-block {
    margin-bottom: 0;
}
.content-left .footage-category-block-title {
    flex-wrap: wrap;
    align-items: center;
    gap: var(--portal-space-sm);
}
.footage-category-tabs-wrap {
    flex: 1;
    min-width: 0;
}
.content-left .category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.content-left .portal-info-tab.tab-item {
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.content-left .portal-info-tab.tab-item:hover:not(.act) {
    color: var(--portal-primary);
    background-color: var(--portal-bg-hover);
}

/* Video Grid 4 Cols */
.video-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--portal-space-16);
}

.video-card-simple {
    display: block;
    transition: transform 0.2s;
    width: 100%;
    overflow: hidden;
}

.video-card-simple:hover {
    transform: translateY(-3px);
}

.video-card-simple .card-thumb {
    position: relative;
    /* border-radius: 6px; */
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 */
    background: var(--portal-bg-alt);
    margin-bottom: var(--portal-space-sm);
    width: 100%;
}

.video-card-simple .card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-duration {
    position: absolute;
    bottom: var(--portal-space-xs);
    right: var(--portal-space-xs);
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: var(--portal-font-xs);
    padding: var(--portal-space-2xs) var(--portal-space-xs);
    /* border-radius: 3px; */
}

.play-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--portal-font-title);
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card-simple:hover .play-icon-overlay {
    opacity: 1;
}

.video-card-simple .card-title {
    font-size: var(--portal-font-caption);
    line-height: 1.4;
    color: var(--portal-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
}

.video-card-simple:hover .card-title {
    color: var(--portal-primary);
}

/* ================= Sidebar Styles ================= */
.sidebar-block {
    background: var(--portal-bg-card);
    padding: var(--portal-space-16);
    /* border-radius: 8px; */
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sidebar-header {
    margin-bottom: 0.9375rem;
    border-left: var(--portal-radius-sm) solid var(--portal-primary);
    padding-left: var(--portal-space-md);
}

.sidebar-header h3 {
    margin: 0;
    font-size: var(--portal-font-block);
    font-weight: 600;
    color: var(--portal-text);
}

/* Sidebar List */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-16);
}

.sidebar-item {
    display: flex;
    gap: var(--portal-space-16);
}

.sidebar-thumb {
    width: var(--portal-sidebar-thumb-w);
    height: var(--portal-sidebar-thumb-h);
    /* border-radius: 4px; */
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-title {
    font-size: var(--portal-font-caption);
    line-height: 1.4;
    margin: 0;
    color: var(--portal-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-time {
    font-size: var(--portal-font-xs);
    color: var(--portal-text-muted);
}

/* Highlight List */
.highlight-list {
    display: flex;
    flex-direction: column;
    gap: var(--portal-space-16);
}

.highlight-item {
    font-size: var(--portal-font-caption);
    color: var(--portal-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: var(--portal-space-xs) 0;
    border-bottom: 1px dashed var(--portal-border);
}

.highlight-item:hover {
    color: var(--portal-primary);
}

.highlight-item i {
    color: var(--portal-text-muted);
    margin-right: var(--portal-space-xs);
}

/* 响应式由 portal-main 统一处理，无需单独设置 */
@media (max-width: 992px) {
    .footage-hero {
        flex-direction: column;
        height: auto;
    }

    .hero-left {
        width: 100%;
    }

    .hero-main-card {
        height: auto;
        min-height: min(12.5rem, 45vh);
        aspect-ratio: 16 / 9;
    }
    
    .hero-right {
        height: min(18.75rem, 50vh);
    }
    
    .footage-content {
        flex-direction: column;
    }
    
    .content-right {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* 窄屏隐藏主视频旁的缩略图网格（与正文列表重复且占高） */
    .footage-hero .hero-right {
        display: none;
    }

    .video-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-header {
        gap: var(--portal-space-sm);
    }

    .category-tabs {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-item {
        flex: 0 0 auto;
    }

    .category-more {
        flex-shrink: 0;
    }

    .content-left .footage-category-block-title {
        gap: var(--portal-space-sm);
    }

    .content-left .category-tabs {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .content-left .portal-info-tab.tab-item {
        flex: 0 0 auto;
    }

    .content-left .footage-category-block-title .portal-block-more {
        flex-shrink: 0;
    }
}
