/* 文章分享排版優化樣式 - hoin8.net */

/* ========== 文章列表頁面優化 ========== */
#article-list.even-box {
    padding: 30px 0;
    background: #f5f5f5;
}

/* 文章列表網格布局 - 強制覆蓋 */
#article-list .even-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding: 0 20px !important;
    margin: 0 auto 40px !important;
    max-width: 1200px !important;
    justify-content: flex-start !important;
}

/* 文章卡片樣式 - 強制三欄 */
#article-list .even-link {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    width: calc(33.333% - 14px) !important;
    margin: 0 !important;
    flex: 0 0 calc(33.333% - 14px) !important;
}

/* 移除所有預設margin和float */
#article-list .even-link {
    float: none !important;
    display: block !important;
}

#article-list .even-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

#article-list .even-link a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* 文章圖片 */
#article-list .even-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#article-list .even-link:hover img {
    transform: scale(1.05);
}

/* 文章標題 */
#article-list .even-link .title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding: 15px 20px 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
}

/* 文章摘要 */
#article-list .even-link .text {
    font-size: 14px;
    color: #666666;
    padding: 0 20px 15px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章日期 */
#article-list .even-link .article-date {
    font-size: 12px;
    color: #999999;
    padding: 10px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    margin-top: auto;
}

/* ========== 分頁導航優化 ========== */
#article-list .even-page {
    margin: 40px auto;
    padding: 20px;
    justify-content: center;
    gap: 8px;
}

#article-list .even-page .page-item {
    display: inline-block;
    padding: 10px 16px;
    min-width: 40px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666666;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
}

#article-list .even-page .page-item:hover {
    background: #fa5456;
    color: #ffffff;
    border-color: #fa5456;
    transform: translateY(-2px);
}

#article-list .even-page .page-item.active {
    background: #fa5456;
    color: #ffffff;
    border-color: #fa5456;
    font-weight: 600;
    pointer-events: none;
}

#article-list .even-page .page-item.disabled {
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: default;
    pointer-events: none;
}

/* ========== 文章詳情頁優化 ========== */
.pro-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 返回按鈕 */
.pro-box .back-pro {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666666;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.pro-box .back-pro:hover {
    background: #fa5456;
    color: #ffffff;
    transform: translateX(-5px);
}

.pro-box .back-pro .ico {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* 文章內容區 */
.pro-box .pro-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 文章標題區 */
.pro-box .pro-content header {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #fa5456;
}

.pro-box .pro-content .tag {
    display: inline-block;
    padding: 6px 12px;
    background: #fa5456;
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

.pro-box .pro-content h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: #333333;
}

/* 文章橫幅圖片 */
.pro-box .article-banner {
    margin: 0;
    overflow: hidden;
    max-height: 400px;
}

.pro-box .article-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 推廣橫幅優化 */
.pro-box .promotion-banner {
    margin: 25px 20px !important;
    border-radius: 8px !important;
    background: #fa5456 !important;
    padding: 18px !important;
    box-shadow: 0 3px 10px rgba(250, 84, 86, 0.2);
    transition: transform 0.3s ease;
}

.pro-box .promotion-banner:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(250, 84, 86, 0.3);
}

.pro-box .promotion-banner a {
    font-size: 18px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 文章內容排版 */
.pro-box .pro-text {
    padding: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
}

.pro-box .pro-text h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fa5456;
}

.pro-box .pro-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #34495e;
    margin: 25px 0 15px;
}

.pro-box .pro-text p {
    margin: 15px 0;
    text-align: justify;
}

.pro-box .pro-text ul,
.pro-box .pro-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.pro-box .pro-text li {
    margin: 10px 0;
    line-height: 1.8;
}

.pro-box .pro-text img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pro-box .pro-text blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid #fa5456;
    font-style: italic;
    color: #666666;
}

.pro-box .pro-text table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pro-box .pro-text table th {
    background: #fa5456;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.pro-box .pro-text table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.pro-box .pro-text table tr:hover {
    background: #f8f9fa;
}

/* ========== 響應式設計 ========== */
@media screen and (max-width: 1024px) {
    #article-list .even-nav {
        gap: 15px !important;
    }
    
    #article-list .even-link {
        width: calc(50% - 8px) !important;
        flex: 0 0 calc(50% - 8px) !important;
    }
}

@media screen and (max-width: 768px) {
    #article-list .even-nav {
        padding: 0 15px !important;
        gap: 15px !important;
    }
    
    #article-list .even-link {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    #article-list .even-link .title {
        font-size: 16px;
        padding: 12px 15px 8px;
    }
    
    #article-list .even-link .text {
        padding: 0 15px 12px;
        font-size: 13px;
    }
    
    .pro-box {
        padding: 20px 15px;
    }
    
    .pro-box .pro-content header {
        padding: 20px;
    }
    
    .pro-box .pro-content h1 {
        font-size: 22px;
    }
    
    .pro-box .pro-text {
        padding: 20px;
        font-size: 15px;
    }
    
    .pro-box .promotion-banner {
        margin: 20px 15px !important;
        padding: 15px !important;
    }
    
    .pro-box .promotion-banner a {
        font-size: 16px !important;
    }
}

@media screen and (max-width: 480px) {
    #article-list .even-page .page-item {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .pro-box .pro-content h1 {
        font-size: 20px;
    }
    
    .pro-box .pro-text {
        padding: 15px;
        font-size: 14px;
    }
}