/* ============================================================
   css/activity_list.css - 活動列表頁面樣式
   ============================================================ */

/* ============================================================
   全域設定 - 正式活動風格
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif TC', 'Inter', 'Segoe UI', system-ui, serif;
    background: #f0f2f5;
    color: #1e2b3c;
    line-height: 1.7;
    min-height: 100vh;
    padding: 0;
}

/* ============================================================
   活動頂部 (機關識別)
   ============================================================ */
/* ============================================================
   頂部 Header - LOGO 最左邊
   ============================================================ */



/* ============================================================
   導航下拉選單
   ============================================================ */

/* ============================================================
   主內容區塊
   ============================================================ */
.app-wrapper .main-content {
    max-width: 1500px;
    margin: 0 auto 3rem auto;
    padding: 2rem;
}

/* 頁首標題 */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.title-section h1 {
    font-size: 1.9rem;
    font-weight: 700;
    background-clip: text;
    -webkit-background-clip: text;
    letter-spacing: -0.5px;
}

.title-section p {
    color: #5b6e8c;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.publish-stats {
    background: #eef2ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1a5e3c;
}

/* 加載狀態 */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 2rem;
    border: 1px dashed #cbd5e1;
    color: #5b6e8c;
}

.loading-state .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #1a5e3c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 活動卡片網格 */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
}

/* ============================================================
   卡片設計
   ============================================================ */
.activity-card {
    background: #ffffff;
    border-radius: 24px;
    transition: all 0.25s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
    border-color: #a8d5ba;
}

/* ============================================================
   卡片圖片區
   ============================================================ */
.card-image-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f0f4f8;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.activity-card:hover .card-image-wrap img {
    transform: scale(1.03);
}

/* 圖片數量標籤 */
.card-image-wrap .image-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* 狀態旗標 */
.card-image-wrap .status-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-flag.active {
    background: #dcfce7;
    color: #166534;
}

.status-flag.inactive {
    background: #f1f5f9;
    color: #64748b;
}

/* ============================================================
   卡片內容
   ============================================================ */
.card-content {
    padding: 1.2rem 1.5rem 1rem 1.5rem;
    flex: 1;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #6f7d95;
    border-top: 1px solid #f0f2f8;
    padding-top: 0.7rem;
    margin-top: 0.3rem;
}

.card-meta .photo-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   卡片底部按鈕
   ============================================================ */
.card-actions {
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: #ffffff;
    display: flex;
    gap: 1rem;
}

.btn-detail {
    flex: 1;
    background: #1a5e3c;
    color: white;
    border: none;
    padding: 0.6rem 0;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    text-decoration: none;
}

.btn-detail:hover {
    background: #0f4a2e;
}

.btn-detail:active {
    transform: scale(0.97);
}

/* ============================================================
   無活動或加載狀態
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 2rem;
    border: 1px dashed #cbd5e1;
    color: #5b6e8c;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state .error-detail {
    color: #94a3b8;
    display: block;
    margin-top: 0.5rem;
}

/* ============================================================
   Toast 提示訊息
   ============================================================ */
.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293be6;
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 60px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
}

.toast-msg.toast-error {
    background: #b91c1ce6;
}

.main-btn{
	style="display: flex; 
	align-items: center; 
	gap: 1rem;
}
/* ============================================================
   底部版權
   ============================================================ */
.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.75rem;
    color: #7f9bb3;
    border-top: 1px solid #e0e9f2;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================================
   響應式設計
   ============================================================ */
@media (max-width: 992px) {
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem;
    }
    
    .activities-grid {
        grid-template-columns: 1fr;
		padding-bottom: 7rem;
    }
    
    .back-link {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-image-wrap {
        height: 180px;
    }
}

@media (max-width: 480px) {
    
    .back-link {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .title-section h1 {
        font-size: 1.4rem;
    }
    
    .activities-grid {
        gap: 1rem;
    }
    
    .activity-card {
        border-radius: 16px;
    }
    
    .card-image-wrap {
        height: 150px;
    }
    
    .card-content {
        padding: 0.8rem 1rem 0.6rem 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-actions {
        padding: 0 1rem 1rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-detail {
        padding: 0.5rem 0;
    }
    
    .card-image-wrap .image-count-badge {
        font-size: 0.6rem;
        padding: 1px 10px;
    }
}