/* ========================================
   辅材云平台官网 - 公共样式
   ======================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 橙色系 */
    --primary-color: #FF6B35;
    --primary-dark: #E85A24;
    --primary-light: #FF8C5A;
    
    /* 辅助色 - 深蓝系 */
    --secondary-color: #1A365D;
    --secondary-light: #4299E1;
    
    /* 中性色 */
    --bg-color: #F7FAFC;
    --text-color: #2D3748;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --white: #FFFFFF;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo img {
    height: 40px;
    width: auto;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    gap: 48px;
}

.navbar-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.navbar-menu a:hover::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ========================================
   通用组件
   ======================================== */

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 区块 */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 48px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 32px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* 图标卡片 */
.icon-card {
    text-align: center;
    padding: 40px 24px;
}

.icon-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    color: var(--white);
    font-size: 28px;
}

.icon-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.icon-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   动画
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 数字滚动 */
.counter {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 30px;
    }
}

/* 手机 */
@media (max-width: 768px) {
    .navbar-logo img {
        height: 32px;
    }
    
    .navbar-brand {
        font-size: 16px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-menu.active {
        max-height: 300px;
    }
    
    .navbar-menu a {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .counter {
        font-size: 36px;
    }
}
