/* TradeNova 前端样式文件 */

:root {
    --primary: #1a365d;
    --secondary: #2d3748;
    --accent: #d4af37;
    --light: #f7fafc;
    --dark: #2d3748;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    max-width: 100%;
}

/* 导航栏样式 */
.navbar {
    background: var(--primary);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* 移动端菜单 */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 按钮样式 */
.cta-button {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--accent);
    text-align: center;
}

.cta-button:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 通用部分样式 */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
}

/* 卡片样式 */
.feature-card, .team-card, .story-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card:hover, .team-card:hover, .story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-card.visible,
.team-card.visible,
.story-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card {
    padding: 2rem;
    text-align: center;
}

.feature-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.team-card {
    text-align: center;
}

.team-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #ddd;
    margin: 2rem auto 1rem;
    overflow: hidden;
    position: relative;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-image .placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.team-content {
    padding: 0 1.5rem 1.5rem;
}

.team-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.team-position {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    color: var(--primary);
    font-size: 1.25rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

/* 网格布局 */
.features-grid, .team-grid, .stories-grid {
    display: grid;
    gap: 2rem;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stories-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* 时间线样式 */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-year {
    flex: 0 0 100px;
    text-align: center;
}

.year-circle {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* 页脚样式 */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
}

/* 联系表单样式 */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 统计区域样式（如果存在） */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* 防止水平滚动 */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    html {
        overflow-x: hidden;
    }
    
    /* 导航栏优化 */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
    }
    
    /* Hero 区域优化 */
    .hero {
        padding: 120px 0 60px !important;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* 网格布局优化 */
    .features-grid,
    .team-grid,
    .stories-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* 卡片优化 */
    .feature-card,
    .team-card,
    .story-card {
        margin: 0 5px !important;
        padding: 2rem 1.5rem !important;
    }
    
    /* 按钮优化 */
    .cta-button {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    /* 统计区域优化 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-year {
        flex: 0 0 60px;
    }
    
    .year-circle {
        width: 50px;
        height: 50px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .hero p {
        font-size: 1rem !important;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .feature-card, .team-card, .story-card {
        margin: 0 10px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.bg-light { background: var(--light); }
.bg-primary { background: var(--primary); }
.bg-accent { background: var(--accent); }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-white { color: white; }

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 错误和成功消息 */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #38a169;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #e53e3e;
}

.alert-warning {
    background: #feebc8;
    color: #744210;
    border: 1px solid #d69e2e;
}