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

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8faf7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: #2d6a4f;
    transition: all 0.3s ease;
}

a:hover {
    color: #1b4332;
}

/* 预设.adapt-img类样式 */
.adapt-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1b4332;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2d6a4f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.2);
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    background-color: #1b4332;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(45, 106, 79, 0.2);
}

.btn-primary {
    background-color: #2d6a4f;
    color: white;
}

.btn-primary:hover {
    background-color: #1b4332;
}

.btn-success {
    background-color: #52b788;
    color: white;
}

.btn-success:hover {
    background-color: #40916c;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d6a4f;
}

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

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2d6a4f;
    transition: width 0.3s ease;
}

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

/* 汉堡菜单 */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Banner样式 */
.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 0;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    position: relative;
    overflow: hidden;
}

/* PC端和移动端banner图片控制 */
.pc-banner {
    display: block;
}

.mobile-banner {
    display: none;
}

/* 媒体查询 - 移动端 */
@media (max-width: 768px) {
    .pc-banner {
        display: none;
    }
    
    .mobile-banner {
        display: block;
    }
}

.banner::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 100 100" opacity="0.05"><circle cx="50" cy="50" r="1" fill="%231b4332"/><circle cx="20" cy="20" r="0.5" fill="%231b4332"/><circle cx="80" cy="80" r="0.8" fill="%231b4332"/><circle cx="80" cy="20" r="0.6" fill="%231b4332"/><circle cx="20" cy="80" r="0.7" fill="%231b4332"/></svg>');
    background-size: 200px 200px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(200px, 200px); }
}

.banner-text {
    flex: 1;
    padding-right: 2rem;
}

.banner-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1b4332;
}

.banner-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #4a7c62;
}

.banner-image {
    flex: 1;
    max-width: 60%;
}

/* 板块标题样式 */
.section-title {
    text-align: center;
    padding: 3rem 0 2rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
}

/* 卡片网格样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(45, 106, 79, 0.1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(45, 106, 79, 0.15);
    border-color: rgba(45, 106, 79, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2d6a4f 0%, #52b788 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #666;
    margin-bottom: 1rem;
}

/* 科普知识标签样式 */
.tabs {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
    height: 5px;
}

.tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tabs::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.tabs::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.tab {
    flex: 0 0 auto;
    padding: 10px 20px;
    background-color: #e8f5e8;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab:hover, .tab.active {
    background-color: #2d6a4f;
    color: white;
}

/* 科普内容样式 */
.science-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.science-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 106, 79, 0.1);
}

.science-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(45, 106, 79, 0.12);
    border-color: rgba(45, 106, 79, 0.2);
}

.science-item-content {
    padding: 1.5rem;
}

.science-item-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 互动按钮样式 */
.interaction-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background-color: #f8faf7;
    border: 1px solid rgba(45, 106, 79, 0.1);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #4a7c62;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.interaction-btn:hover {
    background-color: #2d6a4f;
    color: white;
    border-color: #2d6a4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.interaction-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(45, 106, 79, 0.2);
}

.interaction-btn i {
    font-size: 1rem;
}

/* 案例网格样式 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* 环保行动样式 */
.action-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.guide-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 106, 79, 0.1);
    position: relative;
    overflow: hidden;
}

.guide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d6a4f 0%, #52b788 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.guide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(45, 106, 79, 0.12);
    border-color: rgba(45, 106, 79, 0.2);
}

.guide-item:hover::before {
    transform: scaleX(1);
}

.guide-item i {
    font-size: 2.5rem;
    color: #2d6a4f;
    margin-bottom: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #2d6a4f;
    font-size: 1rem;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(45, 106, 79, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8faf7;
    color: #333;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
    background-color: white;
}

.form-group input:hover, .form-group textarea:hover, .form-group select:hover {
    border-color: #2d6a4f;
    background-color: white;
}

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

/* 打卡表单样式 */
.checkin-form {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
    border: 1px solid rgba(45, 106, 79, 0.1);
    transition: box-shadow 0.3s ease;
}

.checkin-form:hover {
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.12);
}

/* 关于页面样式 */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem 0;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    max-width: 400px;
}

/* 页脚样式 */
footer {
    background-color: #1b4332;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p, .footer-section a {
    color: #e8f5e8;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d6a4f;
    color: #e8f5e8;
}

/* 媒体查询 - 平板 */
@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .banner {
        padding: 3rem 0;
    }
    
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .about-content {
        gap: 2rem;
    }
}

/* 媒体查询 - 移动端 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    /* 汉堡菜单显示 */
    .burger {
        display: block;
    }
    
    /* 导航链接隐藏 */
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    /* 汉堡菜单动画 */
    .burger.active .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .burger.active .line2 {
        opacity: 0;
    }
    
    .burger.active .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Banner布局调整 */
    .banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }
    
    .banner-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .banner-image {
        max-width: 100%;
    }
    
    /* 板块标题调整 */
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    /* 卡片网格调整 */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* 科普内容调整 */
    .science-content {
        grid-template-columns: 1fr;
    }
    
    /* 案例网格调整 */
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    /* 环保行动指南调整 */
    .action-guide {
        grid-template-columns: 1fr;
    }
    
    /* 关于页面布局调整 */
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        max-width: 100%;
    }
    
    /* 互动按钮调整 */
    .interaction-buttons {
        flex-direction: column;
    }
    
    /* 按钮高度适配触摸操作 */
    .btn, .interaction-btn, .tab {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation-name: modalopen;
    animation-duration: 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Safari浏览器兼容 */
@supports (-webkit-hyphens: none) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}