/* ── 標題區 ── */
.article-detail .article-head {
    text-align: center;
    margin-bottom: 36px;
}

/* 分類標籤（沿用列表頁樣式） */
.article-detail .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.article-detail .article-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 12px;
    border-radius: 4px;
    background: #fff8ed;
    border: 1px solid #f0d890;
    color: #CB7700;
}

/* 發佈資訊 */
.article-detail .article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: #9ca3af;
}
.article-detail .article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.article-detail .article-meta i {
    color: #f59e0b;
    font-size: 13px;
}

/* 標題底下的金色短線 */
.article-detail .article-divider {
    width: 60px;
    height: 3px;
    background: #f59e0b;
    border-radius: 2px;
    margin: 28px auto 0;
}

/* ── 主視覺 ── */
.article-detail .article-hero {
    margin: 0 0 36px;
    border-radius: 12px;
    overflow: hidden;
}
.article-detail .article-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.article-detail .editor-content > *:first-child { margin-top: 0; }
.article-detail .editor-content > *:last-child { margin-bottom: 0; }

.article-detail .editor-content h1,
.article-detail .editor-content h2,
.article-detail .editor-content h3,
.article-detail .editor-content h4,
.article-detail .editor-content h5,
.article-detail .editor-content h6 {
    color: #1f2937;
    font-weight: bold;
    line-height: 1.5;
    margin: 2em 0 .8em;
}
.article-detail .editor-content h2 {
    font-size: 24px;
    padding-left: 14px;
    border-left: 4px solid #f59e0b;
}
.article-detail .editor-content h3 { font-size: 20px; color: #CB7700; }
.article-detail .editor-content h4 { font-size: 18px; }

.article-detail .editor-content p { margin: 0 0 1.4em; }

.article-detail .editor-content a {
    color: #CB7700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.article-detail .editor-content a:hover { color: #f59e0b; }

.article-detail .editor-content ul,
.article-detail .editor-content ol {
    margin: 0 0 1.4em;
    padding-left: 1.6em;
}
.article-detail .editor-content li { margin-bottom: .6em; }

.article-detail .editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.article-detail .editor-content blockquote {
    margin: 1.6em 0;
    padding: 16px 22px;
    background: #fff8ed;
    border-left: 4px solid #f0d890;
    border-radius: 0 8px 8px 0;
    color: #6b7280;
}

.article-detail .editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 15px;
}
.article-detail .editor-content th,
.article-detail .editor-content td {
    border: 1px solid #f0daa1;
    padding: 10px 14px;
    text-align: left;
}
.article-detail .editor-content th {
    background: #fff3d4;
    color: #1f2937;
    font-weight: 700;
}

.article-detail .editor-content hr {
    border: 0;
    border-top: 1px solid #f0ece4;
    margin: 2em 0;
}

/* 影片等嵌入內容 */
.article-detail .editor-content iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* ── 上下篇導覽 ── */
.article-detail .article-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}
.article-detail .article-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 99px;
    border: 1.5px solid #e8dfc8;
    background: #fff;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.article-detail .article-nav a:hover {
    border-color: #f59e0b;
    color: #CB7700;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(74, 55, 40, .10);
}
.article-detail .article-nav i { font-size: 12px; }

/* 中間的返回列表：實心強調 */
.article-detail .article-nav .nav-back {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}
.article-detail .article-nav .nav-back:hover {
    background: #CB7700;
    border-color: #CB7700;
    color: #fff;
}

/* 沒有上一篇/下一篇時佔位，維持置中 */
.article-detail .article-nav .empty {
    flex: 0 0 auto;
    width: 1px;
}

/* ── RWD ── */
@media (max-width: 991px) {
    .article-detail { padding: 50px 0 60px; }
@media (max-width: 768px) {
    .article-detail .article-title { font-size: 26px; }
    .article-detail .article-wrapper { padding: 28px 22px; }
    .article-detail .editor-content { font-size: 16px; }
    .article-detail .editor-content h2 { font-size: 21px; }
    .article-detail .editor-content h3 { font-size: 18px; }
}

@media (max-width: 576px) {
    .article-detail .article-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .article-detail .article-nav a {
        padding: 10px 16px;
        font-size: 14px;
    }
    .article-detail .article-nav .nav-back {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .article-detail .article-nav .empty { display: none; }
}
