/*
Theme Name: Remoter Theme
Theme URI: https://example.com/remoter-theme
Author: Your Name
Author URI: https://example.com
Description: A custom WordPress theme for the Remoter.org directory.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.gnu.org/licenses/gpl-2.0.html
Text Domain: remoter-theme
*/

/* 從 Google Fonts 導入 Inter 字體 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 定義顏色變量以匹配 Logo 藍色 */
:root {
    --color-logo-dark-blue: #1E40AF; /* Logo 中的深藍色 */
    --color-logo-medium-blue: #3B82F6; /* Logo 中的中藍色 */
    --color-logo-light-blue: #93C5FD; /* Logo 中的淺藍色 */
    --color-text-dark: #2C3E50; /* 深灰藍色，用於主要文字 */
    --color-text-medium: #34495E; /* 中等灰藍色 */
    --color-background-light: #F0F5F9; /* 柔和的淺藍灰色背景 */
    --color-white: #FFFFFF; /* 純白色 */
    --color-grey-border: #BDC3C7; /* 淺灰色邊框 */
    --color-tag-bg: #ECF0F1; /* 標籤背景淺灰色 */
    --color-tag-hover-bg: #DDE6ED; /* 標籤懸停淺藍色 */
    --color-light-grey-text: #7F8C8D; /* 淺灰色文字 */
}

/* 重置和基本樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* 使用 Inter 字體 */
    background-color: var(--color-background-light); /* 調整背景色為更柔和的淺藍灰色 */
    color: var(--color-text-dark); /* 調整主文字顏色為更深的灰藍色 */
    line-height: 1.6;
    font-weight: 400; /* 設定整體字體粗細為 400 */
}

/* 全站連結樣式 */
a {
    text-decoration: none; /* 移除所有連結的下劃線 */
    color: inherit; /* 繼承父元素的顏色 */
    transition: color 0.2s ease; /* 添加顏色過渡效果 */
}

a:hover {
    text-decoration: none; /* 懸停時也確保沒有下劃線 */
    color: var(--color-logo-medium-blue); /* 懸停時的顏色變化為 Logo 中藍色 */
}

/* 頁眉樣式 */
.header {
    padding: 2.5rem 1.5rem; /* 增加內邊距 */
    max-width: 800px; /* 稍微增加寬度 */
    margin: 0 auto;
}

.header-inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* 增加間距 */
}

.header-titles {
    display: flex;
    align-items: center;
    gap: 1.25rem; /* 調整間距 */
}

.header-logo {
    width: 80px; /* 稍微增大 Logo */
    height: 80px;
    flex-shrink: 0;
    border-radius: 16px; /* 增加圓角 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* 添加輕微陰影 */
}

.header-titles-container {
    flex: 1;
}

.header-title {
    font-size: 2.8rem; /* 稍微增大標題字體 */
    font-weight: 700; /* 更粗的字體 */
    line-height: 1.1;
    color: var(--color-text-dark); /* 網站標題顏色 */
    margin-bottom: 0.4rem;
}

/* 網站標題連結樣式 */
.header-title a {
    color: inherit; /* 繼承 .header-title 的顏色 */
}

.header-tagline {
    font-size: 1.25rem; /* 調整標語字體大小 */
    font-weight: 500; /* 調整字體粗細 */
    color: var(--color-text-medium); /* 調整顏色 */
}

.header-intro {
    font-size: 1.15rem; /* 調整介紹文字字體大小 */
    color: var(--color-text-medium);
    font-weight: 400; /* 調整字體粗細 */
    margin-bottom: 0rem;
}

.header-intro strong {
    font-weight: 600;
}

/* 介紹文字中的「Learn more」連結樣式 */
.intro-more-link {
    color: var(--color-logo-dark-blue); /* 更深的藍色 */
    font-weight: 500; /* 調整字體粗細 */
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background-color: rgba(30, 64, 175, 0.08); /* 輕微的背景色，基於 Logo 深藍色 */
}

