/* 视频轮播图样式 */
.video-carousel-section {
    padding: 40px 0;
    background: radial-gradient(334.87% 141.42% at 100% 100%, rgba(255, 61, 35, 0.25) 0%, rgba(255, 61, 35, 0.4) 100%), rgb(0, 0, 0); /* 默认背景色 - 橙红色渐变 */
    border-radius: 15px;
    margin: 30px 0;
    position: relative;
    transition: background 0.8s ease-in-out; /* 平滑背景色过渡 */
    overflow: hidden; /* 确保圆角效果 */
}

/* 为第二个轮播图模块添加特殊样式 */
.video-carousel-section:nth-of-type(2) {
    background: radial-gradient(334.87% 141.42% at 100% 100%, rgba(255, 157, 255, 0.25) 0%, rgba(255, 157, 255, 0.4) 100%), rgb(0, 0, 0); /* 第二个轮播图的默认背景色 - 粉紫色渐变 */
    border-left: 4px solid #7b2a8d;
}

.section-title {
    text-align: center;
    /* color: #ffffff; 白色文字，在彩色背景上更清晰 */
    color: #383838;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 添加文字阴影 */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #022169, #7b2a8d);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    /* color: rgba(255, 255, 255, 0.9); 半透明白色，在彩色背景上更清晰 */
    color: rgb(88 87 87 / 90%);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加轻微文字阴影 */
}

.video-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 轮播图容器 */
.video-carousel {
    position: relative;
    margin-bottom: 30px;
}

/* 视频卡片样式 */
.video-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 300px;
}

/* 为每个轮播项添加统一的背景色，让轮播图区域背景色变化更突出 */
.video-card:nth-child(1) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.video-card:nth-child(2) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.video-card:nth-child(3) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.video-card:nth-child(4) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.video-card:nth-child(5) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* 不在可视区域的轮播项透明度降低 */
.video-card.owl-item:not(.active) {
    opacity: 0.6;
    transform: scale(0.95);
}

.video-card.owl-item.center {
    opacity: 1;
    transform: scale(1);
}

.video-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 45%;
    height: auto;
    min-height: 300px;
    overflow: hidden;
    flex-shrink: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #d4285e;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.video-card:hover .play-button {
    background: #d4285e;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card:hover .play-button::before {
    border-left-color: #ffffff;
}

.video-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #022169;
    margin-bottom: 15px;
    line-height: 1.3;
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    color: #495057;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

.video-duration {
    background: linear-gradient(45deg, #022169, #7b2a8d);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.video-category {
    color: #7b2a8d;
    font-size: 1rem;
    font-weight: 500;
}

/* 分页控制器 */
.carousel-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 两端对齐 */
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 20;
    width: 220px; /* 增加宽度确保箭头在两端 */
}

/* 页码显示 */
.page-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #022169;
    font-weight: 500;
    flex: 1; /* 占据剩余空间 */
    justify-content: center; /* 页码居中 */
    order: 2; /* 确保页码在中间 */
}

.current-page {
    font-size: 1.2rem;
    font-weight: bold;
    color: #d4285e;
}

.total-pages {
    color: #6c757d;
}

/* 自定义导航按钮 */
.nav-btn {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    flex-shrink: 0; /* 防止按钮被压缩 */
}

/* 左箭头按钮 */
.prev-btn {
    order: 1; /* 确保左箭头在最左边 */
}

/* 右箭头按钮 */
.next-btn {
    order: 3; /* 确保右箭头在最右边 */
}

.nav-btn:hover {
    background: #d4285e;
    border-color: #d4285e;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(212, 40, 94, 0.3);
}

.nav-btn i {
    font-size: 0.9rem;
    color: #022169;
    transition: color 0.3s ease;
}

.nav-btn:hover i {
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .video-carousel-container {
        padding: 0 10px;
    }
    
    .carousel-controls {
        position: relative;
        top: auto;
        right: auto;
        margin: 0 auto 20px;
        justify-content: space-between; /* 两端对齐 */
        width: 100%;
        max-width: 400px;
        padding: 12px 20px;
    }
    
    .page-info {
        font-size: 0.8rem;
        gap: 8px;
        flex: 1;
        justify-content: center;
    }
    
    .current-page {
        font-size: 1rem;
    }
    
    .nav-btn {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    
    .video-card {
        flex-direction: column;
        min-height: auto;
        margin: 8px;
    }
    
    .video-thumbnail {
        width: 100%;
        height: 200px;
        min-height: 200px;
    }
    
    .video-info {
        padding: 20px;
    }
    
    .video-title {
        font-size: 1.3rem;
    }
    
    .video-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .video-carousel-section {
        padding: 25px 0;
        margin: 15px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .carousel-controls {
        flex-direction: row; /* 保持水平排列 */
        justify-content: space-between; /* 两端对齐 */
        gap: 0;
        padding: 12px 15px;
        width: 100%;
        max-width: 350px;
    }
    
    .page-info {
        order: 2; /* 保持页码在中间 */
        font-size: 0.75rem;
        gap: 6px;
        flex: 1;
        justify-content: center;
    }
    
    .current-page {
        font-size: 0.9rem;
    }
    
    .total-pages {
        font-size: 0.75rem;
    }
    
    .nav-btn {
        width: 24px;
        height: 24px;
        border-width: 1.5px;
        flex-shrink: 0;
    }
    
    .video-card {
        margin: 5px;
        border-radius: 15px;
    }
    
    .video-thumbnail {
        height: 160px;
        min-height: 160px;
    }
    
    .video-info {
        padding: 12px;
    }
    
    .video-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .video-description {
        font-size: 0.85rem;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .video-meta {
        padding-top: 12px;
        gap: 8px;
    }
    
    .video-duration {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .video-category {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .carousel-controls {
        max-width: 320px;
        padding: 10px 12px;
        justify-content: space-between;
    }
    
    .page-info {
        font-size: 0.7rem;
        gap: 5px;
        flex: 1;
        justify-content: center;
    }
    
    .current-page {
        font-size: 0.85rem;
    }
    
    .total-pages {
        font-size: 0.7rem;
    }
    
    .nav-btn {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    
    .video-card {
        margin: 3px;
        border-radius: 12px;
    }
    
    .video-thumbnail {
        height: 140px;
        min-height: 140px;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .video-description {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .video-meta {
        padding-top: 10px;
        gap: 6px;
    }
    
    .video-duration,
    .video-category {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

/* 加载动画 */
.video-card.loading {
    animation: cardLoading 1.5s ease-in-out infinite;
}

@keyframes cardLoading {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px);
    }
}

/* 淡入动画 */
.video-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 自定义箭头图标样式 */
.prev-btn::before {
    content: '';
    width: 0;
    height: 0;
    border-right: 8px solid #022169;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    display: block;
    transition: border-right-color 0.3s ease;
}

.next-btn::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid #022169;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    display: block;
    transition: border-left-color 0.3s ease;
}

.nav-btn:hover.prev-btn::before {
    border-right-color: white;
}

.nav-btn:hover.next-btn::before {
    border-left-color: white;
}
