/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 自定义链接样式 - 悬停下划线 */
a[style*="text-decoration: none"]:hover {
    text-decoration: underline !important;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器样式 */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏样式 */
.header {
    background-color: #2e7d32;
    color: white;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-top {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
}

.logo {
    margin-right: 20px;
}

.logo img {
    height: 180px;
    width: auto;
    margin: 0;
}

.association-name h1 {
    font-size: 40px;
    font-weight: bold;
    margin: 0;
    color: white;
    letter-spacing: 1.5px;
}

.header-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: -10px;
}

.main-nav {
    margin-right: 20px;
}

.main-nav ul {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    margin: 0 1px;
    white-space: nowrap;
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 6px 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.main-nav ul li a:hover {
    background-color: #1b5e20;
}

.search-box {
    flex: 0 0 auto;
    text-align: left;
}

.search-box input {
    padding: 6px 10px;
    width: 200px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    padding: 6px 12px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.search-box button:hover {
    background-color: #45a049;
}

/* 广告条样式 */
.top-ad {
    width: 100%;
    background-color: #f0f0f0;
    overflow: hidden;
    margin-top: 15px;
}

.top-ad img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 轮播图和资讯区域样式 */
.banner-news {
    background-color: #f8f9fa;
    padding: 20px 0;
}

.banner-news-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 轮播图样式 */
.carousel {
    width: 750px;
    height: 480px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    border-radius: 8px;
}

.carousel-item {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.carousel-controls button {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-controls button:hover {
    background-color: rgba(0,0,0,0.8);
}

/* 轮播指示器样式 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
}

/* 轮播图标题样式 */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    box-sizing: border-box;
}

.carousel-caption h3 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: bold;
}

/* 轮播标题链接保持白色且无下划线 */
.carousel-caption h3 a {
    color: inherit;
    text-decoration: none;
}

/* 资讯侧边栏样式 */
.news-sidebar {
    width: calc(100% - 770px);
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 480px;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.news-sidebar .news-list {
    flex: 1;
}

.news-sidebar .ad-item {
    margin-top: auto;
    margin-bottom: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    white-space: nowrap;
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% - 15px);
    height: 2px;
    background-color: #4caf50;
}

.news-sidebar h3 {
    font-size: 18px;
    color: #2e7d32;
    margin: 0;
    white-space: nowrap;
}

.sidebar-header .more {
    color: #4caf50;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.sidebar-header .more:hover {
    color: #2e7d32;
}

.news-sidebar .news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-sidebar .news-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    position: relative;
    white-space: nowrap;
}

.news-sidebar .news-list li.ad-item {
    white-space: normal;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-sidebar .news-list li.ad-item::after {
    display: none;
}

.news-sidebar .news-list li.ad-item a {
    line-height: 0;
}

.news-sidebar .news-list li.ad-item img {
    display: block;
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.news-sidebar .news-list li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5px;
    width: calc(100% - 20px);
    height: 1px;
    background-color: #f0f0f0;
}

.news-sidebar .news-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-sidebar .news-list li:last-child::after {
    display: none;
}

.news-sidebar .news-list li a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    transition: color 0.3s ease;
    display: block;
    white-space: nowrap;
}

.news-sidebar .news-list li a:hover {
    color: #4caf50;
}

/* 主要内容区域样式 */
.main-content {
    padding: 40px 0;
}

/* 通用板块样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -20px;
    width: calc(100% + 40px);
    height: 2px;
    background-color: #4caf50;
}

.section-header h2 {
    font-size: 24px;
    color: #2e7d32;
}

.section-header .more {
    color: #4caf50;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.section-header .more:hover {
    color: #2e7d32;
}

/* 新闻网格布局 - 1图+2文字列表样式 */
.news-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 左侧大图新闻项 */
.news-item.featured {
    width: 40%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible;
    padding: 15px;
}

.news-item.featured:hover {
    transform: translateY(-5px);
}

/* 图片容器 */
.news-item.featured .image-container {
    position: relative;
    width: 100%;
    height: 300px; /* 放大图片高度，补充年月日去掉后的位置 */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
    background-color: #f0f0f0;
}

.news-item.featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}

/* 图片标题覆盖在图片底部，添加透明度为70%的背景框 */
.news-item.featured .image-container h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 15px 20px;
    font-size: 18px;
    color: #ffffff;
    background: rgba(0,0,0,0.6); /* 60%透明度的黑色背景 */
    line-height: 1.5;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-sizing: border-box;
    width: 100%;
    text-align: left;
}

/* 右侧新闻列表 */
.news-list {
    width: 60%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 上半部分带摘要的新闻项 */
.news-list-item.featured {
    padding: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.news-list-item.featured h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-list-item.featured .summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 下半部分标题新闻 */
.news-list-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-list-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item:hover {
    background-color: #f8f9fa;
}

.news-list-item h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.news-list-item .title-content {
    flex: 1;
    margin-right: 10px;
}

.news-list-item .date {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
    margin-left: auto;
}

/* 野生菌展示网格 */
.mushroom-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.mushroom-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.mushroom-item:hover {
    transform: translateY(-5px);
}

.mushroom-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mushroom-item h3 {
    padding: 15px 15px 10px;
    font-size: 20px;
    color: #2e7d32;
    text-align: center;
}

.mushroom-item p {
    padding: 0 15px 15px;
    color: #666;
    text-align: center;
    font-size: 14px;
}

/* 基地展示网格 */
.base-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.base-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.base-item:hover {
    transform: translateY(-5px);
}

.base-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.base-item h3 {
    padding: 15px;
    font-size: 18px;
    color: #2e7d32;
    text-align: center;
}

/* 专家智库网格 */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.expert-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.expert-item:hover {
    transform: translateY(-5px);
}

.expert-item img {
    width: 120px;
    height: 120px;
    border-radius: 0;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid #4caf50;
}

.expert-item h3 {
    font-size: 20px;
    color: #2e7d32;
    margin-bottom: 10px;
}

.expert-item p {
    color: #666;
    margin-bottom: 8px;
}

.expert-field {
    font-style: italic;
    font-size: 14px;
}

/* 页脚样式 */
.footer {
    background-color: #2e7d32;
    color: white;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-info p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-copyright {
    text-align: right;
}

/* 页脚链接保持原有颜色且无下划线 */
.footer a {
    color: inherit;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
    
    /* 新闻网格在中等屏幕上垂直堆叠 */
    .news-grid {
        flex-direction: column;
    }
    
    .news-item.featured {
        width: 100%;
    }
    
    .news-list {
        width: 100%;
    }
    
    .mushroom-grid,
    .base-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .experts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .header .container {
        align-items: center;
    }
    
    .header-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .header-bottom {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .main-nav {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .search-box {
        margin-bottom: 10px;
    }
}

@media (max-width: 1200px) {
    .banner-news-content {
        flex-direction: column;
    }
    
    .carousel {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .news-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .main-nav ul li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    /* 所有网格在小屏幕上单列显示 */
    .news-grid {
        flex-direction: column;
    }
    
    .news-item.featured {
        width: 100%;
    }
    
    .news-list {
        width: 100%;
    }
    
    .mushroom-grid,
    .base-grid,
    .experts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
        margin-top: 20px;
    }
}