.intro-more-link:hover {
    background-color: rgba(30, 64, 175, 0.15);
    color: var(--color-text-dark);
}


/* 標籤樣式 */
.tags {
    margin-top: 1.5rem; /* 調整間距 */
}

.tags-group {
    border: none;
    padding: 0;
}

.tags-label {
    display: none; /* 隱藏文字 */
}

.tags-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem; /* 調整間距 */
    justify-content: center; /* 居中標籤 */
}

.tag-label {
    padding: 0.6rem 1.2rem; /* 調整內邊距 */
    background-color: var(--color-tag-bg); /* 淺灰色背景 */
    border: 1px solid var(--color-grey-border); /* 添加輕微邊框 */
    border-radius: 25px; /* 更圓的圓角 */
    font-size: 1rem; /* 調整字體大小為 1rem */
    font-weight: 500;
    color: var(--color-text-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* 添加輕微陰影 */
}

/* 標籤光澤效果 */
.tag-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.6s ease-out; /* 調整過渡效果 */
}

.tag-label:hover::before {
    left: 100%;
}

.tag-label.active {
    background-color: var(--color-logo-dark-blue); /* 激活時的 Logo 深藍色 */
    color: var(--color-white);
    border-color: var(--color-logo-dark-blue);
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.2);
}

/* 主要條目樣式 (Remoter Cards) */
.entries {
    max-width: 800px; /* 調整為與 header 相同的寬度 */
    margin: 0 auto;
    padding: 0 1.5rem 3rem; /* 調整內邊距 */
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* 統一卡片間距 */
}

.entry {
    background-color: var(--color-white); /* 純白色背景 */
    border-radius: 16px; /* 更大的圓角 */
    padding: 1.8rem; /* 增加內邊距 */
    transition: all 0.3s ease; /* 統一過渡效果 */
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* 更明顯但柔和的陰影 */
    min-height: 150px; /* 調整最小高度 */
    display: flex; /* 確保內部 flex 佈局生效 */
    flex-direction: column;
    justify-content: space-between;
}

/* 基本條目懸停樣式 */
.entry:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 鼠標懸停時陰影加深 */
    transform: translateY(-5px); /* 輕微上浮效果 */
}

/* 根據徽章的條目特定背景樣式 */
.entry.entry-interview {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, var(--color-logo-medium-blue) 100%); /* 柔和的藍色漸變 */
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.1);
}

.entry.entry-interview:hover {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, var(--color-logo-medium-blue) 100%); /* 懸停時略深的藍色 */
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}

.entry.entry-supporter {
    background: linear-gradient(135deg, #E8F8F0 0%, #D4EBDC 100%); /* 柔和的綠色漸變 */
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.1);
}

