/* ========================================
   汇智源环保 - 现代风格样式表
   版本: 2.0
   特点: 简约、现代、响应式
   ======================================== */

/* CSS 变量定义 */
:root {
    --primary-color: #0066CC;
    --primary-dark: #0052a3;
    --primary-light: #e6f0fa;
    --secondary-color: #00a86b;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #1a1a2e;
    --border-color: #e8ecf1;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition: all 0.3s ease;
    --container-width: 1400px;
    --header-height: 80px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部信息栏
   ======================================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-info {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}

.top-info span {
    opacity: 0.9;
}

/* ========================================
   主导航
   ======================================== */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.main-header .logo {
    margin-right: 40px;
    flex-shrink: 0;
}

.main-header .main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo img {
    height: 50px;
    width: auto;
}

/* 导航菜单 */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: block;
    padding: 0 24px;
    height: var(--header-height);
    line-height: var(--header-height);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.nav-list > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: var(--primary-color);
}

.nav-list > li > a:hover::after,
.nav-list > li > a.active::after {
    width: 60%;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 24px;
    color: var(--text-medium);
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    padding-left: 28px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
    min-height: calc(100vh - 400px);
}

/* ========================================
   页脚
   ======================================== */
.main-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--primary-color);
}

/* ========================================
   通用组件
   ======================================== */

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-medium);
    font-size: 16px;
}

.section-title .line {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .top-info {
        justify-content: center;
        font-size: 12px;
        gap: 15px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        overflow-y: auto;
    }

    .main-nav.mobile-open {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 20px 0;
    }

    .nav-list > li {
        width: 100%;
    }

    .nav-list > li > a {
        height: auto;
        line-height: 1.5;
        padding: 15px 24px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list > li > a::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--bg-light);
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
    }

    .dropdown.open .dropdown-menu {
        max-height: 300px;
        padding: 8px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title h2 {
        font-size: 28px;
    }
}

/* ========================================
   通用侧边栏样式（用于关于我们、公司资讯、客户服务、联系我们）
   ======================================== */

/* 页面布局 */
.page-section {
    padding: 40px 0;
    background: var(--bg-light);
}

.page-layout {
    display: flex;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* 侧边栏 */
.page-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* 主内容区 */
.page-main {
    flex: 1;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    font-size: 28px;
    color: var(--text-dark);
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 768px) {
    .page-layout {
        flex-direction: column;
    }
    
    .page-sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .top-info span:first-child {
        display: none;
    }
}
