/*
Theme Name: all blank
Theme URI:
Author: AikerLab
Author URI:
Description: 選用此主題後，所有「頁面」將呈現全空白版型（無 Header、無側欄、無 Footer），頁面呈現完全由頁面內容自行控制。Blog 文章列表、單篇文章、彙整等頁面仍保持 Header、右側欄、Footer 的完整版型。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: all-blank
Tags: blank, minimal, blog, right-sidebar
*/

/* =====================================================
   全域重置
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #333333;
    background-color: #ffffff;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    color: #005177;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    padding-left: 1.5rem;
}

/* =====================================================
   全空白頁面（page.php 專用）
   ===================================================== */
body.all-blank-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff;
}

body.all-blank-page .wp-block-group,
body.all-blank-page .entry-content {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

/* =====================================================
   Blog 版型：整體結構
   ===================================================== */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =====================================================
   Blog 版型：Header
   ===================================================== */
.site-header {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1rem;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
}

.site-title a:hover {
    color: #a8d8ea;
}

.site-description {
    font-size: 0.75rem;
    color: #aaaacc;
    margin-top: 0.15rem;
}

/* =====================================================
   Blog 版型：導覽選單
   ===================================================== */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: #ccccee;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-page-ancestor > a {
    background-color: #16213e;
    color: #ffffff;
    text-decoration: none;
}

/* 下拉選單 */
.main-navigation ul ul {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    min-width: 160px;
    display: none;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #aaaacc;
    color: #ffffff;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* =====================================================
   Blog 版型：主要內容區
   ===================================================== */
.site-content {
    flex: 1;
    padding: 2rem 0;
    background-color: #f5f5f5;
}

.content-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* 主欄 */
.primary-content {
    flex: 1 1 68%;
    min-width: 0;
}

/* 右側欄 */
.widget-area {
    flex: 0 0 28%;
    min-width: 220px;
}

/* =====================================================
   Blog 版型：文章卡片
   ===================================================== */
.post-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-card-thumbnail a {
    display: block;
}

.post-card-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-meta {
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 0.6rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: #1a1a2e;
}

.post-card-title a:hover {
    color: #0073aa;
    text-decoration: none;
}

.post-card-excerpt {
    color: #555555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: #0073aa;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.read-more-link:hover {
    background-color: #005177;
    color: #ffffff;
    text-decoration: none;
}

/* =====================================================
   Blog 版型：分頁
   ===================================================== */
.pagination {
    margin-top: 1.5rem;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    color: #333333;
    font-size: 0.9rem;
    background: #ffffff;
    transition: background 0.2s, color 0.2s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
    text-decoration: none;
}

/* =====================================================
   Blog 版型：單篇文章
   ===================================================== */
.single-post-wrap {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.single-post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eeeeee;
}

.single-post-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.single-post-meta {
    font-size: 0.82rem;
    color: #888888;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.single-post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333333;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.single-post-content p {
    margin-bottom: 1.2rem;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.2rem;
}

.single-post-content blockquote {
    border-left: 4px solid #0073aa;
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f0f7fc;
    color: #555555;
    border-radius: 0 4px 4px 0;
}

.single-post-content img {
    border-radius: 4px;
    margin: 1rem 0;
}

.single-post-content pre {
    background: #1a1a2e;
    color: #ccccee;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eeeeee;
    font-size: 0.85rem;
    color: #555555;
}

.post-tags a {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #f0f0f0;
    border-radius: 3px;
    margin: 0.2rem;
    color: #555555;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.post-tags a:hover {
    background: #0073aa;
    color: #ffffff;
    text-decoration: none;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eeeeee;
}

.post-navigation a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #dddddd;
    border-radius: 4px;
    color: #333333;
    font-size: 0.875rem;
    transition: background 0.2s;
    max-width: 48%;
}

.post-navigation a:hover {
    background: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
    text-decoration: none;
}

/* =====================================================
   Blog 版型：側欄 Widgets
   ===================================================== */
.widget-area .widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget-area .widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

.widget-area ul {
    list-style: none;
    padding: 0;
}

.widget-area ul li {
    padding: 0.35rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.widget-area ul li:last-child {
    border-bottom: none;
}

.widget-area ul li a {
    color: #444444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-area ul li a:hover {
    color: #0073aa;
    text-decoration: none;
}

.widget-area .search-form {
    display: flex;
    gap: 0.4rem;
}

.widget-area .search-field {
    flex: 1;
    padding: 0.4rem 0.65rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 0.875rem;
}

.widget-area .search-submit {
    padding: 0.4rem 0.75rem;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.widget-area .search-submit:hover {
    background: #005177;
}

/* =====================================================
   Blog 版型：Footer
   ===================================================== */
.site-footer {
    background-color: #1a1a2e;
    color: #aaaacc;
    padding: 2rem 1.25rem;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-widget-area {
    flex: 1;
    min-width: 180px;
    max-width: 300px;
    text-align: left;
}

.footer-widget-area .widget-title {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #2a2a4a;
}

.footer-widget-area ul {
    list-style: none;
    padding: 0;
}

.footer-widget-area ul li {
    padding: 0.25rem 0;
    font-size: 0.825rem;
}

.footer-widget-area ul li a {
    color: #8888aa;
    transition: color 0.2s;
}

.footer-widget-area ul li a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-bottom {
    padding-top: 1rem;
    border-top: 1px solid #2a2a4a;
    font-size: 0.8rem;
    color: #666688;
}

.footer-bottom a {
    color: #8888aa;
}

.footer-bottom a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* =====================================================
   頁面標題區（彙整、搜尋、404）
   ===================================================== */
.page-header {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
}

.page-description {
    font-size: 0.9rem;
    color: #888888;
}

/* =====================================================
   無文章提示
   ===================================================== */
.no-results {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    text-align: center;
    color: #888888;
}

.no-results h2 {
    font-size: 1.2rem;
    color: #555555;
    margin-bottom: 0.75rem;
}

/* =====================================================
   彙整選單（下拉）
   ===================================================== */
.widget select {
    width: 100%;
    padding: 0.4rem 0.65rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #333333;
    background: #ffffff;
}

/* =====================================================
   搜尋結果高亮
   ===================================================== */
mark {
    background: #fff3cd;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* =====================================================
   RWD 響應式
   ===================================================== */
@media (max-width: 900px) {
    .content-inner {
        flex-direction: column;
    }

    .widget-area {
        flex: 1 1 100%;
        min-width: 0;
    }

    .primary-content {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .main-navigation {
        width: 100%;
    }

    .main-navigation ul {
        gap: 0.15rem;
    }

    .main-navigation a {
        padding: 0.4rem 0.6rem;
        font-size: 0.82rem;
    }

    .single-post-title {
        font-size: 1.35rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-navigation a {
        max-width: 100%;
    }

    .footer-widgets {
        flex-direction: column;
        align-items: center;
    }

    .footer-widget-area {
        max-width: 100%;
        text-align: center;
    }
}