.entry.entry-supporter:hover {
    background: linear-gradient(135deg, #DDEFE4 0%, #C3E0CC 100%);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

/* 創作者條目樣式 */
.entry.entry-creator {
    background: linear-gradient(135deg, #FFF8E0 0%, #FFE8B0 100%); /* 柔和的橙黃色漸變 */
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.1);
}

/* 創作者條目懸停樣式 */
.entry.entry-creator:hover {
    background: linear-gradient(135deg, #FFEFD0 0%, #FFDC90 100%);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.2);
}

.entry.entry-interview-supporter {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, #D4EBDC 100%); /* 柔和的藍綠色漸變 */
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.1);
}

.entry.entry-interview-supporter:hover {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, #C3E0CC 100%);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}

/* 確保這些特殊卡片內的文字顏色與網站主文字顏色一致 */
.entry.entry-interview .entry-title,
.entry.entry-interview .entry-description,
.entry.entry-supporter .entry-title,
.entry.entry-supporter .entry-description,
.entry.entry-creator .entry-title,
.entry.entry-creator .entry-description,
.entry.entry-interview-supporter .entry-title,
.entry.entry-interview-supporter .entry-description {
    color: var(--color-text-dark); /* 深灰藍色，與網站主文字顏色一致 */
}

/* 修改條目內容以垂直堆疊項目 */
.entry-content {
    display: flex;
    flex-direction: column; /* 垂直堆疊子元素 */
    gap: 0.8rem; /* 調整間距 */
    align-items: flex-start;
    flex-grow: 1; /* 讓內容區塊佔據可用空間 */
}

.entry-main {
    flex: 1;
    color: inherit; /* 從父元素繼承文字顏色 */
    display: flex; /* Change to flex to align avatar and text */
    align-items: center; /* Vertically center avatar and text */
    width: 100%;
    gap: 1.2rem; /* Space between avatar and text content */
}

.entry-main:hover {
    color: var(--color-logo-medium-blue); /* 懸停時的顏色變化 */
}

/* New: Avatar styling */
.entry-avatar {
    width: 80px; /* Avatar size */
    height: 80px;
    border-radius: 50%; /* Make it circular */
    object-fit: cover; /* Ensure image covers the area */
    flex-shrink: 0; /* Prevent shrinking */
    border: 3px solid var(--color-logo-light-blue); /* Light blue border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.entry-text-content {
    flex-grow: 1; /* Allow text content to take remaining space */
}

.entry-title {
    font-size: 1.5rem; /* 調整標題字體大小 */
    font-weight: 700; /* 更粗的字體 */
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.entry-description {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.8rem; /* 調整間距 */
    font-weight: 400; /* 調整字體粗細 */
    color: #555; /* 稍微淺一點的描述文字顏色 */
}

/* 重新設計的徽章樣式 */
.entry-badges {
    display: flex;
    flex-wrap: wrap; /* 允許換行 */
    gap: 0.6rem; /* 調整間距 */
    margin-top: 1rem;
}

.entry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem; /* 調整圖標與文字間距 */
    padding: 0.4rem 0.9rem; /* 調整內邊距 */
    border-radius: 20px; /* 更圓的圓角 */
    font-size: 0.8rem; /* 調整字體大小 */
    font-weight: 600;
    color: var(--color-white); /* 徽章文字顏色 */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 徽章陰影 */
}

/* 徽章的光澤效果（原始） */
.entry-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.entry-badge:hover::before {
    left: 100%;
}

.interview-badge {
    background: linear-gradient(135deg, var(--color-logo-dark-blue) 0%, var(--color-logo-medium-blue) 100%); /* 藍色漸變 */
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.interview-badge:hover {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
    /* 確保文字顏色不變 */
    color: var(--color-white); /* 明確設定為白色，防止繼承或被覆蓋 */
}

.supporter-badge {
    background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%); /* 綠色漸變 (保持原樣，與Logo藍色協調) */
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.supporter-badge:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    /* 確保文字顏色不變 */
    color: var(--color-white); /* 明確設定為白色，防止繼承或被覆蓋 */
}

/* 創作者徽章樣式 */
.creator-badge {
    background: linear-gradient(135deg, #F39C12 0%, #F5B041 100%); /* 橙色漸變 (保持原樣，與Logo藍色協調) */
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

/* 創作者徽章懸停樣式 */
.creator-badge:hover {
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
    /* 確保文字顏色不變 */
    color: var(--color-white); /* 明確設定為白色，防止繼承或被覆蓋 */
}

/* 圖標樣式 */
.badge-icon {
    width: 14px; /* 稍微增大圖標 */
    height: 14px;
    fill: currentColor;
}

/* 模態框樣式 */
.modal {
    border: none;
    border-radius: 16px; /* 更大的圓角 */
    padding: 2.5rem; /* 增加內邊距 */
    max-width: 650px; /* 稍微增大寬度 */
    width: 90vw;
    max-height: 85vh; /* 調整最大高度 */
    overflow-y: auto;
    background-color: var(--color-white);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35); /* 更明顯的陰影 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.6); /* 更深的背景遮罩 */
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.4rem; /* 增大關閉按鈕字體 */
    cursor: pointer;
    padding: 0.6rem;
    color: var(--color-light-grey-text); /* 調整顏色 */
    width: 36px; /* 增大按鈕大小 */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    background-color: var(--color-tag-hover-bg);
    transform: rotate(90deg); /* 懸停時旋轉效果 */
}

.modal h2 {
    font-size: 2rem; /* 增大模態框標題字體 */
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1.8rem;
    padding-right: 2.5rem;
}

.modal p {
    margin-bottom: 1.2rem;
    color: var(--color-text-medium);
    line-height: 1.7;
}

.modal a {
    color: var(--color-logo-dark-blue);
    font-weight: 500;
}

.modal a:hover {
    color: var(--color-logo-medium-blue);
}

/* 表單樣式 */
.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem; /* 增加間距 */
}

.input {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.input-label {
    font-weight: 500;
    color: var(--color-text-dark);
    font-size: 1rem;
}

.input-input {
    padding: 0.8rem; /* 調整內邊距 */
    border: 1px solid var(--color-grey-border); /* 調整邊框顏色 */
    border-radius: 8px; /* 調整圓角 */
    font-family: 'Inter', sans-serif; /* 使用 Inter 字體 */
    font-size: 1rem;
    color: var(--color-text-medium);
    background-color: #FDFDFD; /* 輕微的背景色 */
    transition: all 0.2s ease;
}

.input-input:focus {
    outline: none;
    border-color: var(--color-logo-dark-blue);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15); /* 更明顯的焦點陰影 */
}

textarea.input-input {
    resize: vertical;
    min-height: 140px; /* 調整最小高度 */
}

/* 響應式設計 */
@media (max-width: 768px) {
    .header {
        padding: 2rem 1rem;
    }

    .header-title {
        font-size: 2.2rem;
    }

    .header-tagline {
        font-size: 1.1rem;
    }

    .header-intro {
        font-size: 1rem;
    }

    .header-logo {
        width: 68px;
        height: 68px;
    }

    .entries {
        padding: 0 1rem 2rem;
    }

    .entry {
        padding: 1.5rem;
        min-height: 130px;
    }

    .entry-main {
        flex-direction: column; /* Stack avatar and text vertically on small screens */
        align-items: flex-start; /* Align to start */
        gap: 0.8rem; /* Adjust gap for vertical stacking */
    }

    .entry-avatar {
        width: 60px; /* Smaller avatar on mobile */
        height: 60px;
    }

    .entry-title {
        font-size: 1.35rem;
    }

    .entry-description {
        font-size: 0.95rem;
    }

    .entry-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
    }

    .badge-icon {
        width: 12px;
        height: 12px;
    }

    .modal {
        padding: 2rem;
    }

    .modal h2 {
        font-size: 1.75rem;
    }
}

/* 回到頂部按鈕樣式 */
#backToTopBtn {
    display: none; /* 默認隱藏 */
    position: fixed; /* 固定位置 */
    bottom: 25px; /* 位於頁面底部 */
    right: 25px; /* 距離右側 25px */
    z-index: 99; /* 確保不被覆蓋 */
    border: none; /* 無邊框 */
    outline: none; /* 無輪廓 */
    background-color: var(--color-logo-dark-blue); /* Logo 深藍色背景 */
    color: var(--color-white); /* 文字顏色 */
    cursor: pointer; /* 鼠標懸停時顯示指針 */
    padding: 16px; /* 內邊距 */
    border-radius: 50%; /* 圓形按鈕 */
    width: 55px; /* 固定寬度 */
    height: 55px; /* 固定高度 */
    display: flex; /* 使用 flexbox 居中圖標 */
    align-items: center; /* 垂直居中圖標 */
    justify-content: center; /* 水平居中圖標 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25); /* 添加陰影 */
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease; /* 平滑過渡 */
    opacity: 0.9; /* 略微透明 */
}

#backToTopBtn:hover {
    background-color: var(--color-logo-medium-blue); /* 懸停時背景色變深 */
    opacity: 1; /* 懸停時完全不透明 */
    transform: translateY(-3px); /* 輕微上浮效果 */
}

