/*
 Theme Name: Hello Elementor Child
 Theme URI: https://example.com/
 Description: A lightweight child theme for Hello Elementor.
 Author: Your Name
 Author URI: https://example.com/
 Template: hello-elementor
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: hello-elementor-child
*/

/* Place your custom CSS below */
/* 類別列表 (category_list) */
.sidebar .category-list .category-item {
    margin-bottom: 0; /* 移除項目間距 */
}

.sidebar .category-list .category-item a {
    color: var(--e-global-color-secondary); /* 使用全局顏色變數 */
    font-family: var(--e-global-typography-primary-font-family), Sans-serif; /* 使用全局字體變數 */
    font-weight: var(--e-global-typography-primary-font-weight); /* 使用全局字重變數 */
    text-decoration: none; /* 移除下劃線 */
    transition: color 0.4s ease, font-size 0.4s ease, font-weight 0.4s ease; /* 文字顏色、字體大小、字重過渡 */
}

.sidebar .category-list .category-item a:hover {
    color: var(--e-global-color-02330b6); /* 懸停時使用指定顏色 */
}

/* 子分類 (depth-1) 設定縮排 並添加直角符號 ⎿ */
.sidebar .category-list .category-item.depth-1 {
    padding-left: 20px; /* 設定左邊縮排 */
}

.sidebar .category-list .category-item.depth-1 a::before {
    content: "⎿"; /* 使用 ⎿ 這個直角符號 */
    margin-right: 5px; /* 直角符號和文字之間的間距 */
    color: var(--e-global-color-secondary); /* 預設為黑色 */
    transition: color 0.4s ease; /* 顏色過渡 */
}

/* 懸停時，改變直角符號顏色 */
.sidebar .category-list .category-item.depth-1 a:hover::before {
    color: var(--e-global-color-02330b6); /* 懸停時使用指定顏色 */
}

/* 最新文章列表 (new_posts_list) */
.sidebar .new_posts_list .elementor-post .elementor-post__title a {
    color: var(--e-global-color-secondary); /* 使用全局顏色變數 */
    font-family: var(--e-global-typography-primary-font-family), Sans-serif; /* 使用全局字體變數 */
    font-weight: var(--e-global-typography-primary-font-weight); /* 使用全局字重變數 */
    text-decoration: none; /* 移除下劃線 */
    transition: color 0.4s ease, font-size 0.4s ease, font-weight 0.4s ease; /* 文字顏色、字體大小、字重過渡 */
}

.sidebar .new_posts_list .elementor-post .elementor-post__title a:hover {
    color: var(--e-global-color-02330b6); /* 懸停時使用指定顏色 */
}


/* 在每個項目之後插入橫線 */
.post_list_all .elementor-loop-container .e-loop-item {
    position: relative; /* 為了使用偽元素 */
}

/* 為每個 .e-loop-item 插入橫線 */
.post_list_all .elementor-loop-container .e-loop-item::after {
    content: ""; /* 創建空的偽元素 */
    position: absolute; /* 絕對定位 */
    bottom: -20px; /* 橫線位於每個項目的下方 */
    left: 0;
    width: 100%; /* 橫線寬度與項目寬度一致 */
    height: 1px; /* 橫線高度 */
    background-color: var(--e-global-color-132919f); /* 橫線顏色 */
}

/* 隱藏最後一個項目的橫線 */
.post_list_all .elementor-loop-container .e-loop-item:last-child::after {
    display: none; /* 隱藏最後一個項目下面的橫線 */
}

.article_content figure {
  text-align: center; /* 讓文字水平置中 */
  margin: 50px 0px;
  width: 100%;
}

.article_content figure figcaption {
  font-size: 14px;
  color: #888;
  padding-left: 20px;
  font-style: normal; 
}

.article_content figure figcaption::before {
  content: '▲';
  font-size: 18px;
  color: #888;
  margin-right: 8px;  /* 讓三角形與文字之間有間隔 */
}


