/**
 * page-home.css - 首页样式
 * Hero 横幅、分类卡片
 */

/* ==============================
   首页视频横幅
   ============================== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 45vh;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.hero-banner-canvas-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

#heroBannerCanvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: 0.05em;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 24px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 有 hero 时 main-wrapper 调整顶部间距 */
body.hero-page .main-wrapper {
    padding-top: 32px !important;
}

/* ==============================
   首页分类卡片
   ============================== */
.cat-cards-section {
    padding: 0;
    position: relative;
    z-index: 2;
}

.cat-cards-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: -30px;
}

.cat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.06);
}

.cat-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cat-card-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cat-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cat-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
}

.cat-card-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 1px;
}

.cat-card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.6);
}

.dark .cat-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.dark .cat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dark .cat-card-icon {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dark .cat-card-badge {
    background: rgba(255, 255, 255, 0.1);
}

.cat-card-0,
.cat-card-1,
.cat-card-2,
.cat-card-3 {
    background: rgba(255, 255, 255, 0.8);
}

.dark .cat-card-0,
.dark .cat-card-1,
.dark .cat-card-2,
.dark .cat-card-3 {
    background: rgba(255, 255, 255, 0.1);
}

/* ==============================
   响应式
   ============================== */
@media (max-width: 768px) {
    .hero-banner {
        height: 35vh;
        min-height: 200px;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-desc {
        font-size: 0.95rem;
    }
}