#backToTopBtn svg {
    width: 26px; /* SVG 圖標大小 */
    height: 26px; /* SVG 圖標大小 */
    fill: currentColor; /* 從父按鈕繼承顏色 */
}

/* 加載更多按鈕樣式 */
#loadMoreBtn {
    margin-top: 2.5rem; /* 按鈕上方添加間距 */
    align-self: center; /* 如果父元素是 flex-direction: column，則居中按鈕 */
    display: block; /* 確保佔據獨立一行 */
    padding: 0.8rem 1.8rem; /* 調整內邊距 */
    border: none;
    border-radius: 10px; /* 更大的圓角 */
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem; /* 調整字體大小 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: var(--color-logo-dark-blue); /* Logo 深藍色背景 */
    color: var(--color-white); /* 白色文字 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* 添加陰影 */
}

#loadMoreBtn:hover {
    background-color: var(--color-logo-medium-blue); /* 懸停時顏色變深 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* 懸停時陰影變深 */
    transform: translateY(-3px); /* 輕微上浮效果 */
}


/* 針對單一文章和頁面內容的通用樣式 */
.page-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* 博客文章樣式 (用於 single.php 和 archive.php 中的文章列表) */
.post-article {
    background-color: var(--color-white); /* 純白色背景 */
    border-radius: 16px; /* 更大的圓角 */
    padding: 1.8rem; /* 調整內邊距以與 .entry 保持一致 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    min-height: 150px; /* 調整最小高度 */
}

