/* =====================================================
   共用富文本排版（前台文章內文 / 後台 HTML 編輯器預覽）
   ===================================================== */

.rich-content {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: .95rem;
    line-height: 1.9;
    color: #2e2e2e;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* TinyMCE 編輯區 iframe body（id="tinymce"）— 上下留白 */
body#tinymce {
    padding: 25px 0;
    margin: 0;
    box-sizing: border-box;
}

/* TinyMCE 外層編輯區 — 左右留白（覆寫預設 1px） */
.tox .tox-edit-area {
    padding-left: 25px !important;
    padding-right: 25px !important;
}

.rich-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.rich-content h1,
.rich-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: #3d5a6e;
    margin: 2.4em 0 .8em;
    padding-bottom: .5em;
    border-bottom: 1px solid #e8e3da;
    position: relative;
}

.rich-content h1::before,
.rich-content h2::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: #b89a6a;
}

.rich-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #3d5a6e;
    margin: 1.8em 0 .6em;
}

.rich-content p { margin-bottom: 1.2em; }

.rich-content ul,
.rich-content ol {
    padding-left: 1.6em;
    margin-bottom: 1.2em;
}

.rich-content li { margin-bottom: .5em; }

.rich-content strong {
    color: #3d5a6e;
    font-weight: 600;
}

.rich-content a {
    color: #3d5a6e;
    text-decoration: underline;
    text-decoration-color: #b89a6a;
}

.rich-content blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    background: #f8f6f3;
    border-left: 3px solid #b89a6a;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #666;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1em 0;
}

/* 勾選全寬時填滿內容區 */
.rich-content img.img-full,
body#tinymce img.img-full {
    width: 100%;
    display: block;
}

/* 後台 TinyMCE 編輯器預覽區 */
.tox-tinymce .tox-edit-area__iframe {
    background: #fff;
}
