/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d8659;
    --primary-dark: #1f5d3f;
    --primary-light: #4ca876;
    --secondary-color: #7cb342;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f9f7;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #2d8659 0%, #4ca876 100%);
    background-attachment: fixed;
    font-size: 16px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 内容卡片容器 - 给每个section的container添加白色背景 */
section:not(.hero) .container {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    section:not(.hero) .container {
        padding: 40px 20px;
    }
}

/* 五周年庆典横幅 */
.anniversary-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.banner-icon {
    font-size: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.banner-text {
    font-size: 14px;
    font-weight: 500;
}

.banner-btn {
    background: white;
    color: #ff6b6b;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.banner-btn:active {
    transform: scale(0.95);
}

.banner-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
}

/* 导航栏 */
.navbar {
    background: var(--primary-dark);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 28px;
    font-weight: bold;
    color: white;
    letter-spacing: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 17px;
    transition: all 0.3s;
    padding: 8px 0;
    position: relative;
    font-weight: 500;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

/* Hero 区域 - 替代轮播图 */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(45, 134, 89, 0.95) 0%, rgba(76, 168, 118, 0.95) 100%);
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 50px;
    opacity: 0.95;
    line-height: 1.8;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.hero-btn-primary {
    background: white;
    color: var(--primary-color);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.3);
}

.hero-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* 通用区块样式 */
section {
    padding: 80px 0;
    margin: 0;
    position: relative;
    background: transparent;
}

/* Hero区域保持全绿色背景 */
section.hero {
    background: transparent;
}

.section-title {
    text-align: center;
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 公司简介 */
.intro {
    /* 背景由body的渐变色提供，container有白色卡片背景 */
}

/* 公司简介卡片使用浅绿色背景凸显 */
.intro .container {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid rgba(45, 134, 89, 0.3);
}

.intro-content {
    max-width: 1100px;
    margin: 0 auto;
}

.intro-text h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

.intro-text p {
    font-size: 18px;
    line-height: 2;
    color: var(--text-light);
    margin-bottom: 50px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.intro-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(45, 134, 89, 0.2);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.feature-text h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.feature-text p {
    font-size: 15px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* 产品中心 */
.product-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 35px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--bg-light);
}

.product-info {
    padding: 25px;
}

.product-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.product-desc {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 18px;
    line-height: 1.6;
    min-height: 48px;
}

.product-price {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
}

/* 今日价格 */
.prices {
    /* 背景由body的渐变色提供，container有白色卡片背景 */
}

.price-update {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

.price-list {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.price-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.price-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(45, 134, 89, 0.15);
    border-color: var(--primary-color);
}

.price-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-dark);
}

.price-value {
    font-size: 26px;
    color: var(--primary-color);
    font-weight: bold;
}

.price-note {
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border-left: 5px solid #ffc107;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.price-note p {
    font-size: 15px;
    color: #856404;
    margin: 8px 0;
    line-height: 1.8;
}

/* 新闻动态 */
.news-list {
    max-width: 1100px;
    margin: 0 auto;
}

.news-item {
    background: white;
    padding: 35px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.news-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.news-meta {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-summary {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

/* 联系我们 */
.contact {
    /* 背景由body的渐变色提供，container有白色卡片背景 */
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.contact-item {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(45, 134, 89, 0.2);
    border-color: var(--primary-color);
}

.contact-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.contact-item p {
    color: var(--text-light);
    font-size: 16px;
    margin: 8px 0;
    line-height: 1.6;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* 底部 */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin: 8px 0;
    font-size: 15px;
    opacity: 0.9;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: var(--secondary-color);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    z-index: 998;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu a {
        display: block;
        padding: 15px 20px;
    }

    .hero,
    .swiper-slide {
        height: 250px;
    }

    .slide-content h2 {
        font-size: 24px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .section-title {
        font-size: 26px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .intro-features {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .banner-text {
        font-size: 12px;
    }

    .banner-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    section {
        padding: 40px 0;
    }
}

/* 微信浏览器优化 */
@media screen and (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }

    a, button {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
}
