/* ═══════════════════════════════════════════════════
   Ruby's Custom Overrides
   自訂樣式：字體、間距、佈局微調
   ═══════════════════════════════════════════════════ */

/* ─── 全站襯線字體 ─── */
body,
h1, h2, h3, h4, h5, h6,
p, a, li, span, div, blockquote,
button, input, textarea,
.site-header, .site-footer, nav {
    font-family: Times, Georgia, serif !important;
}

/* ─── 移除所有連結底線 ─── */
a, a:hover, a:focus, a:active {
    text-decoration: none !important;
}

/* ─── Header / Navigation ─── */
header:has(.gh-navigation) {
    border-bottom: 1px solid rgba(155,155,155,0.2) !important;
}
.gh-navigation {
    height: 90px;
    border-bottom: 1px solid rgba(155,155,155,0.2);
}
@media (max-width: 768px) {
    .gh-navigation-brand {
        gap: 12px !important;
    }
}
@media (max-width: 767px) {
    .is-open#gh-navigation {
        z-index: 3999999 !important;
    }
}

/* ─── 內容間距微調 ─── */
:root {
    --section-padding: 40px !important;
}
.post-template .gh-container {
    margin-top: 0px !important;
}
.gh-content {
    padding-bottom: 68px !important;
}
.gh-header.is-slider {
    padding-bottom: 40px !important;
}
.gh-comments {
    margin-top: 0px !important;
}

/* ─── 留言區標題列（與 Ghost comments-ui 原生樣式一致）─── */
.comments-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 24px;
}
.comments-header-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gh-color-text, #000);
    flex-shrink: 0;
}
.comments-header-count {
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}
.has-light-text .comments-header-title {
    color: #fff;
}
.has-light-text .comments-header-count {
    color: rgba(255, 255, 255, 0.5);
}

/* ─── 容器（標籤雲、標籤區塊）─── */
.gh-container-inner {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
}
.tag-cloud-container .gh-main {
    padding-bottom: 20px !important;
}

/* ─── 卡片摘要 ─── */
.gh-card-excerpt {
    font-size: 1.4rem;
}
.index-of-contents-item-excerpt {
    -webkit-line-clamp: 1;
}
.post-navi-excerpt {
    -webkit-line-clamp: 1;
}

/* ─── Archive ─── */
.gh-archive {
    display: flex;
    flex-direction: column;
}

/* ─── Go-to-top 按鈕 ─── */
@media (max-width: 576px) {
    #go-top-button {
        z-index: 100 !important;
        right: 24px;
    }
}

/* ─── 公告欄 ─── */
.announcement-bar {
    border-top: none;
    border-bottom: 1px solid rgba(155,155,155,0.2);
    padding: 8px 0;
    text-align: center;
    margin-bottom: 16px;
}
.announcement-bar a {
    text-decoration: underline !important;
    font-weight: bold;
}

/* ─── 隱藏不需要的區塊（純 CSS，不閃爍）─── */
/* 首頁: 隱藏 Latest（保留 category-container、tag-cloud-container） */
.home-template section.gh-container.is-grid.gh-outer:not(.category-container):not(.tag-cloud-container),
.home-template section.gh-container.is-list.gh-outer:not(.category-container):not(.tag-cloud-container),
/* 文章頁: 隱藏 Read more */
.post-template section.gh-container.is-grid.gh-outer:not(.category-container):not(.tag-cloud-container),
/* 全站: 隱藏電子報 CTA */
section.gh-cta.gh-outer {
    display: none !important;
}

/* ─── NoScript 保護 ─── */
noscript + style { display: block; }
