/* static/css/announcement/list.css */

.announcement-page {
    padding: 30px 0;
    background: #f5f7fa;
    min-height: calc(100vh - 200px);
}

/* ========== 頁面標題 ========== */
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.header-title .subtitle {
    color: #999;
    margin: 0;
}

/* ========== 性別切換 ========== */
.gender-tabs {
    display: flex;
    gap: 10px;
}

.gender-tab {
    padding: 10px 24px;
    border-radius: 30px;
    background: white;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.gender-tab:hover {
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gender-tab.active {
    background: #667eea;
    color: white;
}

.gender-tab i {
    margin-right: 6px;
}

/* ========== 佈局 ========== */
.announcement-layout {
    display: flex;
    gap: 30px;
}

.announcement-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.announcement-content {
    flex: 1;
}

/* ========== 篩選卡片 ========== */
.filter-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    position: sticky;
    top: 20px;
}

.filter-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s;
}

.filter-item i {
    width: 24px;
    margin-right: 8px;
}

.filter-item:hover {
    background: #f5f7fa;
    color: #333;
}

.filter-item.active {
    background: #667eea;
    color: white;
}

/* ========== 動態統計 ========== */
.announcement-stats {
    margin-bottom: 20px;
    color: #999;
    font-size: 0.9rem;
}

.announcement-stats strong {
    color: #667eea;
}

/* ========== 動態列表 ========== */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-item {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: all 0.2s;
    position: relative;
}

.announcement-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.announcement-item.pinned {
    border-left: 4px solid #e74c3c;
}

.pin-badge {
    position: absolute;
    top: -8px;
    left: 20px;
    background: #e74c3c;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.announcement-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.announcement-main {
    flex: 1;
}

.announcement-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.announcement-title a {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.announcement-title a:hover {
    color: #667eea;
}

.badge-new {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.announcement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #999;
}

.announcement-meta i {
    margin-right: 4px;
}

.announcement-preview {
    color: #666;
    line-height: 1.6;
}

.announcement-action {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ========== 分頁 ========== */
.pagination-nav {
    margin-top: 40px;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 4px;
    color: #666;
}

.pagination .page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
}

/* ========== 詳情頁 ========== */
.announcement-detail-page {
    padding: 30px 0;
    background: #f5f7fa;
    min-height: calc(100vh - 200px);
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #666;
    text-decoration: none;
}

.back-link a:hover {
    color: #667eea;
}

.announcement-detail-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.announcement-header-info {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.announcement-icon-large {
    font-size: 4rem;
    line-height: 1;
}

.announcement-title-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.announcement-meta-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: #999;
}

.announcement-content-detail {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.announcement-link-box {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* ========== 空狀態 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    opacity: 0.3;
    margin-bottom: 20px;
}

/* ========== 響應式 ========== */
@media (max-width: 992px) {
    .announcement-layout {
        flex-direction: column;
    }
    
    .announcement-sidebar {
        width: 100%;
    }
    
    .filter-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gender-tabs {
        width: 100%;
    }
    
    .gender-tab {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
    }
    
    .announcement-item {
        flex-direction: column;
        padding: 20px;
    }
    
    .announcement-action {
        margin-top: 15px;
    }
    
    .announcement-detail-card {
        padding: 24px;
    }
    
    .announcement-header-info {
        flex-direction: column;
        gap: 16px;
    }
}

.announcement-content-detail {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

/* 富文本內的圖片樣式 */
.announcement-content-detail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 富文本內的標題樣式 */
.announcement-content-detail h1,
.announcement-content-detail h2,
.announcement-content-detail h3,
.announcement-content-detail h4 {
    margin: 24px 0 16px;
    color: #333;
}

.announcement-content-detail h2 {
    font-size: 1.6rem;
    border-left: 4px solid #667eea;
    padding-left: 16px;
}

.announcement-content-detail h3 {
    font-size: 1.3rem;
}

/* 富文本內的段落 */
.announcement-content-detail p {
    margin-bottom: 16px;
}

/* 富文本內的列表 */
.announcement-content-detail ul,
.announcement-content-detail ol {
    margin: 16px 0;
    padding-left: 24px;
}

.announcement-content-detail li {
    margin-bottom: 8px;
}

/* 富文本內的引用 */
.announcement-content-detail blockquote {
    margin: 20px 0;
    padding: 16px 24px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    font-style: italic;
    color: #666;
}

/* 富文本內的表格 */
.announcement-content-detail table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.announcement-content-detail th,
.announcement-content-detail td {
    padding: 12px;
    border: 1px solid #e0e0e0;
}

.announcement-content-detail th {
    background: #f5f7fa;
    font-weight: 600;
}

/* 富文本內的連結 */
.announcement-content-detail a {
    color: #667eea;
    text-decoration: none;
}

.announcement-content-detail a:hover {
    text-decoration: underline;
}

/* 富文本內的程式碼 */
.announcement-content-detail pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.announcement-content-detail code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}