﻿@charset "utf-8";

/* 文章系統共用樣式 */

/* 全局樣式 */
* {
    box-sizing: border-box;
}

body {
    font-family: "微軟正黑體", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 文章卡片樣式 */
.article-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.article-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.article-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.article-card h3 a {
    color: #333;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #007bff;
}

.article-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-meta span {
    margin-right: 20px;
}

.article-meta i {
    margin-right: 5px;
}

.article-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 狀態標籤 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: normal;
    margin-left: 5px;
}

.status-passed {
    background: #28a745;
    color: #fff;
}

.status-elite {
    background: #ffc107;
    color: #333;
}

.status-sale {
    background: #dc3545;
    color: #fff;
}

.status-pending {
    background: #fd7e14;
    color: #fff;
}

/* 側邊欄 */
.sidebar-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h4 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
    font-size: 1.1rem;
}

.sidebar-widget h4 i {
    margin-right: 8px;
    color: #007bff;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    color: #666;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
}

.category-list li a:hover {
    color: #007bff;
    padding-left: 5px;
}

.category-list li.active a {
    color: #007bff;
    font-weight: bold;
}

/* 分頁 */
.pagination {
    margin: 30px 0;
    text-align: center;
}

.pagination ul {
    display: inline-block;
    padding: 0;
    margin: 0;
    border-radius: 4px;
}

.pagination li {
    display: inline;
}

.pagination li a,
.pagination li span {
    float: left;
    padding: 8px 15px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #007bff;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s;
}

.pagination li:first-child a,
.pagination li:first-child span {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination li:last-child a,
.pagination li:last-child span {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.pagination li a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination li.active span {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: #007bff;
    border-color: #007bff;
}

.pagination li.disabled span {
    color: #6c757d;
    cursor: not-allowed;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-info {
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 搜尋框 */
.search-box {
    margin-bottom: 20px;
}

.search-box .input-group {
    width: 100%;
}

.search-box .form-control {
    border-radius: 4px 0 0 4px;
}

.search-box .btn {
    border-radius: 0 4px 4px 0;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group .required:after {
    content: " *";
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 按鈕 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: normal;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0069d9;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-default {
    background: #6c757d;
    color: #fff;
}

.btn-default:hover {
    background: #5a6268;
}

/* 響應式 */
@media (max-width: 768px) {
    .article-meta span {
        display: block;
        margin-bottom: 5px;
    }
    
    .pagination li a,
    .pagination li span {
        padding: 6px 10px;
    }
}

/* 動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.5s ease-out;
}