/*
 * 乡村振兴网站 - CSS样式表
 * 使用 Flexbox 布局和 CSS3 动画效果
 */

/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2d9d4e;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 通用样式 ===== */
.section-title {
    font-size: 2.5rem;
    color: #2d9d4e;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ===== 头部区域 ===== */
.header {
    background: linear-gradient(135deg, #2d9d4e 0%, #1e7a3a 100%);
    color: white;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1;
}

.logo h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.logo .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

/* ===== 导航栏 ===== */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    color: white;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffeb3b;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #ffeb3b;
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 100%;
}

/* ===== 横幅区域 ===== */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    animation: zoomIn 0.8s ease;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 157, 78, 0.5);
    z-index: 2;
}

.banner-text {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    animation: slideUp 0.8s ease;
}

.banner-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-text p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== 动画 ===== */
@keyframes zoomIn {
    from {
        transform: scale(1.05);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 主内容区 ===== */
.main-content {
    padding: 3rem 0;
    background-color: white;
}

.content-wrapper {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-section {
    flex: 3;
}

/* ===== 新闻板块 ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-item {
    display: flex;
    gap: 2rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease;
}

.news-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.news-image {
    flex: 0 0 280px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 1.4rem;
    color: #2d9d4e;
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.news-summary {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #2d9d4e;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 2px solid #2d9d4e;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: fit-content;
}

.read-more:hover {
    background-color: #2d9d4e;
    color: white;
    transform: translateX(5px);
}

/* ===== 侧边栏 ===== */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quick-news,
.hot-topics {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #2d9d4e;
}

.quick-news h3,
.hot-topics h3 {
    color: #2d9d4e;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.quick-news-list {
    list-style: none;
}

.quick-news-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.quick-news-list li:last-child {
    border-bottom: none;
}

.quick-news-list li:hover {
    background-color: #f5f5f5;
}

.quick-news-list .date {
    color: #2d9d4e;
    font-weight: bold;
    flex: 0 0 50px;
    font-size: 0.85rem;
}

.quick-news-list .content {
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.quick-news-list li:hover .content {
    color: #2d9d4e;
}

.topics-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.topic-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.topic-tag:hover {
    background-color: #2d9d4e;
    color: white;
    border-color: #2d9d4e;
    transform: scale(1.05);
}

/* ===== 特色产业板块 ===== */
.products-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #efefef 100%);
    padding: 4rem 0;
}

.products-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    animation: fadeIn 0.6s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    position: relative;
}

.product-info h4 {
    color: #2d9d4e;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.product-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: #ff6b6b;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* ===== 乡村风貌板块 ===== */
.landscape-section {
    padding: 4rem 0;
    background: white;
}

.landscape-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.landscape-text {
    flex: 1;
}

.landscape-text h3 {
    color: #2d9d4e;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.landscape-text p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.landscape-features {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.landscape-features li {
    color: #2d9d4e;
    font-weight: 500;
    padding: 0.5rem 0;
}

.landscape-image {
    flex: 1;
}

.landscape-image img {
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.landscape-image:hover img {
    transform: scale(1.02);
}

/* ===== 关于我们 ===== */
.about-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-text {
    flex: 1.5;
}

.about-text h3 {
    color: #2d9d4e;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.about-text h4 {
    color: #2d9d4e;
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.about-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.about-list li {
    color: #666;
    padding: 0.8rem 0;
    line-height: 1.6;
    border-bottom: 1px solid #eee;
}

.about-list li:last-child {
    border-bottom: none;
}

.about-list strong {
    color: #2d9d4e;
}

.about-stats {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-item {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-number {
    color: #2d9d4e;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #666;
    font-size: 0.95rem;
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #1e7a3a 0%, #2d9d4e 100%);
    color: white;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #ffeb3b;
    margin-bottom: 1rem;
    font-weight: bold;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffeb3b;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-icon:hover {
    background-color: #ffeb3b;
    color: #2d9d4e;
    border-color: #ffeb3b;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .banner-text h2 {
        font-size: 2rem;
    }

    .banner-text p {
        font-size: 1rem;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .news-item {
        flex-direction: column;
    }

    .news-image {
        flex: 0 0 200px;
    }

    .landscape-content,
    .about-content {
        flex-direction: column;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-list {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .banner-text h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .news-list {
        gap: 1rem;
    }

    .products-grid {
        flex-direction: column;
    }

    .product-card {
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}