/* ============================================
   styles.css - TrustPortal 品牌门户样式
   响应式设计 | PC端 & 移动端完美适配
   ============================================ */

/* ---------- 全局重置 & 基础变量 ---------- */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #10b981;
    --dark: #0f172a;
    --gray-dark: #1e293b;
    --gray: #475569;
    --gray-light: #94a3b8;
    --gray-bg: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--gray-bg);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

/* 滚动平滑 */
html {
    scroll-behavior: smooth;
}

/* 按钮与通用 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(59,130,246,0.08);
    transform: translateY(-2px);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.badge {
    background: rgba(59,130,246,0.12);
    color: var(--primary-dark);
    padding: 0.25rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== 头部导航 (响应式核心) ========== */
.site-header {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
}

.brand-icon {
    font-size: 1.9rem;
    color: var(--primary);
}

.brand-name {
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand-name .light {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* 桌面导航 */
.main-nav .nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--gray-dark);
    transition: var(--transition);
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
    padding: 0.5rem;
}

/* 移动端下拉菜单 */
.mobile-nav {
    display: none;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav.open {
    display: block;
    max-height: 320px;
}

.mobile-nav-list {
    list-style: none;
    padding: 1rem 1.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.8rem 0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-dark);
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-link:hover {
    color: var(--primary);
    padding-left: 6px;
}

/* ---------- Hero 区域 ---------- */
.hero-section {
    padding: 3rem 0 4rem;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5fe 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-graphic {
    flex: 0.8;
    text-align: center;
}

.hero-icon {
    font-size: 12rem;
    color: var(--primary-light);
    opacity: 0.8;
    filter: drop-shadow(0 8px 20px rgba(59,130,246,0.2));
}

/* 教程步骤卡片 */
.tutorial-steps-section {
    padding: 5rem 0;
    background: var(--white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.step-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #eef2ff;
    position: relative;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin: 1rem 0;
}

.step-card h3 {
    margin: 0.5rem 0;
}

.step-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* 视频教程区域 */
.video-tutorials-section {
    padding: 5rem 0;
    background: #f1f5f9;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.video-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.video-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.video-thumb {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.play-icon-bg {
    font-size: 4rem;
    opacity: 0.7;
}

.play-overlay {
    position: absolute;
    font-size: 3rem;
    color: rgba(255,255,255,0.9);
    transition: 0.2s;
    cursor: pointer;
}

.video-card h3 {
    padding: 1rem 1rem 0.3rem;
    font-size: 1.2rem;
}

.video-card p {
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--gray);
}

.duration {
    display: inline-block;
    margin: 0.5rem 1rem 1rem;
    font-size: 0.75rem;
    background: #eef2ff;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    color: var(--primary-dark);
}

.video-note {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray);
    font-size: 0.9rem;
}

/* 新闻动态 */
.news-section {
    padding: 5rem 0;
    background: white;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.news-date {
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    font-size: 1.1rem;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.news-content p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.read-more {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* 关于区域 */
.about-section {
    padding: 5rem 0;
    background: linear-gradient(120deg, #f8fafc, #eff6ff);
}

.about-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.4rem;
    margin: 1rem 0 1rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat {
    font-weight: 500;
    color: var(--gray-dark);
}

.stat span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    background: white;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.4rem;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}

.about-image {
    flex: 0.8;
    text-align: center;
}

.about-icon {
    font-size: 12rem;
    color: var(--primary-light);
    opacity: 0.7;
}

/* 脚页 */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding-top: 3rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.footer-brand span {
    font-weight: 700;
    color: white;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.link-group h4 {
    color: white;
    margin-bottom: 1rem;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 0.5rem;
}

.link-group a {
    text-decoration: none;
    color: #94a3b8;
    transition: 0.2s;
}

.link-group a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8rem;
}

/* ========== 响应式设计: 移动端适配 ========== */
@media (max-width: 768px) {
    .container {
        width: 92%;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .hero-icon {
        font-size: 7rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .steps-grid {
        gap: 1.5rem;
    }

    .step-card {
        padding: 1.5rem;
    }

    .news-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .about-grid {
        flex-direction: column-reverse;
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .hero-buttons .btn {
        padding: 8px 20px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.9rem;
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .brand-name {
        font-size: 1.3rem;
    }
}