.article_content h2 {
  font-weight: bold; /* 設定字體為粗體 */
  margin-top: 50px; /* 上方間距 30px */
  margin-bottom: 25px; /* 下方間距 20px */
  position: relative; /* 設置相對定位，使螢光筆效果定位於文字底部 */
  display: inline-block; /* 讓文字寬度根據內容自動調整 */
}

.article_content h3{
  margin-top: 30px; /* 上方間距 30px */
  margin-bottom: 30px; /* 下方間距 20px */
}
.article_content h4{
  margin-top: 20px; /* 上方間距 30px */
  margin-bottom: 20px; /* 下方間距 20px */
}

.article_content ol,.article_content ul{
    margin-bottom: 14.4px;
}


.article_content h2::after {
  content: ''; /* 插入內容 */
  position: absolute; /* 使用絕對定位 */
  bottom: 5px; /* 將螢光筆放在文字底部 */
  left: 0; /* 從文字的左邊開始 */
  width: 100%; /* 設定寬度為 100%，根據文字長度自動調整 */
  height: 4px; /* 設定螢光筆的高度 */
  background-color: #fffa65; /* 設定螢光筆顏色 */
  border-radius: 2px; /* 增加圓角，讓線條更自然 */
  z-index: -1; /* 確保螢光筆在文字底部 */
}


.key_summary p:last-child {
    margin-bottom: 0;
}

.extend-related p{margin: 0px;}


.extend-related {
  margin: 30px 0;
  padding: 18px 22px;
  border-left: 6px solid var(--e-global-color-02330b6); /* 左側主色 */
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.related-label {
  font-weight: bold;
  background: linear-gradient(90deg, var(--e-global-color-02330b6), #ab47bc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px;
  margin-bottom: 10px;
}


.extend-related-single{    margin: 30px 0;}
.extend-related-single a.pongo-related-single-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.4s ease;
}

.extend-related-single a.pongo-related-single-link:hover {
    color: var(--e-global-color-02330b6);

}



.qa-section {
    margin: 0;
    padding: 0;
}

/* QA 項目 */
.qa-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 6px;
}

/* 隱藏 radio */
.qa-item input[type="radio"] {
    display: none;
}

/* 問題外框（整行可點） */
.qa-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f2f2f2;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 4px;
}

/* Q 區塊 */
.qa-q {
    flex-shrink: 0;
    margin-right: 8px;
}

/* 問題文字 */
.qa-text {
    flex: 1;
}

/* 加號符號 */
.qa-question::after {
    content: "+";
    transition: transform 0.2s ease;
}

/* 展開時變成減號 */
.qa-item input[type="radio"]:checked + .qa-question::after {
    content: "–";
}

/* 展開的回答內容 */
.qa-answer {
    max-height: 0;
    overflow: hidden;
    background: #fafafa;
    transition: max-height 0.3s ease;
    padding: 0 12px;
    border-radius: 0 0 4px 4px;
}

/* 展開時顯示內容 */
.qa-item input[type="radio"]:checked + .qa-question + .qa-answer {
    padding: 10px 12px;
    max-height: 400px;
}

/* 讓回答文字緊湊 */
.qa-answer p {
    margin: 0;
}


.post-references a {
  text-decoration: none;
  transition: color 0.4s ease; /* 加入過渡效果 */
}

.post-references a:hover {
  color: var(--e-global-color-02330b6); /* 懸停時使用指定顏色 */
  text-decoration: underline;
}


.yarpp_related_item img {
  aspect-ratio: 4 / 3;         /* 固定比例 4:3 */
  width: 100%;                 /* 撐滿容器寬度 */
  height: auto;                /* 初始高度自動，搭配 aspect-ratio 控制比例 */
  object-fit: cover;           /* 覆蓋整個框，不變形 */
  object-position: center;     /* 圖片置中顯示 */
  display: block;              /* 消除底部空白間距 */
  overflow: hidden;            /* 保證不外溢 */
}

.article_content .extend-related-single-wrap{background-color: #f3f3f3;padding: 5px 5px;}

/* 預設狀態 */
.extend-related-single {
  transition: color 0.3s ease;
}

/* 只有懸停在超連結上時變色 */
.extend-related-single:hover {
  color: var(--e-global-color-02330b6);
}
