/* ==============================
   文章分類 & 最新文章 區塊樣式
   ============================== */

/* 基本連結樣式 */
.category-list a,
.latest-posts a,
.you-may-like .elementor-post__title a {
    transition: color 0.4s ease;
    text-decoration: none;
}
.category-list a:hover,
.latest-posts a:hover,
.you-may-like .elementor-post__title a:hover {
    color: var(--e-global-color-4fecb0c);
}

/* ==============================
   最新文章列表
   ============================== */
.latest-post-item {
    line-height: 1.4;
    margin-bottom: 8px;
}
.latest-post-item:last-child {
    margin-bottom: 0;
}

/* ==============================
   分類清單
   ============================== */
   .category-item {
    line-height: 1.6;
    margin: 4px 0;
    position: relative;
    padding-left: 22px; /* 預留空間多一點 */
}
.category-item:last-child {
    margin-bottom: 0;
}

/* 子級縮排 */
.category-item.depth-1 { margin-left: 20px; }
.category-item.depth-2 { margin-left: 40px; }
.category-item.depth-3 { margin-left: 60px; }

/* 子級直角線條 */
.category-item.depth-1::before,
.category-item.depth-2::before,
.category-item.depth-3::before {
    content: "└─";
    position: absolute;
    left: -10px;
    top: 50%;                      /* 垂直置中 */
    transform: translateY(-50%);   /* 往上移一半 */
    line-height: 1;                /* 避免因行高導致偏移 */
}


/* ==============================
   Elementor 文章列表分隔線
   ============================== */
.blog_list_posts .elementor-loop-container .e-loop-item {
    position: relative;
}
.blog_list_posts .elementor-loop-container .e-loop-item:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd;
}



/* ==============================
   文章正文 (natxt)
   ============================== */
   .natxt h1 {
    margin: 50px 0;
    font-weight: bold;
}

.natxt figcaption {
    text-align: center;
    font-style: normal;
}

.natxt a {
    color: #3A006F;
}

.natxt li {
    margin: 15px 0;
}

.read {
    background-color: #F0F0F0;
}

/* ==============================
   文章標題間距 (排除三個特殊區塊)
   ============================== */

/* h2 */
.natxt h2:not(:is(.pongo-key-summary h2, .pongo-faq h2, .pongo-references h2, .pongo-related h2)) {
    padding: 6px 12px;
    margin: 50px 0 30px;
    border-left: 6px solid var(--e-global-color-d7b6491, #F9D600); /* 黃色粗線 */
    background: #fff8e6; /* 溫暖淺米色背景 */
    border-radius: 4px;
}

/* h3 */
.natxt h3:not(:is(.pongo-key-summary h3, .pongo-faq h3, .pongo-references h3, .pongo-related h3)) {
    margin: 40px 0 25px;
}

/* h4 */
.natxt h4:not(:is(.pongo-key-summary h4, .pongo-faq h4, .pongo-references h4, .pongo-related h4)) {
    margin: 35px 0 20px;
}

/* h5 */
.natxt h5:not(:is(.pongo-key-summary h5, .pongo-faq h5, .pongo-references h5, .pongo-related h5)) {
    margin: 30px 0 18px;
}

/* ==============================
   統一樣式：重點摘要 / FAQ / 參考資料 / 延伸閱讀
   ============================== */
.pongo-key-summary,
.pongo-faq,
.pongo-references,
.pongo-related {
    background: #fff7f9;
    border: 1px solid #f5c2c7;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
    line-height: 1.6;
    color: inherit;
}

/* 區塊標題 h2 */
.pongo-key-summary h2,
.pongo-faq h2,
.pongo-references h2,
.pongo-related h2 {
    font-size: 22px!important;
    font-weight: bold;
    margin-bottom: 12px;
    color: inherit;
}

/* FAQ 內的 h3 */
.pongo-faq h3 {
    font-size: 20px!important;
    font-weight: bold;
    margin: 25px 0 12px;
    color: inherit;
}

/* ==============================
   FAQ 樣式
   ============================== */
   .pongo-faq {
    border: none;
    background: none;
    padding: 0;
    counter-reset: faq-counter;
    margin-top: 50px;
}

/* FAQ 列表：上下有虛線 */
.pongo-faq-list {
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
}

/* FAQ 項目：中間橫線 */
.pongo-faq-item {
    margin: 0; /* 交給 padding 控制間距 */
    padding: 15px 0 15px 28px; /* 左側留空給編號 */
    border-bottom: 1px dashed #ddd;
    counter-increment: faq-counter;
    position: relative;
}

/* 最後一個項目不要 border-bottom，避免和外框重疊 */
.pongo-faq-item:last-child {
    border-bottom: none;
}
/* FAQ 內的 h3 (問題標題) */
.pongo-faq h3 {
    font-weight: bold;
    margin-top: 10px;   /* 上下相同 */
    margin-bottom: 20px;   /* 上下相同 */
    color: inherit;
}

/* 問題編號 */
.pongo-faq-question::before {
    content: counter(faq-counter) ".";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: inherit;
}

/* 問題文字 */
.pongo-faq-question {
    font-weight: bold;
    margin-bottom: 8px;
}

/* 答案文字 */
.pongo-faq-answer {
    line-height: 1.7;
    color: inherit;
}


/* ==============================
   參考資料清單
   ============================== */
.pongo-references {
    counter-reset: ref-counter;
}

.pongo-reference-list {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.pongo-reference-item {
    margin: 12px 0;
    line-height: 1.6;
    color: inherit;
    counter-increment: ref-counter;
    position: relative;
    padding-left: 28px;
}

.pongo-reference-item::before {
    content: counter(ref-counter) ".";
    position: absolute;
    left: 0;
    font-weight: normal; /* 改成正常字重 */
    color: inherit;
}

.pongo-reference-item a {
    text-decoration: none;
    color: var(--e-global-color-primary, #141414);
    transition: color 0.4s ease;
}

.pongo-reference-item a:hover {
    color: var(--e-global-color-b9886bb, #FCAA10);
}

/* ==============================
   延伸閱讀區塊（左框 + 圓角，無背景、無外框）
   ============================== */
.pongo-related {
    margin: 30px 0;
    padding: 12px 20px;
    background: none;              /* 不要背景 */
    border: none;                  /* 移除外框 */
    border-left: 5px solid #999;   /* 只有左邊框，加粗 */
    border-radius: 8px;            /* 圓角 */
    counter-reset: related-counter;
}

.pongo-related-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: inherit;
}

.pongo-related-item {
    margin: 0 0;
    line-height: 1.6;
    color: inherit;
    counter-increment: related-counter;
    position: relative;
    padding-left: 28px; /* 給數字留位置 */
}

/* 最後一個不要有下間距 */
.pongo-related-item:last-child {
    margin-bottom: 0;
}

.pongo-related-item::before {
    content: counter(related-counter) ".";
    position: absolute;
    left: 0;
    font-weight: normal; /* 不要加粗 */
    color: inherit;
}

.pongo-related-item a {
    text-decoration: none;
    color: var(--e-global-color-primary, #141414);
    transition: color 0.3s ease;
}

.pongo-related-item a:hover {
    color: var(--e-global-color-b9886bb, #FCAA10);
}
.pongo-reference-list li {margin: 5px 0;}

/* 相關文章連結樣式 */
.related-posts .elementor-post__title a {
    text-decoration: none;  /* 去掉底線 */
    color: var(--e-global-color-primary, #141414);
    transition: color 0.3s ease;
}

.related-posts .elementor-post__title a:hover {
    color: var(--e-global-color-b9886bb, #FCAA10);
}
