/* Articles Page Specific Styles */

/* 特色文章區域 */
.featured-section {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.featured-article {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.featured-article:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.featured-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 40px 32px 32px;
    color: white;
}

.featured-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.featured-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.5;
}

.featured-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.8;
}

/* 分類標籤 */
.category-section {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}



/* 文章卡片 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.article-content {
    padding: 24px;
}

.article-category {
    display: inline-block;
    background: rgba(43, 56, 90, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.author-avatar {
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.article-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-item i {
    color: var(--primary-color);
}

/* 側邊欄 */
.sidebar-widgets {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 200px;
}

.widget {
    margin-bottom: 32px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 熱門文章 */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.popular-item:hover {
    background: var(--bg-primary);
}

.popular-image {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-date {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 標籤雲 */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 12px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .featured-title {
        font-size: 1.5rem;
    }

    .featured-meta {
        gap: 16px;
    }



    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sidebar-widgets {
        position: static;
        margin-top: 24px;
    }
}

/* ============================================
   美業專欄頁面 - Modern Redesign
   ============================================ */

/* 全局變數 - 使用網站主色調 */
:root {
    --articles-primary: var(--primary, var(--color-primary));
    --articles-primary-dark: var(--primary-dark, var(--color-primary-dark));
    --articles-bg: var(--bg-body, var(--bg-body));
    --text-secondary: var(--text-light, #999999);
    --border-color: rgba(170, 145, 119, 0.15);
}

body {
    background-color: var(--articles-bg);
}

/* 容器 */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 統計卡片 */
.stats-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.stats-card:hover {
    border-color: var(--articles-primary);
    box-shadow: 0 4px 12px rgba(170, 145, 119, 0.1);
    transform: translateY(-2px);
}

.stats-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--articles-primary);
    margin-bottom: 8px;
}

.stats-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 控制區域 */
.articles-controls {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(170, 145, 119, 0.05);
}

.articles-search-input {
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.articles-search-input:focus {
    border-color: var(--articles-primary);
    box-shadow: 0 0 0 3px rgba(170, 145, 119, 0.1);
    outline: none;
}

.articles-filter-select {
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.articles-filter-select:hover {
    border-color: var(--articles-primary);
}

/* 文章卡片 - Modern Redesign */
.articles-container .article-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.articles-container .article-card:hover {
    border-color: var(--articles-primary);
    box-shadow: 0 4px 12px rgba(170, 145, 119, 0.15);
    transform: translateY(-2px);
}

.article-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--articles-bg);
    position: relative;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.articles-container .article-card:hover .article-image-wrapper img {
    transform: scale(1.05);
}

.article-badge {
    position: absolute;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.article-badge.featured {
    top: 12px;
    left: 12px;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
}

.article-badge.pinned {
    top: 12px;
    left: 12px;
    background: rgba(255, 193, 7, 0.95);
    color: #000;
}

.article-badge.member-only {
    bottom: 12px;
    left: 12px;
    background: rgba(255, 215, 0, 0.95);
    color: #000;
}

.article-badge.technician-only {
    bottom: 12px;
    left: 12px;
    background: rgba(74, 144, 164, 0.95);
    color: #fff;
}

.article-badge.category {
    top: 12px;
    right: 12px;
    background: rgba(170, 145, 119, 0.95);
    color: #fff;
}

.article-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.articles-container .article-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-container .article-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-container .article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-meta-item i {
    font-size: 12px;
}

/* 按鈕 */
.btn-articles-primary {
    background: var(--articles-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-articles-primary:hover {
    background: var(--articles-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(170, 145, 119, 0.2);
}

.btn-outline-articles {
    background: white;
    color: var(--articles-primary);
    border: 1.5px solid var(--articles-primary);
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-articles:hover {
    background: rgba(170, 145, 119, 0.05);
    color: var(--articles-primary-dark);
    border-color: var(--articles-primary-dark);
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(170, 145, 119, 0.05);
    border-radius: 50%;
    color: var(--text-secondary);
}

/* 響應式 - Modern Redesign */
@media (max-width: 767.98px) {
    .articles-container {
        padding: 20px 15px;
    }

    .article-image-wrapper {
        height: 180px;
    }

    .article-card-body {
        padding: 16px;
    }

    .articles-controls {
        padding: 16px;
    }
}
