/* 新聞輪播樣式 */
.news-carousel-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.news-carousel {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.news-carousel-container {
    position: relative;
    width: 100%;
    height: 120px;
}

.news-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
}

.news-carousel-item {
    flex: 0 0 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    display: none;
}

.news-carousel-item[style*="display: block"] {
    display: block;
}

.news-carousel-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #222;
    padding: 16px 24px;
    box-sizing: border-box;
}

.news-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.news-category {
    background: #e6e6e6;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #222;
}

.news-time {
    font-size: 0.7rem;
    color: #666;
}

.news-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
    color: #222;
}

.news-excerpt {
    font-size: 0.85rem;
    line-height: 1.3;
    color: #666;
    margin-bottom: 8px;
    flex-grow: 1;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.news-tag {
    background: #e6e6e6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #222;
}

/* 小點點指示器 - 水平置中 */
.news-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    width: 100%;
}

.news-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

/* 翻轉動畫效果 */
.news-carousel-item.flip {
    animation: flipIn 0.6s ease-out;
}

@keyframes flipIn {
    0% {
        transform: rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-carousel {
        max-width: 100%;
    }
    .news-carousel-container {
        height: 100px;
    }
    .news-carousel-content {
        padding: 12px 10px;
    }
    .news-title {
        font-size: 0.95rem;
    }
    .news-excerpt {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .news-carousel-container {
        height: 80px;
    }
    .news-carousel-content {
        padding: 8px 4px;
    }
    .news-title {
        font-size: 0.85rem;
    }
    .news-excerpt {
        font-size: 0.7rem;
    }
    .news-tag {
        font-size: 0.6rem;
        padding: 1px 5px;
    }
}

/* 控制按鈕 */
.news-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 20px;
}

.news-prev-btn,
.news-next-btn {
    background: #007bff;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.news-prev-btn:hover,
.news-next-btn:hover {
    background: #0056b3;
}

/* 自動播放動畫 */
.news-carousel-item.auto-play {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 淡入淡出效果 */
.news-carousel-item.fade {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
} 