/* style.css */
/* 基础样式 */
:root {
    --primary-color: #42b983;
    --text-color: #2c3e50;
    --bg-color: #f8f9fa;
    --max-width: 1280px;
    --nav-height: 60px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

/* 容器布局 */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部导航 */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a.active,
.nav-menu a:hover {
    background: rgba(66, 185, 131, 0.1);
    color: var(--primary-color);
}

/* 主内容区 */
.site-main {
    flex: 1;
    padding: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

.content-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* 产品网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* 页脚备案信息 */
.site-footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: auto;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 200;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0.3rem 0;
}

.dropdown-menu a {
    padding: 0.5rem;
    display: block;
    color: var(--text-color);
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(66, 185, 131, 0.1);
}

.dropdown-arrow {
    font-size: 0.6em;
    margin-left: 4px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 移动端备案信息 */
.footer-mobile {
    display: none;
    text-align: center;
    padding: 1rem;
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* 联系页面样式 */
#contact .card-grid {
    margin-top: 1rem;
}

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(66, 185, 131, 0.1);
    border-radius: 8px;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-3px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-nav {
        padding: 0 1rem;
    }

    .nav-brand {
        font-size: 1.3rem;
        padding: 0.5rem 0;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    .hamburger {
        width: 25px;
        height: 2px;
        background: var(--text-color);
        position: relative;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: inherit;
        transition: all 0.3s ease;
    }

    .hamburger::before {
        top: -6px;
    }

    .hamburger::after {
        top: 6px;
    }

    .nav-toggle.active .hamburger {
        background: transparent;
    }

    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .footer-mobile {
        display: block;
    }
    .site-footer {
        display: none;
    }
    
    /* 移动端下拉菜单 */
    .dropdown-menu {
        position: static;
        background: rgba(66, 185, 131, 0.05);
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-arrow {
        display: inline-block;
    }
}

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

.footer-content a {
    color: #666666;
    text-decoration: none;
}
.footer-content a:hover {
    color: rgba(167, 29, 84, 0.35);
}