/* ===== 香港樂齡指南 - 全站設計系統 v2.0 ===== */

/* --- 1. 全域字體與背景 --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans HK", "Helvetica Neue", sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #3A3A3A;
    background-color: #FAFAF8;
    -webkit-font-smoothing: antialiased;
}

/* --- 2. 連結 --- */
a, a:visited {
    color: #7A9E9F;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover, a:focus {
    color: #5C7A7B;
    text-decoration: underline;
}

/* --- 3. 標題層級 --- */
h1, h2, h3, h4, h5, h6 {
    color: #3A3A3A;
    line-height: 1.4;
    font-weight: 700;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}
h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }

/* --- 4. 內容區容器（置中 + 留白） --- */
.entry-content, .post-content, .article-content, .content-area, .ast-container, .site-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 5. 文章卡片（首頁列表） --- */
.ast-row, .ast-article-post, .post, article.post, .blog-layout-1, .ast-blog-featured-section {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ast-article-post:hover, article.post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

/* --- 6. 文章標題（卡片內） --- */
.ast-article-post .entry-title, article.post .entry-title, .ast-blog-featured-section .entry-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}
.ast-article-post .entry-title a, article.post .entry-title a {
    color: #3A3A3A;
}
.ast-article-post .entry-title a:hover, article.post .entry-title a:hover {
    color: #7A9E9F;
}

/* --- 7. 文章摘要（卡片內） --- */
.ast-article-post .entry-content p, article.post .entry-content p, .ast-blog-featured-section .entry-content p {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
}

/* --- 8. 導航列 --- */
.main-navigation li, .main-menu li, .primary-menu li, .nav-menu li, .menu-item, .ast-primary-header-bar .ast-builder-menu {
    margin-right: 24px;
    font-size: 17px;
}
.main-navigation a, .main-menu a, .primary-menu a, .nav-menu a, .menu-item a {
    color: #3A3A3A;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.main-navigation a:hover, .main-menu a:hover, .primary-menu a:hover, .nav-menu a:hover, .menu-item a:hover,
.main-navigation .current-menu-item a, .main-menu .current-menu-item a {
    color: #7A9E9F;
    border-bottom-color: #7A9E9F;
}

/* --- 9. 按鈕（全站統一） --- */
button, .button, .btn, a.button, .wp-block-button__link, input[type="submit"],
.wp-block-search__button {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 22px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    background-color: #7A9E9F;
    color: #FAFAF8;
    text-decoration: none;
    display: inline-block;
}
button:hover, .button:hover, .btn:hover, a.button:hover, .wp-block-button__link:hover, input[type="submit"]:hover,
.wp-block-search__button:hover {
    background-color: #5C7A7B;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* --- 10. 重點摘要卡（文章頂部） --- */
.hkll-stage2-reading-box {
    background-color: #FAFAF8 !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 10px !important;
    padding: 20px 24px !important;
    margin: 0 0 28px 0 !important;
}

/* --- 11. 行動清單區塊（文末） --- */
.hkll-stage2-action-box {
    background-color: #FAFAF8 !important;
    border: 1px solid #E5E5E5 !important;
    border-left: 4px solid #7A9E9F !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 20px 24px !important;
    margin: 28px 0 !important;
}

/* --- 12. 資訊時效提示 --- */
div[style*="background-color: #FFF8E1"] {
    border-radius: 8px !important;
}

/* --- 13. 過時提醒 --- */
div[style*="background-color: #F5F5F5"][style*="歷史紀錄"] {
    border-radius: 8px !important;
}

/* --- 14. 分享按鈕 --- */
.hkll-share-button {
    background-color: #E8B4B8 !important;
    color: #3A3A3A !important;
    border: none !important;
    border-radius: 8px !important;
    min-height: 44px !important;
    padding: 10px 18px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}
.hkll-share-button:hover {
    background-color: #D49A9F !important;
}

/* --- 15. 搜尋框 --- */
.wp-block-search__input, input[type="search"] {
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

/* --- 16. 手機長標題換行 --- */
h1, h2, h3, h4, h5, h6,
.entry-title, .post-title, .article-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* --- 17. 手機響應式 --- */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .site-content, .content-area, .entry-content {
        padding-left: 16px;
        padding-right: 16px;
    }
    .main-navigation li, .main-menu li, .primary-menu li,
    .nav-menu li, .menu-item {
        margin-right: 0;
        margin-bottom: 16px;
        font-size: 16px;
    }
    h1 { font-size: 1.5em; }
    h2 { font-size: 1.3em; }
    h3 { font-size: 1.1em; }
    .ast-article-post, article.post {
        padding: 16px;
        margin-bottom: 16px;
    }
}

/* --- 18. Footer 免責聲明 --- */
.stage3-footer-disclaimer, .footer-disclaimer {
    font-size: 13px !important;
    color: #666 !important;
    text-align: center !important;
    padding: 20px 16px !important;
    border-top: 1px solid #E8E8E8 !important;
    margin-top: 40px !important;
    line-height: 1.6 !important;
}

/* --- 19. 側邊欄小工具（若顯示） --- */
.widget {
    margin-bottom: 24px;
}
.widget-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #3A3A3A;
    margin-bottom: 12px;
}

/* --- 20. 相關文章 --- */
.ast-related-post, .related-posts {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}