/* ==========================================
   新聞頁面樣式 - news.html & news-detail.html
   配色方案：海洋薄荷綠 (方案 5)
   ========================================== */

/* ==========================================
   Filter Tabs 樣式 (列表頁)
   ========================================== */
.filter-tab {
    padding: 0.75rem 1.5rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    cursor: pointer;
}

.filter-tab:hover {
    color: #00796b;
    background-color: #f0f7f4;
}

.filter-tab.active {
    color: #00796b;
    border-bottom-color: #00796b;
    background-color: #f0f7f4;
}

/* ==========================================
   Featured Post (置頂文章)
   ========================================== */
.featured-post {
    background: linear-gradient(135deg, #f0f7f4 0%, #ffffff 100%);
    border-left: 6px solid #00796b;
    transition: all 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 121, 107, 0.15);
}

/* ==========================================
   News Cards (列表頁)
   ========================================== */
.news-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 121, 107, 0.1);
}

/* ==========================================
   Event Card 特殊樣式
   ========================================== */
.event-card .event-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.event-card .event-date {
    background: #00796b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    display: inline-block;
}

/* ==========================================
   Badge 樣式
   ========================================== */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-announcement {
    background-color: #dcfce7;
    color: #166534;
}

.badge-event {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-article {
    background-color: #fce7f3;
    color: #9f1239;
}

/* ==========================================
   Hidden class for filtering
   ========================================== */
.hidden {
    display: none !important;
}

/* ==========================================
   Search input 樣式
   ========================================== */
.search-input:focus {
    outline: none;
    border-color: #00796b;
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.1);
}

/* ==========================================
   Line clamp
   ========================================== */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   新聞詳情頁樣式
   ========================================== */
.article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.article-category {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-red);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 25px;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-gray);
    font-size: 0.9375rem;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 121, 107, 0.2);
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--text-light);
}

.article-content p {
    margin-bottom: 1.75rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    color: var(--primary-blue);
    border-left: 4px solid var(--accent-red);
    padding-left: 1rem;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-light);
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}

.article-content a {
    color: var(--primary-blue);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: var(--accent-red);
}

/* ==========================================
   相關新聞區塊
   ========================================== */
.related-news-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-light);
}

.related-news-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    text-align: center;
}

/* ==========================================
   Hero Slider (置頂文章輪播)
   ========================================== */
.hero-slider-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f0f7f4 0%, #ffffff 100%);
    border-left: 6px solid #00796b;
}

.slides-container {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.slide {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slider Navigation Buttons */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.15);
}

.slider-nav-btn:hover {
    background: #00796b;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 121, 107, 0.3);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-nav-btn i {
    font-size: 1.25rem;
}

/* Slider Indicators (圓點) */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 121, 107, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.indicator-dot.active {
    background: #00796b;
    border-color: #00796b;
    width: 32px;
    border-radius: 6px;
}

/* ==========================================
   響應式設計
   ========================================== */
@media (max-width: 768px) {
    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .slides-container {
        min-height: 480px;
    }

    .slider-indicators {
        bottom: 12px;
    }

    .indicator-dot {
        width: 10px;
        height: 10px;
    }

    .indicator-dot.active {
        width: 24px;
    }
}
