/* 首页视频中心：左侧大卡片，右侧两列两行。 */
.home-video-gallery .aiovg-section-videos {
    display: grid !important;
    grid-template-columns: minmax(0, 58fr) minmax(0, 21fr) minmax(0, 21fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    aspect-ratio: 3.06 / 1;
    margin: 0 !important;
}

.home-video-gallery .aiovg-item-video {
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 4px;
}

.home-video-gallery .aiovg-item-video:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
}

/* 缩略图与封面填满卡片。 */
.home-video-gallery .aiovg-thumbnail {
    position: relative;
    display: block !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    overflow: hidden;
}

.home-video-gallery .aiovg-responsive-container {
    position: relative;
    display: block;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

.home-video-gallery .aiovg-responsive-container > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 300ms ease;
}

.home-video-gallery .aiovg-item-video:hover .aiovg-responsive-container > img {
    transform: scale(1.04);
}

/* 底部渐变让文字在封面上保持清晰。 */
.home-video-gallery .aiovg-responsive-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.2) 40%,
        transparent 75%
    );
}

/* 播放图标固定居中，与底部信息分开。 */
.home-video-gallery .aiovg-svg-icon-play {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: auto !important;
    transform: none !important;
}

.home-video-gallery .aiovg-item-video:first-child .aiovg-svg-icon-play {
    width: 64px !important;
    height: 64px !important;
}

/* 标题及其他信息靠左下，发布日期和点击量排在最后。 */
.home-video-gallery .aiovg-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 16px !important;
    margin: 0 !important;
    color: #fff !important;
    text-align: left !important;
    pointer-events: none;
}

.home-video-gallery .aiovg-caption a {
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.home-video-gallery .aiovg-caption .aiovg-title {
    order: 0;
    text-align: left !important;
}

.home-video-gallery .aiovg-caption .aiovg-category,
.home-video-gallery .aiovg-caption .aiovg-tag {
    order: 1;
}

.home-video-gallery .aiovg-caption .aiovg-meta {
    order: 2;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    white-space: nowrap;
}

.home-video-gallery .aiovg-caption .aiovg-text-separator {
    display: none;
}

.home-video-gallery .aiovg-item-video:first-child .aiovg-caption {
    padding: 24px !important;
}

.home-video-gallery .aiovg-item-video:first-child .aiovg-caption a {
    font-size: 22px;
}

/* 平板端改为两列，首个视频占满一行。 */
@media (max-width: 999px) {
    .home-video-gallery .aiovg-section-videos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        aspect-ratio: auto;
    }

    .home-video-gallery .aiovg-item-video {
        aspect-ratio: 16 / 9;
    }

    .home-video-gallery .aiovg-item-video:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* 手机端改为单列，并缩小首个视频的播放图标。 */
@media (max-width: 480px) {
    .home-video-gallery .aiovg-section-videos {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .home-video-gallery .aiovg-item-video:first-child {
        grid-column: auto;
    }

    .home-video-gallery .aiovg-item-video:first-child .aiovg-svg-icon-play {
        width: 48px !important;
        height: 48px !important;
    }
}
