/* MEGA Tech 博客 UI/UX 优化 - 2026-03-28
 * 基于 ui-ux-pro-max 技能分析
 * 保留所有现有图片、视频、表格样式
 */

/* ======================
   颜色系统优化 (ui-ux-pro-max)
   ====================== */
:root {
    /* Primary - Sky Blue (Trust) */
    --primary-color: #0EA5E9;
    --primary-dark: #0284C7;
    --secondary-color: #38BDF8;
    
    /* CTA - Orange (Action) */
    --accent-color: #F97316;
    --accent-dark: #EA580C;
    
    /* Background */
    --bg-color: #F0F9FF;
    --bg-white: #FFFFFF;
    --bg-alt: #F8FAFC;
    
    /* Text */
    --text-color: #0C4A6E;
    --text-muted: #64748B;
    --text-dark: #0F172A;
    
    /* Border */
    --border-color: #BAE6FD;
    
    /* Success */
    --success-color: #059669;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(14, 165, 233, 0.1);
    --shadow-md: 0 4px 12px rgba(14, 165, 233, 0.15);
    --shadow-lg: 0 12px 24px rgba(14, 165, 233, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 200ms ease-out;
}

/* ======================
   Header 优化
   ====================== */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px 20px;
    /* position: sticky removed to fix mobile floating issue */
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
}

/* 导航栏 CTA 按钮 */
nav .nav-cta {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 10px;
    transition: var(--transition-normal);
}

nav .nav-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ======================
   Hero Section 优化 (主页)
   ====================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 80px 20px;
    text-align: center;
    border-radius: 0;
    margin: 0 0 50px 0;
    position: relative;
    overflow: hidden;
}

/* Hero 背景装饰 */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    color: white !important;
    font-size: 3rem !important;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.hero p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.4rem !important;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

/* Hero CTA 按钮组 */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.hero-cta .btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-cta .btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid white;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-cta .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ======================
   信任标志区域
   ====================== */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    padding: 50px 20px;
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
}

.trust-badge {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.trust-badge:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.trust-badge .badge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.trust-badge .badge-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ======================
   文章卡片优化
   ====================== */
.article-preview {
    padding: 30px;
    margin: 0 20px 25px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
}

.article-preview:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.article-preview h2 a {
    color: var(--text-dark);
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.article-preview h2 a:hover {
    color: var(--primary-color);
}

/* 文章阅读按钮 */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition-normal);
}

.read-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.read-more::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* ======================
   CTA Section 优化
   ====================== */
.cta-section {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    padding: 60px 30px;
    border-radius: 16px;
    text-align: center;
    margin: 50px 20px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-section h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.cta-section .btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-normal);
    position: relative;
    z-index: 1;
}

.cta-section .btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ======================
   Advantages 卡片优化
   ====================== */
.advantages {
    padding: 20px;
}

.advantages h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 15px;
}

.advantages > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.advantage-card {
    padding: 30px;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.advantage-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.advantage-card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.advantage-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ======================
   Footer 优化
   ====================== */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 50px 20px;
    margin-top: 60px;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: white;
    text-decoration: underline;
    transition: opacity var(--transition-fast);
}

footer a:hover {
    opacity: 0.8;
}

/* ======================
   产品查询页 Hero
   ====================== */
.product-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 60px 20px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.product-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.product-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ======================
   响应式优化
   ====================== */
@media (max-width: 768px) {
    .hero {
        padding: 50px 15px;
    }
    
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .hero p {
        font-size: 1.1rem !important;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 30px 15px;
    }
    
    .trust-badge .badge-number {
        font-size: 2rem;
    }
    
    .article-preview {
        margin: 0 10px 20px;
        padding: 20px;
    }
    
    .cta-section {
        padding: 40px 20px;
        margin: 40px 10px;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 10px;
    }
    
    .hero h1 {
        font-size: 1.6rem !important;
    }
    
    .hero p {
        font-size: 1rem !important;
    }
    
    .trust-badges {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .trust-badge {
        padding: 15px;
    }
    
    .trust-badge .badge-number {
        font-size: 1.5rem;
    }
    
    .trust-badge .badge-label {
        font-size: 0.8rem;
    }
}

/* ======================
   平滑滚动
   ====================== */
html {
    scroll-behavior: smooth;
}

/* ======================
   动效优化 (ui-ux-pro-max)
   ====================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ======================
   焦点状态 (可访问性)
   ====================== */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ======================
   加载动画
   ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-preview {
    animation: fadeIn 0.5s ease-out;
}

/* ======================
   产品徽章
   ====================== */
.product-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* ======================
   搜索框样式 (产品查询页)
   ====================== */
.search-box {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.search-box button {
    padding: 16px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
