/* 轮播图/横幅区域 */
.hero-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.hero-banner {
    overflow: hidden;
    width: 800px;
    height: 312px;
    position: relative;
    flex-shrink: 0;
}

/* Banner加载状态 */
.banner-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6fb8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.banner-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active { background-color: white; }

.dot:hover { background-color: rgba(255, 255, 255, 0.8); }

.banner-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-banner:hover .banner-nav { opacity: 1; }

.banner-btn {
    width: 50px;
    height: 50px;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.banner-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.banner-btn:active {
    transform: scale(0.95);
}

.banner-btn svg {
    width: 24px;
    height: 24px;
}

.hero-articles {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 0;
}

.hero-articles h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #0d6fb8;
    padding-bottom: 10px;
}

.latest-articles li {
    margin-bottom: 11px;
    padding-bottom: 11px;
    border-bottom: 1px dotted #ccc;
}

.latest-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.latest-articles a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.article-title {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-title:hover {
    color: #0d6fb8;
}

.article-date {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 分类内容区域 */
.category-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-section {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h2 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.more-link {
    color: #0d6fb8;
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover { color: #0a5a9a; }

.section-content {
    padding: 20px;
}

/* 文章卡片 */
.article-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.article-card {
    border-radius: 6px;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-card a { display: block; }

.card-image {
    width: 100%;
    aspect-ratio: 605 / 375; /* 按 605:375 比例缩放 */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 6px 2px;
}

.card-content h3 {
    font-size: 15px;
    font-weight: normal;
    line-height: 24px;
    color: #333;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content h3:hover { color: #0d6fb8; }

/* 文章列表 */
.article-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    position: relative;
    padding-top: 10px;
}

.article-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    border-left: 1px dashed #e5e7eb; /* 中间虚线分隔 */
    transform: translateX(-50%);
}

.list-column {
    display: flex;
    flex-direction: column;
}

.list-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dotted #eee; /* 行间虚线 */
}

.list-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.3s;
}

.list-item a:hover { color: #0d6fb8; }

.bullet {
    color: #0d6fb8;
    font-weight: bold;
}

/* 文本列表：一行显示3个 */
.text_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每行3个 */
    column-gap: 30px; /* 列间距 */
    row-gap: 8px; /* 行间距 */
    list-style: none;
    margin: 0;
    padding: 0;
}

.text_list li {
    line-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 超出省略号 */
}

.text_list li::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 6px;
    border-radius: 50%;
    background-color: #bbb; /* 灰色小圆点 */
    vertical-align: middle;
}

.text_list li a {
    color: #333;
    font-size: 14px;
    transition: color 0.2s ease;
}

.text_list li a:hover {
    color: #0d6fb8; /* 主题色 */
}

/* 热门区域 */
.hot-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hot-section {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.hot-articles {
    padding: 20px;
}

.hot-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.hot-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hot-item a {
    display: flex;
    gap: 12px;
}

.hot-content {
    display: flex;               /* 让内容形成上下结构 */
    flex-direction: column;
    min-height: 90px;            /* 与 150x90 缩略图等高 */
    flex: 1;
    min-width: 0;               /* 关键：允许内容在flex下收缩，防止溢出 */
}

.hot-thumb {
    width: 150px; /* 热门列表缩略图 150x90 */
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.hot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-content h4 {
    font-size: 18px;
    line-height: 26px;
    height: 26px;
    margin-bottom: 5px;
    color: #333;
    font-weight: normal;
    white-space: nowrap;        /* 单行显示 */
    overflow: hidden;           /* 溢出隐藏 */
    text-overflow: ellipsis;    /* 超出省略号 */
}

.hot-content h4:hover { color: #0d6fb8; }

.hot-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 10px;
    margin-top: auto;            /* 将日期/阅读数推到底部 */
    align-items: center;
    justify-content: flex-start;
}

/* 热门列表：时间与浏览数小图标 */
.hot-meta .date::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") no-repeat center/contain;
    vertical-align: -2px;
}

.hot-meta .views::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center/contain;
    vertical-align: -2px;
}

/* 热门列表描述 */
.hot-desc {
    font-size: 14px;
    color: #666;
    line-height: 22px;
    height: 44px;
    overflow: hidden;

}

/* 响应式设计 */
@media (max-width: 1400px) {
    .article-cards {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .article-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .article-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .article-list {
        grid-template-columns: 1fr;
    }
    
    .hot-sections {
        grid-template-columns: 1fr;
    }
}

/* 桌面端隐藏card-meta */
.card-meta {
    display: none;
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }
    
    /* 移动端隐藏hero-articles区域 */
    .hero-articles {
        display: none;
    }
    
    /* 移动端隐藏text_list区域 */
    .text_list {
        display: none;
    }
    
    /* 移动端隐藏hot-sections版块 */
    .hot-sections {
        display: none;
    }
    
    .article-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 移动端文章卡片样式 - 参考热门问答 */
    .article-card {
        display: flex;
        background: white;
        border-radius: 0;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .article-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .article-card a {
        display: flex;
        width: 100%;
        text-decoration: none;
    }
    
    .card-image {
        width: 120px;
        height: 80px;
        flex-shrink: 0;
        overflow: hidden;
    }
    
    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .card-content {
        flex: 1;
        padding: 12px 15px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .card-content h3 {
        font-size: 16px;
        line-height: 22px;
        color: #333;
        margin: 0 0 8px 0;
        font-weight: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .card-content h3:hover {
        color: #0d6fb8;
    }
    
    /* 移动端显示card-meta */
    .card-meta {
        font-size: 12px;
        color: #999;
        display: flex;
        gap: 10px;
        margin-top: auto;
        align-items: center;
    }
    
    .card-meta .publish-date::before {
        content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>');
        width: 14px;
        height: 14px;
        vertical-align: -0.15em;
        margin-right: 4px;
        display: inline-block;
    }
    
    .card-meta .views::before {
        content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>');
        width: 14px;
        height: 14px;
        vertical-align: -0.15em;
        margin-right: 4px;
        display: inline-block;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .hero-banner {
        width: 100%;
        height: 200px;
    }
    
    /* 移动端隐藏banner导航按钮 */
    .banner-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .article-cards {
        grid-template-columns: 1fr;
    }
    
    .section-content {
        padding:15px 15px 0px;
    }
    
    .hero-articles {
        padding: 15px;
    }
    
    .hero-banner {
        width: 100%;
        height: 150px;
    }
    
    .banner-nav {
        padding: 0 2px;
    }
    
    .banner-btn {
        width: 40px;
        height: 40px;
    }
    
    .banner-btn svg {
        width: 20px;
        height: 20px;
    }

}
