/* ───────────────────────────────────────────────────────────
   唯美 Immersive Article — 文章頁沉浸式美化
   配合首頁 page-luminous-home.php 的 Material Design 3 色票
   ─────────────────────────────────────────────────────────── */

/* ── 字型 ── */
.single-post body,
.single-post .entry-content,
.single-post .entry-title,
.single-post h1,
.single-post h2,
.single-post h3,
.single-post h4 {
    font-family: 'Noto Serif TC', 'PingFang TC', 'Microsoft JhengHei', serif !important;
}
.single-post body,
.single-post .entry-content p,
.single-post .entry-content li {
    font-family: 'Manrope', 'Noto Sans TC', sans-serif !important;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

/* ── 整體背景：溫暖漸層 ── */
.single-post {
    background: linear-gradient(180deg, #fbf9f8 0%, #f6efeb 50%, #fbf9f8 100%) !important;
    color: #1b1c1c;
}

/* ── 文章容器：玻璃擬態卡片 ── */
.single-post .ast-container,
.single-post .site-content,
.single-post #primary {
    background: transparent !important;
}
.single-post article.post {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    box-shadow: 0 12px 48px rgba(140, 75, 85, 0.08), 0 2px 8px rgba(80, 69, 59, 0.04);
    padding: 3rem 2.5rem !important;
    margin: 2rem auto;
    max-width: 880px;
    border: 1px solid rgba(228, 226, 225, 0.6);
    transition: box-shadow 0.4s ease;
}
.single-post article.post:hover {
    box-shadow: 0 24px 64px rgba(140, 75, 85, 0.12), 0 4px 12px rgba(80, 69, 59, 0.06);
}

/* ── 標題：金粉漸層 + 動感 ── */
.single-post .entry-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #682e38 !important;
    background: linear-gradient(135deg, #8c4b55 0%, #c97884 50%, #e696a2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem !important;
    animation: fadeInUp 0.8s ease-out;
}

/* ── 特色圖片：溫暖暈光 + 微 parallax ── */
.single-post .post-thumb,
.single-post .featured-image,
.single-post article.post img.wp-post-image {
    border-radius: 1.25rem !important;
    box-shadow: 0 16px 40px rgba(140, 75, 85, 0.18);
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.single-post article.post img.wp-post-image:hover {
    transform: scale(1.02);
}
.single-post .post-thumb figure,
.single-post .post-thumb,
.single-post figure.wp-block-image {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
}
.single-post .post-thumb::after,
.single-post figure.wp-block-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.15), transparent 60%);
    pointer-events: none;
    border-radius: 1.25rem;
}

/* ── 段落 H2：左側裝飾條 ── */
.single-post .entry-content h2 {
    position: relative;
    font-size: 1.6rem !important;
    color: #682e38 !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.25rem !important;
    padding-left: 1rem;
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #8c4b55, #e696a2) 1;
    animation: fadeInUp 0.6s ease-out;
}

/* ── H3：金線下劃 ── */
.single-post .entry-content h3 {
    font-size: 1.25rem !important;
    color: #70343e !important;
    margin-top: 2rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d4c4b7;
}

/* ── 段落內文 ── */
.single-post .entry-content p {
    color: #2c2825 !important;
    font-size: 1.05rem !important;
    margin-bottom: 1.25rem !important;
}

/* ── 引言 / strong 強調 ── */
.single-post .entry-content strong {
    color: #682e38;
    background: linear-gradient(180deg, transparent 60%, rgba(230, 150, 162, 0.25) 60%);
    padding: 0 2px;
}

/* ── 連結：peach hover ── */
.single-post .entry-content a {
    color: #8c4b55;
    text-decoration: none;
    border-bottom: 1px solid rgba(140, 75, 85, 0.3);
    transition: all 0.3s ease;
}
.single-post .entry-content a:hover {
    color: #682e38;
    border-bottom-color: #8c4b55;
    background: rgba(255, 217, 221, 0.4);
    padding: 0 4px;
    border-radius: 4px;
}

/* ── 條列項目 ── */
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}
.single-post .entry-content ul li {
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.single-post .entry-content ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 0;
    color: #c97884;
    font-size: 0.85rem;
}

/* ── FAQ 區塊：卡片化 ── */
.single-post .entry-content p strong:first-child {
    display: inline-block;
    color: #682e38;
    font-weight: 700;
    margin-right: 0.5em;
}

/* ── 表格美化 ── */
.single-post .entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(80, 69, 59, 0.08);
    margin: 1.5rem 0;
}
.single-post .entry-content thead {
    background: linear-gradient(135deg, #8c4b55 0%, #e696a2 100%);
    color: #fff;
}
.single-post .entry-content th,
.single-post .entry-content td {
    padding: 0.85rem 1rem;
    border: 1px solid #e4e2e1;
}
.single-post .entry-content tbody tr:nth-child(even) {
    background: #f6f3f2;
}
.single-post .entry-content tbody tr:hover {
    background: #ffe9eb;
    transition: background 0.3s ease;
}

/* ── 閱讀進度條 (頂部) ── */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #8c4b55, #e696a2, #c97884);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px rgba(230, 150, 162, 0.6);
}

/* ── 飄浮 CTA ── */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    padding: 14px 28px;
    background: linear-gradient(135deg, #8c4b55 0%, #c97884 100%);
    color: #fff !important;
    border-radius: 999px;
    font-family: 'Manrope', 'Noto Sans TC', sans-serif;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(140, 75, 85, 0.4), 0 2px 8px rgba(140, 75, 85, 0.2);
    border: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(0);
    opacity: 0;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.floating-cta.show {
    opacity: 1;
    pointer-events: auto;
}
.floating-cta:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 40px rgba(140, 75, 85, 0.5), 0 4px 16px rgba(140, 75, 85, 0.3);
    color: #fff !important;
}
.floating-cta::before {
    content: '✿';
    font-size: 1.1rem;
}

/* ── 滾動進場動畫 ── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── 文章 meta 簡化 ── */
.single-post .entry-meta,
.single-post .ast-author-details,
.single-post .post-meta {
    color: #82756a !important;
    font-size: 0.875rem;
}

/* ── EEAT 區塊（如果有 .eeat-footer 類）── */
.single-post .eeat-footer {
    background: linear-gradient(135deg, rgba(255, 217, 221, 0.5) 0%, rgba(235, 225, 214, 0.4) 100%);
    border-radius: 1rem;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    border-left: 4px solid #c97884;
}

/* ── 移動裝置調整 ── */
@media (max-width: 768px) {
    .single-post article.post {
        padding: 2rem 1.25rem !important;
        margin: 1rem;
        border-radius: 1rem;
    }
    .floating-cta {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ── 平滑滾動 ── */
html {
    scroll-behavior: smooth;
}
