/* 主页专用样式 */
.homepage {
    background-color: #f8f9fa;
}

/* Hero区域增强样式 */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(0, 150, 136, 0.9) 0%, 
        rgba(0, 121, 107, 0.9) 100%),
        url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 60px;
    border-bottom-left-radius: 50% 20%;
    border-bottom-right-radius: 50% 20%;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.hero-content p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-cta {
    margin-top: 30px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
    display: inline-block;
    background-color: #FF9800;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    border: 2px solid transparent;
}

.cta-button:hover {
    background-color: #F57C00;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    border-color: white;
}

/* 特色区域 */
.featured-articles {
    padding: 80px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.featured-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.featured-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-large {
    grid-column: span 2;
    grid-row: span 2;
}

.featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.featured-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-large .featured-image {
    height: 400px;
}

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

.featured-item:hover .featured-image img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 150, 136, 0.3);
}

.featured-content {
    padding: 25px;
}

.featured-large .featured-content {
    padding: 35px;
}

.featured-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    color: #333;
}

.featured-large .featured-content h3 {
    font-size: 1.8rem;
}

.featured-content .excerpt {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-content time {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 最新新闻区 */
.latest-news {
    padding: 80px 0;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #333;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    border-radius: 2px;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #009688;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 25px;
    border: 2px solid #009688;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.view-all:hover {
    background: #009688;
    color: white;
    transform: translateX(5px);
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* 修复 main-article 尺寸问题 */
.main-article {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.main-article a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.main-article:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 优化图片容器尺寸 */
.article-image {
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.main-article:hover .article-image img {
    transform: scale(1.05);
}

/* 优化内容区域 */
.article-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #333;
}

.article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.95rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-meta i {
    margin-right: 8px;
    color: #009688;
}

.views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 侧边新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    height: 120px;
}

.news-image {
    width: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

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

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

.news-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
}

.news-meta .category {
    background: #e0e0e0;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 分类区域 */
.categories-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

.category-card:hover h3 {
    color: #009688;
}

.category-card p {
    color: #666;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* 标签云 */
.trending-tags {
    padding: 80px 0;
    background: white;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.tag {
    display: inline-block;
    padding: 10px 25px;
    background: white;
    color: #555;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.tag:hover {
    background: linear-gradient(135deg, #009688, #4DB6AC);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 150, 136, 0.3);
    border-color: #009688;
}

/* 无图片时的占位符样式 */
.image-placeholder {
    height: 250px;
    background: linear-gradient(135deg, #009688, #4DB6AC);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
}

.image-placeholder.small {
    height: 120px;
    font-size: 2rem;
}

.image-placeholder.medium {
    height: 200px;
    font-size: 3rem;
}

/* 特色项目的图片占位符 */
.featured-image .image-placeholder {
    height: 100%;
    font-size: 3rem;
}

.featured-small .featured-image .image-placeholder {
    font-size: 2rem;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-large {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-large {
        grid-column: span 1;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .view-all {
        align-self: flex-start;
    }
    
    .article-content h2 {
        font-size: 1.8rem;
    }
    
    .news-link {
        height: auto;
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 200px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* 响应式调整 - 新增 */
    .main-article {
        max-height: none;
    }
    
    .article-image {
        height: 200px;
    }
    
    .image-placeholder {
        height: 200px;
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .featured-content h3 {
        font-size: 1.2rem;
    }
    
    .featured-large .featured-content h3 {
        font-size: 1.4rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .category-card h3 {
        font-size: 1.3rem;
    }
    
    .image-placeholder {
        font-size: 2.5rem;
    }
    
    .image-placeholder.small {
        font-size: 1.5rem;
    }
    
    .image-placeholder.medium {
        font-size: 2rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .homepage {
        background-color: #121212;
    }
    
    .featured-item,
    .main-article,
    .news-item,
    .category-card {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .featured-content h3,
    .article-content h2,
    .category-card h3,
    .news-content h3 {
        color: #e0e0e0;
    }
    
    .featured-content .excerpt,
    .article-excerpt,
    .category-card p {
        color: #b0b0b0;
    }
    
    .categories-section {
        background: linear-gradient(135deg, #1e1e1e 0%, #252525 100%);
    }
    
    .tags-cloud {
        background: #252525;
    }
    
    .tag {
        background: #2a2a2a;
        color: #b0b0b0;
    }
    
    .tag:hover {
        background: linear-gradient(135deg, #009688, #4DB6AC);
        color: white;
    }
    
    .image-placeholder {
        background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    }
}