/* 左文右图幻灯片样式 */

/* 幻灯片容器 */
.hero-slider-section { 
    max-width: 1400px; 
    margin: 30px auto; 
    padding: 0 20px; 
}

.hero-slider-container { 
    position: relative; 
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); 
    background: #fff;
    transition: background 0.3s, box-shadow 0.3s;
}

/* 暗色主题背景 */
[data-theme="dark"] .hero-slider-container {
    background: #1a1a1a;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* 单个幻灯片项 */
.hero-slide { 
    display: none; 
    position: relative;
}

.hero-slide.active { 
    display: flex; 
    align-items: center;
    /* 默认高度稍微收紧，减少上下留白；仍可在JSON里用 slide_height 覆盖 */
    min-height: var(--hero-slide-h, 380px);
}

/* 左侧文字区域 */
.hero-content { 
    flex: 1; 
    padding: 44px 50px; 
    z-index: 2;
}

.hero-tag { 
    display: inline-block;
    padding: 6px 16px;
    /* 支持在 JSON 中通过 tag_bg/tag_color/tag_size/tag_weight 定制（见 index/index.html 的 CSS 变量） */
    background: var(--hero-tag-bg, linear-gradient(135deg, #007AFF 0%, #0051D5 100%));
    color: var(--hero-tag-color, #fff);
    border-radius: 20px;
    font-size: var(--hero-tag-fs, 13px);
    font-weight: var(--hero-tag-fw, 600);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title { 
    font-size: 42px; 
    font-weight: 700; 
    color: #1a1a1a; 
    margin-bottom: 16px;
    line-height: 1.2;
    transition: color 0.3s;
}

[data-theme="dark"] .hero-title {
    color: #ffffff;
}

.hero-subtitle { 
    font-size: 18px; 
    color: #666; 
    margin-bottom: 24px;
    line-height: 1.6;
    transition: color 0.3s;
}

[data-theme="dark"] .hero-subtitle {
    color: #aaa;
}

.hero-description { 
    font-size: 15px; 
    color: #999; 
    margin-bottom: 32px;
    line-height: 1.8;
    transition: color 0.3s;
    /* 允许 JSON 文本中使用 \n 进行换行 */
    white-space: pre-line;
}

[data-theme="dark"] .hero-description {
    color: #888;
}

.hero-buttons { 
    display: flex; 
    gap: 16px; 
    flex-wrap: wrap;
}

.hero-btn { 
    padding: 14px 32px; 
    border-radius: 12px; 
    text-decoration: none; 
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-btn-primary { 
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%); 
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.hero-btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

.hero-btn-secondary { 
    background: white; 
    color: #4a90e2;
    border: 2px solid #4a90e2;
    transition: all 0.3s;
}

[data-theme="dark"] .hero-btn-secondary {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    border-color: #4a90e2;
}

.hero-btn-secondary:hover { 
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

[data-theme="dark"] .hero-btn-secondary:hover {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-color: transparent;
}

/* 右侧图片区域 - 透明背景 */
.hero-image { 
    flex: 1; 
    position: relative;
    min-height: var(--hero-slide-h, 380px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: transparent;
}

.hero-image img { 
    width: var(--hero-img-w, auto);
    height: var(--hero-img-h, auto);
    max-width: var(--hero-img-max-w, 100%);
    /* 默认用幻灯片高度减去上下padding(32*2=64)来限制图片高度，避免大图把整体撑高 */
    max-height: var(--hero-img-max-h, calc(var(--hero-slide-h, 380px) - 64px));
    border-radius: 12px;
    object-fit: var(--hero-img-fit, contain);
}

/* 导航箭头 */
.hero-arrow { 
    display: none;
}

/* 导航点 */
.hero-dots { 
    position: absolute; 
    bottom: 22px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 12px; 
    z-index: 10;
}

.hero-dot { 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background: rgba(0, 122, 255, 0.3); 
    cursor: pointer; 
    transition: all 0.3s;
    border: 2px solid rgba(0, 122, 255, 0.5);
}

.hero-dot.active { 
    background: #007AFF;
    width: 36px; 
    border-radius: 6px;
}

/* 响应式 */
@media (max-width: 992px) {
    .hero-slide.active {
        flex-direction: column;
        min-height: auto;
    }
    
    .hero-content {
        padding: 40px 30px;
    }
    
    .hero-image {
        min-height: 300px;
        padding: 30px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
}

@media (max-width: 768px) {
    .hero-content {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
}