.post-article:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 鼠標懸停時陰影加深 */
    transform: translateY(-5px); /* 輕微上浮效果 */
}

/* 博客文章 - Interview 配色 */
.post-article.post-interview {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, var(--color-logo-medium-blue) 100%);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.1);
}

.post-article.post-interview:hover {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, var(--color-logo-medium-blue) 100%);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}

/* 博客文章 - Supporter 配色 */
.post-article.post-supporter {
    background: linear-gradient(135deg, #E8F8F0 0%, #D4EBDC 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.1);
}

.post-article.post-supporter:hover {
    background: linear-gradient(135deg, #DDEFE4 0%, #C3E0CC 100%);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.2);
}

/* 博客文章 - Creator 配色 */
.post-article.post-creator {
    background: linear-gradient(135deg, #FFF8E0 0%, #FFE8B0 100%);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.1);
}

/* 創作者條目懸停樣式 */
.post-article.post-creator:hover {
    background: linear-gradient(135deg, #FFEFD0 0%, #FFDC90 100%);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.2);
}

/* 博客文章 - Interview & Supporter 組合配色 */
.post-article.post-interview-supporter {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, #D4EBDC 100%);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.1);
}

.post-article.post-interview-supporter:hover {
    background: linear-gradient(135deg, var(--color-logo-light-blue) 0%, #C3E0CC 100%);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}


/* Ensure .entry-title applies to h2 within entries and post-articles */
.entry .entry-title, /* For index.php remoter cards */
.post-article .entry-title /* For blog posts and pages acting as cards */
{
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    color: var(--color-text-dark); /* Ensure color consistency */
}

/* Adjust general h1/h2 within post-articles and page-content-wrapper to not conflict with card titles */
/* These are for content *inside* the card, not the card's main title */
.post-article h1,
.page-content-wrapper h1 {
    font-size: 2.5rem; /* Keep existing larger size for actual h1 headings inside content */
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1.5rem;
}

.post-article h2:not(.entry-title), /* Exclude the card title h2 */
.page-content-wrapper h2:not(.entry-title) { /* Exclude the card title h2 */
    font-size: 2rem; /* Keep existing general h2 size inside content */
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1.2rem;
}

.post-article h3,
.page-content-wrapper h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

.post-article p,
.page-content-wrapper p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-medium);
    margin-bottom: 1rem;
}

/* 單一文章/頁面特有樣式 */
.single .site-main .entry-header,
.page .site-main .entry-header,
.archive .site-main .page-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.single .site-main .entry-title,
.page .site-main .entry-title,
.archive .site-main .page-title {
    margin-top: 0;
    margin-bottom: 0.8rem; /* 增加底部間距 */
    font-size: 2.5rem; /* 增大頁面標題字體 */
    font-weight: 700;
    color: var(--color-text-dark);
}

.entry-meta {
    font-size: 0.9rem; /* 調整字體大小 */
    color: var(--color-light-grey-text); /* 調整顏色 */
    margin-bottom: 1.8rem; /* 增加底部間距 */
}

.entry-meta a {
    color: var(--color-light-grey-text);
}

.entry-meta a:hover {
    color: var(--color-logo-medium-blue);
}

/* 頁腳樣式 */
.site-footer {
    max-width: 800px; /* 調整寬度 */
    margin: 3rem auto 0; /* 頁腳上方間距 */
    padding: 2rem 1.5rem; /* 調整內邊距 */
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-light-grey-text);
    border-top: 1px solid #EAECEE; /* 更細的邊框 */
}

.site-info {
    line-height: 1.6;
}

/* 響應式設計調整 */
@media (max-width: 768px) {
    .page-content-wrapper,
    .post-article {
        padding: 1.5rem 1rem;
    }

    .post-article h1,
    .page-content-wrapper h1,
    .single .site-main .entry-title,
    .page .site-main .entry-title,
    .archive .site-main .page-title {
        font-size: 2rem;
    }

    .post-article h2:not(.entry-title),
    .page-content-wrapper h2:not(.entry-title) {
        font-size: 1.6rem;
    }

    .post-article h3,
    .page-content-wrapper h3 {
        font-size: 1.35rem;
    }

    .post-article p,
    .page-content-wrapper p {
        font-size: 0.95rem;
    }
}

/* 回到頂部按鈕樣式 */
#backToTopBtn {
    display: none; /* 默認隱藏 */
    position: fixed; /* 固定位置 */
    bottom: 25px; /* 位於頁面底部 */
    right: 25px; /* 距離右側 25px */
    z-index: 99; /* 確保不被覆蓋 */
    border: none; /* 無邊框 */
    outline: none; /* 無輪廓 */
    background-color: var(--color-logo-dark-blue); /* Logo 深藍色背景 */
    color: var(--color-white); /* 文字顏色 */
    cursor: pointer; /* 鼠標懸停時顯示指針 */
    padding: 16px; /* 內邊距 */
    border-radius: 50%; /* 圓形按鈕 */
    width: 55px; /* 固定寬度 */
    height: 55px; /* 固定高度 */
    display: flex; /* 使用 flexbox 居中圖標 */
    align-items: center; /* 垂直居中圖標 */
    justify-content: center; /* 水平居中圖標 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25); /* 添加陰影 */
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease; /* 平滑過渡 */
    opacity: 0.9; /* 略微透明 */
}

#backToTopBtn:hover {
    background-color: var(--color-logo-medium-blue); /* 懸停時背景色變深 */
    opacity: 1; /* 懸停時完全不透明 */
    transform: translateY(-3px); /* 輕微上浮效果 */
}

#backToTopBtn svg {
    width: 26px; /* SVG 圖標大小 */
    height: 26px; /* SVG 圖標大小 */
    fill: currentColor; /* 從父按鈕繼承顏色 */
}

/* 加載更多按鈕樣式 */
#loadMoreBtn {
    margin-top: 2.5rem; /* 按鈕上方添加間距 */
    align-self: center; /* 如果父元素是 flex-direction: column，則居中按鈕 */
    display: block; /* 確保佔據獨立一行 */
    padding: 0.8rem 1.8rem; /* 調整內邊距 */
    border: none;
    border-radius: 10px; /* 更大的圓角 */
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem; /* 調整字體大小 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: var(--color-logo-dark-blue); /* Logo 深藍色背景 */
    color: var(--color-white); /* 白色文字 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* 添加陰影 */
}

#loadMoreBtn:hover {
    background-color: var(--color-logo-medium-blue); /* 懸停時顏色變深 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* 懸停時陰影變深 */
    transform: translateY(-3px); /* 輕微上浮效果 */
}
