/* 文章內頁樣式（依建置板 article_AD.html，補付費牆/留言/收藏/廣告位） */

:root {
    --text-article: #333333;
    --quote-bg: #f1f5f9;
}

/* 閱讀頁主內容區塊 */
.article-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
}

/* 麵包屑導覽 */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    grid-column: 1 / -1;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 文章主體區域 */
.article-main {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    min-width: 0;
}

.article-category {
    color: var(--primary-red);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 15px;
    display: inline-block;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 5px;
}

.article-title {
    font-size: 2.4rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-main);
}

.article-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: 400;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.author-info strong {
    color: var(--primary-blue);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    padding: 0;
}

.btn-fb { background-color: #1877F2; }
.btn-line { background-color: #00C300; }
.btn-link { background-color: #666; }
.btn-fav { background-color: #b8860b; }
.btn-fav.active { background-color: var(--primary-red); }

/* 圖片容器樣式 */
.article-image-container {
    margin-bottom: 30px;
    margin-top: 25px;
}

.article-img,
.article-image-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 引言區塊樣式 */
.article-intro {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--quote-bg);
    padding: 25px;
    border-left: 5px solid var(--primary-blue);
    margin-bottom: 35px;
    border-radius: 0 8px 8px 0;
}

.image-caption,
.article-content .wp-caption-text,
.article-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* 內文排版設計 */
.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-article);
}

.article-content p {
    margin-bottom: 25px;
}

.article-content h2,
.article-content h3 {
    margin: 30px 0 15px;
    line-height: 1.4;
}

.article-content img {
    border-radius: 4px;
}

.article-content blockquote {
    background-color: var(--quote-bg);
    border-left: 5px solid var(--primary-blue);
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
}

/* 付費牆解鎖提示 */
.spm-paywall {
    position: relative;
    margin-top: -120px;
    padding-top: 120px;
}

.spm-paywall-fade {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #ffffff 90%);
    pointer-events: none;
}

.spm-paywall-box {
    background: var(--quote-bg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-red);
    border-radius: 8px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.spm-paywall-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.spm-paywall-text {
    color: var(--text-muted);
    font-size: 1.02rem;
    margin-bottom: 22px;
}

.spm-paywall-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 廣告版位 */
.ad-slot {
    margin: 0 auto;
}

.ad-slot-sidebar {
    width: 300px;
    max-width: 100%;
}

.ad-slot-inarticle {
    margin: 30px auto;
    text-align: center;
}

.ad-placeholder {
    width: 300px;
    height: 250px;
    max-width: 100%;
    background-color: #f1f5f9;
    border: 1px solid #eef0f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    font-size: 1rem;
    font-weight: bold;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ad-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4px;
}

/* 側邊欄 - 推薦閱讀 */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    border-left: 4px solid var(--primary-blue);
    padding-left: 10px;
    margin-bottom: 15px;
}

.related-link {
    text-decoration: none;
}

.related-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-img {
    width: 100%;
    height: 140px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.related-text {
    padding: 15px;
}

.related-text h4 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-main);
}

.related-text span {
    font-size: 0.8rem;
    color: var(--primary-red);
    font-weight: bold;
}

/* 留言區 */
.comments-area {
    margin-top: 45px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 800;
    border-left: 4px solid var(--primary-blue);
    padding-left: 10px;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment-list .comment-body {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 15px;
}

.comment-list .comment-author {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-list .comment-author img {
    border-radius: 50%;
}

.comment-list .comment-metadata {
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.comment-list .comment-metadata a {
    color: var(--text-muted);
    text-decoration: none;
}

.comment-list .children {
    list-style: none;
    margin-left: 30px;
}

.comment-list .reply a {
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
}

.comment-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-family: inherit;
}

.comment-form .submit {
    background-color: var(--primary-blue);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form .submit:hover {
    background-color: var(--primary-red);
}

.comment-login-note {
    background: var(--quote-bg);
    border-radius: 6px;
    padding: 15px 18px;
    font-size: 0.95rem;
}

.comment-login-note a {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
}

/* RWD 響應式調整 */
@media (max-width: 992px) {
    .article-container {
        grid-template-columns: 1fr;
    }
    .article-main {
        padding: 25px;
    }
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.8rem;
    }
    .article-subtitle {
        font-size: 1.2rem;
    }
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .article-intro {
        font-size: 1.1rem;
        padding: 20px;
    }
}
