/* =================================================================
   Hero Section - 首页英雄区组件
   ================================================================= */

/* ==================== 文件说明 ====================
 * 文件名称: index_hero.css
 * 所属层级: components（组件层）
 * 文件用途: 首页顶部Hero区域样式（标题、搜索、特色展示）
 * 应用场景: 首页 index.htm
 * 依赖关系: 依赖 base/variables.css、layout/common.css
 * 维护说明: 包含多个子组件（标题、搜索框、特色卡片、分类导航）
 * ================================================== */

/* ==================== 目录结构 ====================
 * 1. Hero区域容器（背景、布局）
 * 2. 标题区域（主标题、副标题）
 * 3. 搜索框组件（输入框、按钮、建议列表）
 * 4. 特色卡片区域（三列卡片布局）
 * 5. 资源分类导航
 * 6. 背景装饰元素
 * 7. 主题适配（暗色模式）
 * 8. 响应式设计（移动端、iPad端）
 * ================================================== */

.hero-section {
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(127, 255, 0, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

[data-theme="dark"] .hero-section::before {
    opacity: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 550px;
    gap: 60px;
    align-items: center;
}

/* ========================================
   左侧内容区域
   ======================================== */

.hero-left {
    position: relative;
    z-index: 1;
}

/* 主标题 */
.hero-title {
    margin: 0 0 24px;
    line-height: 1.2;
}

.hero-title-normal {
    display: block;
    font-size: 60px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hero-title-highlight {
    display: inline-block;
    position: relative;
    font-size: 80px;
    font-weight: 900;
    letter-spacing: 2px;
}

/* 绿色高亮背景 */
.highlight-bg {
    position: absolute;
    top: 80%;
    left: -15px;
    right: -25px;
    height: 55%;
    transform: translateY(-50%) skewX(-5deg);
    background: linear-gradient(135deg, var(--brand-green-light) 0%, var(--brand-green-dark) 100%);
    border-radius: 12px;
    z-index: -1;
}

/* 暗色模式 - 高亮背景透明度 */
[data-theme="dark"] .highlight-bg {
    opacity: 0.8;
}

/* 高亮文字 - 明亮模式为黑色，暗色模式为绿色渐变 */
.highlight-text {
    position: relative;
    display: inline-block;
}

/* 明亮模式 - 黑色文字 */
[data-theme="light"] .highlight-text {
    color: var(--brand-black);
    -webkit-text-fill-color: var(--brand-black);
    font-weight: 900;
}

/* 暗色模式 - 纯白色文字 */
[data-theme="dark"] .highlight-text {
    color: var(--text-primary);
    font-weight: 900;
}

/* 副标题 */
.hero-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    margin: 0 0 40px;
    font-weight: 400;
}

.highlight-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 28px;
}

/* ========================================
   搜索框（Hero专用）
   ======================================== */

.hero-search {
    position: relative;
    margin-bottom: 32px;
    max-width: 600px;
}

.hero-search-input {
    width: 100%;
    height: 56px;
    padding: 0 60px 0 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 28px;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.hero-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.hero-search-input::placeholder {
    color: var(--text-tertiary);
}

.hero-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-search-btn:hover {
    background: var(--primary-active);
    transform: translateY(-50%) scale(1.05);
}

/* ========================================
   行动按钮
   ======================================== */

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* 公众号二维码按钮 */
.qrcode-btn-wrapper {
    position: relative;
    display: inline-block;
}

.qrcode-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-bottom: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    text-align: center;
    min-width: 200px;
}

.qrcode-btn-wrapper:hover .qrcode-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.qrcode-popup img {
    width: 180px;
    height: 180px;
    display: block;
    margin: 0 auto 12px;
    border-radius: 8px;
}

.qrcode-popup p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 二维码弹窗箭头 */
.qrcode-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--card-bg);
}

[data-theme="dark"] .qrcode-popup {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-active);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-normal);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
}

/* ========================================
   底部通知 - 已移至 article-marquee 组件
   ======================================== */

/* ========================================
   右侧装饰插画
   ======================================== */

.hero-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    width: 100%;
    max-width: 100%;
}

.hero-illustration img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .hero-illustration img {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* ========================================
   响应式设计
   ======================================== */

/* iPad端: 768px - 1199px */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-content {
        grid-template-columns: 1fr 350px;
        gap: 40px;
    }
    
    .hero-title-normal {
        font-size: 48px;
    }
    
    .hero-title-highlight {
        font-size: 64px;
    }
    
    .hero-section {
        padding: 60px 0 80px;
    }
}

/* 移动端: 0 - 767px */
@media (max-width: 767px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-right {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-section {
        padding: 40px 0 60px;
    }
    
    .hero-title-normal {
        font-size: 28px;
    }
    
    .hero-title-highlight {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .highlight-number {
        font-size: 22px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .hero-search-input {
        height: 48px;
        font-size: 14px;
    }
    
    .hero-illustration {
        max-width: 300px;
    }
    
    .highlight-bg {
        left: -12px;
        right: -8px;
    }
}

