/**
 * 火桥（huoqiao）· 多功能沉浸式 WordPress 主题
 * 联系方式：12492501@qq.com
 * 支持正版，从我做起，你的支持是我们前行的动力！
 *
 * @package   huoqiao
 * @author    三木
 * @copyright Copyright (c) 2026-09-01 huoqiao.cn
 * @license   GPL-2.0-or-later
 * @link      https://huoqiao.cn
 * @tags      template, hooks, modular, ajax, member-center, ecommerce
 */

:root {
    --hqv-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   列表布局
   ======================================== */
.hqw-video-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}
.hqw-video-scroll::-webkit-scrollbar { display: none; }
.hqw-video-scroll .hqw-video-card {
    flex: 0 0 400px;
    scroll-snap-align: start;
}

.hqw-video-douyin {
    display: grid;
    grid-template-columns: repeat(var(--video-columns, 2), 1fr);
    gap: 20px;
}

.hqw-video-grid {
    display: grid;
    grid-template-columns: repeat(var(--video-columns, 4), 1fr);
    gap: 20px;
}

/* ========================================
   卡片
   ======================================== */
.hqw-video-card {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s var(--hqv-ease), box-shadow 0.4s var(--hqv-ease);
}
.hqw-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.hqw-video-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ========================================
   封面区域
   ======================================== */
.hqw-video-cover-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #f1f5f9;
}
.hqw-video-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--hqv-ease);
}
.hqw-video-card:hover .hqw-video-cover {
    transform: scale(1.05);
}

/* ========================================
   渐变遮罩（文字可读性）
   ======================================== */
.hqw-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
}

/* ========================================
   卡片内容（叠加于封面之上）
   ======================================== */
.hqw-video-card-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

/* 分类标签 */
.hqw-video-category {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 14px;
    font-size:var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(var(--glass-blur-sm));
    border-radius: 12px;
}
.hqw-video-category i { font-size:var(--font-size-xs); }

/* 标题 */
.hqw-video-title {
    margin: 0 0 16px;
    font-size:var(--font-size-xl);
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 元数据（时长 + 日期） */
.hqw-video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size:var(--font-size-sm);
    color: rgba(255, 255, 255, 0.85);
}
.hqw-video-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hqw-video-meta-item i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--font-size-sm);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(var(--glass-blur-sm));
    border-radius: 50%;
}

/* 跳转箭头（右下角圆形） */
.hqw-video-action-btn {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--glass-blur-sm));
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
}
.hqw-video-card:hover .hqw-video-action-btn {
    background: rgba(255, 255, 255, 0.4);
    transform: translateX(4px);
}

/* ========================================
   悬停预览（播放按钮层）
   仅在悬停时浮现，用于后续接入真实视频预览；
   当前无 <video> 注入时回退为封面 + 播放按钮。
   ======================================== */
.hqw-video-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--hqv-ease);
}
.hqw-video-play-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.hqw-video-card:hover .hqw-video-play-btn { transform: scale(1.1); }
.hqw-video-card:hover .hqw-video-placeholder {
    opacity: 1;
    z-index: 5;
}

/* 悬停时隐藏文字与箭头，露出播放预览 */
.hqw-video-card:hover .hqw-video-card-content,
.hqw-video-card:hover .hqw-video-action-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ========================================
   轮播箭头导航（左右切换，原生滚动条已隐藏）
   ======================================== */
.hqw-video-carousel {
    position: relative;
}
.hqw-video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-saturate));
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.hqw-video-carousel.is-scrollable .hqw-video-nav-btn {
    display: flex;
}
.hqw-video-nav-btn:hover {
    background: rgba(15, 23, 42, 0.72);
}
.hqw-video-nav-prev { left: 12px; }
.hqw-video-nav-next { right: 12px; }
.hqw-video-nav-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

/* ========================================
   响应式（水平 padding 由 widget-container.css 统一管理）
   ======================================== */
@media (max-width: 1024px) {
    .hqw-video-grid { grid-template-columns: repeat(3, 1fr); }
    .hqw-video-scroll .hqw-video-card { flex: 0 0 340px; }
    .hqw-video-douyin { --video-columns: 3; }
    .hqw-video-title { font-size:var(--font-size-xl); }
    .hqw-video-card-content { padding: 20px; }
}

@media (max-width: 768px) {
    .hqw-video-list.hqw-video-douyin,
    .hqw-video-list.hqw-video-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }
    .hqw-video-list.hqw-video-douyin::-webkit-scrollbar,
    .hqw-video-list.hqw-video-grid::-webkit-scrollbar { display: none; }
    .hqw-video-list.hqw-video-douyin .hqw-video-card,
    .hqw-video-list.hqw-video-grid .hqw-video-card {
        flex: 0 0 85%;
        max-width: 340px;
        scroll-snap-align: center;
    }
    .hqw-video-card-content { padding: 18px; }
    .hqw-video-title { font-size:var(--font-size-xl); }
    .hqw-video-meta { font-size:var(--font-size-xs); gap: 16px; }
    .hqw-video-meta-item i { width: 24px; height: 24px; font-size:var(--font-size-xs); }
    .hqw-video-action-btn { right: 18px; bottom: 18px; padding: 6px; }
    .hqw-video-category { font-size:var(--font-size-xs); padding: 5px 12px; }
}

@media (max-width: 480px) {
    .hqw-video-list.hqw-video-douyin .hqw-video-card,
    .hqw-video-list.hqw-video-grid .hqw-video-card { flex: 0 0 88%; }
    .hqw-video-scroll .hqw-video-card { flex: 0 0 88%; max-width: 320px; }
    .hqw-video-card-content { padding: 14px; }
    .hqw-video-title { font-size:var(--font-size-lg); }
    .hqw-video-meta { font-size:var(--font-size-xs); gap: 12px; }
    .hqw-video-meta-item i { width: 22px; height: 22px; font-size:var(--font-size-xs); }
    .hqw-video-action-btn { right: 14px; bottom: 14px; padding: 5px; }
    .hqw-video-category { font-size:var(--font-size-xs); padding: 4px 10px; }
}
