/* Path: /wp-content/plugins/jct-meta-tags/assets/css/jct-faq-print.css */
/**
 * JCT FAQ Print Page - 前端純淨展示頁樣式
 * Version: 1.1.0
 *
 * 設計目標：
 *   - 全白背景、乾淨易讀的閱讀體驗
 *   - 響應式設計（手機/桌機）
 *   - 問答完整展開（不折疊）
 *   - 精美的 Q 數字標記視覺設計
 */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Body & Container ─────────────────────────────────────────────────────── */

.jct-faq-print-body {
    background-color: #ffffff;
    color: #1a1a2e;
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jct-faq-print-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── 來源文章區塊 ─────────────────────────────────────────────────────────── */

.jct-faq-print-source-section {
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f5;
}

.jct-faq-print-source-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 16px;
}

.jct-faq-print-source-icon {
    font-size: 14px;
}

/* 覆寫 Post Card 在展示頁的樣式 */
.jct-faq-print-source-section .jct-post-card {
    border: 2px solid #e8eaf6;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    min-height: 140px;
    margin-bottom: 0;
}

.jct-faq-print-source-section .jct-post-card:hover {
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.16);
    transform: translateY(-3px);
}

.jct-faq-print-source-section .jct-post-card-title {
    font-size: 1.1rem;
    color: #1e3a8a;
}

/* ── 頁面標題 ─────────────────────────────────────────────────────────────── */

.jct-faq-print-header {
    margin-bottom: 40px;
    text-align: center;
}

.jct-faq-print-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 10px;
}

.jct-faq-print-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
}

.jct-faq-print-subtitle strong {
    color: #2563eb;
    font-weight: 700;
}

/* ── FAQ 列表 ─────────────────────────────────────────────────────────────── */

.jct-faq-print-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── FAQ 單項 ─────────────────────────────────────────────────────────────── */

.jct-faq-print-item {
    padding: 36px 0;
    border-bottom: 1px solid #f3f4f6;
    animation: jct-fade-in 0.4s ease both;
}

.jct-faq-print-item:last-child {
    border-bottom: none;
}

@keyframes jct-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ── 問題行（數字 + 標題）────────────────────────────────────────────────── */

.jct-faq-print-q-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.jct-faq-print-q-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    margin-top: 4px;
}

.jct-faq-print-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.45;
    /* h2 重置（此頁無其他 h2 競爭，直接使用） */
    letter-spacing: -0.01em;
}

/* ── 答案區塊 ─────────────────────────────────────────────────────────────── */

.jct-faq-print-answer {
    padding-left: 52px; /* 與問題文字對齊（36px + 16px gap） */
    color: #374151;
    font-size: 0.97rem;
    line-height: 1.85;
}

.jct-faq-print-answer p {
    margin-bottom: 1em;
}

.jct-faq-print-answer p:last-child {
    margin-bottom: 0;
}

.jct-faq-print-answer ul,
.jct-faq-print-answer ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.jct-faq-print-answer li {
    margin-bottom: 0.35em;
}

.jct-faq-print-answer a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jct-faq-print-answer a:hover {
    color: #1d4ed8;
}

.jct-faq-print-answer strong {
    color: #111827;
    font-weight: 700;
}

/* ── 空狀態 ───────────────────────────────────────────────────────────────── */

.jct-faq-print-empty {
    text-align: center;
    padding: 64px 24px;
    color: #9ca3af;
}

.jct-faq-print-empty-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
}

.jct-faq-print-empty p {
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ── 廣告區塊 ──────────────────────────────────────────────────────────────────────────── */

.jct-faq-ad-space {
    margin: 48px 0 0 0;         /* 上方距 FAQ 列表加大間距，下方由 footer margin-top 控制 */
    text-align: center;
    min-height: 90px;           /* 防止廣告載入前版面位移 (CLS) */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

/* ── 頁尾 ────────────────────────────────────────────────────────────────────────────── */

.jct-faq-print-footer {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 2px solid #f0f0f5;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.jct-faq-print-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 50px;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
    transition: box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.jct-faq-print-back-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    opacity: 0.95;
}

.jct-faq-print-footer-sep {
    color: #d1d5db;
    font-size: 1.2rem;
}

.jct-faq-print-home-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.jct-faq-print-home-link:hover {
    color: #374151;
}

/* ── 響應式：手機版 ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .jct-faq-print-container {
        padding: 24px 16px 60px;
    }

    .jct-faq-print-title {
        font-size: 1.5rem;
    }

    .jct-faq-print-question {
        font-size: 1.05rem;
    }

    .jct-faq-print-q-num {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    .jct-faq-print-q-wrap {
        gap: 12px;
    }

    .jct-faq-print-answer {
        padding-left: 42px; /* 30px + 12px gap */
    }

    .jct-faq-print-item {
        padding: 28px 0;
    }

    /* 手機版 Post Card 保持橫排 */
    .jct-faq-print-source-section .jct-post-card {
        min-height: 110px;
    }
}

@media (max-width: 400px) {
    .jct-faq-print-answer {
        padding-left: 0;
    }

    .jct-faq-print-q-wrap {
        flex-direction: column;
        gap: 8px;
    }
}
