/* 首页专用样式 */

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 0 20px;
}

.slide-overlay {
    background: rgba(0, 0, 0, 0.4);
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.slide-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-overlay p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* 轮播控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-control i {
    font-size: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* 图标字体 */
.icon-calendar::before { content: "📅"; }
.icon-folder::before { content: "📁"; }
.icon-tag::before { content: "🏷️"; }
.icon-eye::before { content: "👁️"; }
.icon-arrow-right::before { content: "→"; }
.icon-arrow-left::before { content: "←"; }
.icon-home::before { content: "🏠"; }
.icon-file::before { content: "📄"; }

/* 文章列表容器 */
.article-list-container {
    padding: 0 0;
    background-color: #f8f9fa;
}

.article-list {
    margin-bottom: 40px;
}

/* 文章卡片 - 左侧图片右侧内容布局 */
.article-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    height: 280px;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 左侧图片区域 */
.article-image {
    flex: 0 0 400px;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 0 0 12px;
    margin: 15px 0 15px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 8px;
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}


/* 右侧内容区域 */
.article-content {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 文章头部信息 */
.article-header {
    margin-bottom: 20px;
}

.article-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #2c3e50;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title a:hover {
    color: #3498db;
}

/* 文章元信息 */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    font-size: 16px;
}

.meta-item a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: #2980b9;
}

/* 文章摘要 */
.article-excerpt {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章底部 */
.article-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
    transform: translateX(5px);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 分页容器 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.page-item {
    margin: 0;
}

.page-link {
    display: block;
    padding: 10px 15px;
    color: #3498db;
    text-decoration: none;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-item.active .page-link {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-item.disabled .page-link {
    color: #bdc3c7;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.widget-title {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    margin: 0;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
}

/* 分类列表 */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    border-bottom: 1px solid #ecf0f1;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.category-list .count {
    color: #7f8c8d;
    font-size: 14px;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 标签云 */
.tag-cloud {
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #3498db;
    color: #fff;
    transform: translateY(-2px);
}

/* 最新文章 */
.recent-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-posts li {
    border-bottom: 1px solid #ecf0f1;
    padding: 15px 25px;
    transition: background-color 0.3s ease;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts li:hover {
    background-color: #f8f9fa;
}

.recent-posts a {
    display: block;
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.recent-posts a:hover {
    color: #3498db;
}

.post-date {
    color: #7f8c8d;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .carousel-container {
        height: 450px;
    }
    
    .slide-overlay h2 {
        font-size: 2.2rem;
    }
    
    .article-item {
        height: 260px;
    }
    
    .article-image {
        flex: 0 0 350px;
    }
    
    .article-content {
        padding: 20px 25px;
    }
    
    .article-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 350px;
        margin-bottom: 30px;
    }
    
    .slide-overlay {
        padding: 25px;
    }
    
    .slide-overlay h2 {
        font-size: 1.8rem;
    }
    
    .slide-overlay p {
        font-size: 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: 15px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .article-list-container {
        padding: 0 0;
    }
    
    .article-item {
        flex-direction: column;
        height: auto;
    }
    
    .article-image {
        flex: none;
        height: 200px;
        margin: 15px 15px 0 15px;
        border-radius: 12px 12px 0 0;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .article-meta {
        gap: 15px;
        font-size: 13px;
    }
    
    .article-excerpt {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .article-footer {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .sidebar {
        margin-top: 30px;
    }
    
    .widget-title {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .category-list a,
    .recent-posts li {
        padding: 12px 20px;
    }
    
    .tag-cloud {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 280px;
    }
    
    .slide-overlay {
        padding: 20px;
    }
    
    .slide-overlay h2 {
        font-size: 1.5rem;
    }
    
    .slide-overlay p {
        font-size: 0.9rem;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
    }
    
    .carousel-control i {
        font-size: 16px;
    }
    
    .article-image {
        height: 180px;
        margin: 10px 10px 0 10px;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-title {
        font-size: 16px;
    }
    
    .article-meta {
        gap: 12px;
        font-size: 12px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
    
    .article-image::before {
        font-size: 11px;
        padding: 4px 8px;
        top: 10px;
        left: 10px;
    }
} 