* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.header-container {
    background: white;
}

.main-container {
    margin: 0 5%;
    padding: 15px 50px;
}

/* 輪播圖區域 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.carousel-category {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(0, 123, 255, 0.9);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.carousel-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.carousel-date {
    font-size: 16px;
    opacity: 0.9;
}

/* 輪播導航按鈕 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 輪播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background-color: white;
}

/* 類別篩選區域 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-item {
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.category-item.active {
    background-color: #007bff;
    color: white;
}

/* 內容包裝器 */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

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

.news-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.news-thumbnail {
    position: relative;
    width: 250px;
    height: 180px;
    flex-shrink: 0;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.news-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6c757d;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 側邊欄 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.sidebar-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    background-color: #f8f9fa;
}

.sidebar-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-date,
.sidebar-views {
    font-size: 12px;
    color: #6c757d;
}

.no-data {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #e9ecef;
}

.page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.page-dots {
    padding: 8px 4px;
    color: #6c757d;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 8px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: #6c757d;
}

/* 底部容器 */
.footer-container {
    margin-top: 40px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #999;
    padding-bottom: 30px;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .news-list {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-container {
        margin: 15px;
        padding: 0;
    }
    
    .carousel-container {
        height: 350px;
    }

    .carousel-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .carousel-title {
        font-size: 22px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .category-filter {
        padding: 15px;
        gap: 10px;
    }

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

    .news-thumbnail {
        width: 100%;
        height: 200px;
    }

    .news-content {
        padding: 15px;
    }

    .news-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 250px;
    }

    .carousel-title {
        font-size: 18px;
    }

    .carousel-date {
        font-size: 14px;
    }

    .news-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
}
