/*
Theme Name:   Cenote Child（ほっきょく）
Template:     cenote
Description:  一般社団法人ほっきょく 用の Cenote 子テーマ
Version:      1.3.0
Text Domain:  cenote-hokkyoku
*/

/* 全体の色（あたたかいオレンジ系） */
:root {
    --hk-main: #e8735a;
    --hk-main-dark: #c95a43;
    --hk-text: #474259;
    --hk-muted: #77728a;
    --hk-soft: #fff6f1;
    --hk-pink: #fdecec;
    --hk-line: #06c755;
}

body {
    color: var(--hk-text);
}

a {
    color: var(--hk-main-dark);
}

/* ヘッダー上の黒い帯（テーマ見本の電話番号・メール）は使わないので消す */
.tg-site-header .tg-header-top {
    display: none !important;
}

/* フッター：やわらかいクリーム色にする */
#colophon.site-footer {
    background: var(--hk-soft) !important;
    color: var(--hk-text);
}

#colophon .tg-footer-top,
#colophon .tg-footer-bottom {
    background: transparent !important;
    color: var(--hk-text);
}

#colophon h2,
#colophon h2 a,
#colophon .tg-footer-bottom,
#colophon .tg-footer-bottom a {
    color: var(--hk-text) !important;
}

#colophon .tg-footer-bottom {
    border-top: 1px solid rgba(71, 66, 89, 0.12);
}

/* いちばん下の「© 年 一般社団法人ほっきょく」：中央にそろえて小さく */
#colophon .tg-footer-bottom-container {
    justify-content: center;
}

#colophon .tg-footer-bottom-right {
    display: none;
}

#colophon .site-info {
    font-size: 0.85rem;
    text-align: center;
}

#colophon .site-info a {
    text-decoration: none;
}

#colophon .hk-footer-links {
    display: flex;
    justify-content: center;
    gap: 6px 24px;
    flex-wrap: wrap;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
}

#colophon .hk-copyright {
    margin: 0;
}

/* スマホのヘッダー：ロゴを小さくし、メニューボタンをロゴの右に並べる */
@media (max-width: 680px) {
    .tg-site-header .tg-header-bottom {
        position: relative;
    }

    .tg-site-header .header-bottom-top {
        padding: 10px 0 !important;
    }

    .tg-site-header .custom-logo {
        width: auto !important;
        max-height: 56px !important;
    }

    .tg-site-header .header-bottom-bottom {
        position: absolute;
        top: 0;
        right: 16px;
        bottom: 0;
        display: flex;
        align-items: center;
    }

    .tg-site-header .header-bottom-bottom > .tg-container {
        width: auto;
        margin: 0;
        padding: 0 !important;
    }

    .tg-site-header .tg-header-action-menu {
        padding: 0 !important;
    }
}

/* メニューの「LINEで相談」：CSSクラスに menu-line を付けた項目を緑のボタンにする */
#primary-menu {
    align-items: center;
}

#primary-menu > li.menu-line {
    margin-left: 8px;
}

#primary-menu > li.menu-line > a {
    padding: 8px 22px !important;
    border-radius: 999px;
    background: var(--hk-line);
    color: #ffffff !important;
    font-weight: 700;
}

#primary-menu > li.menu-line > a:hover {
    background: #05a948;
}

#primary-menu > li.menu-line > a::before,
#primary-menu > li.menu-line > a::after {
    display: none !important;
}

#mobile-navigation li.menu-line > a {
    display: block;
    margin: 16px 0 0;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--hk-line);
    color: #ffffff !important;
    font-weight: 700;
    text-align: center;
}

/* ブログ一覧：サムネとタイトルだけを、高さをそろえた格子で並べる */
body.blog .cenote-content-masonry {
    height: auto !important;
    margin-bottom: 40px;
}

body.blog #cenote-content-masonry {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    height: auto !important;
}

body.blog #cenote-content-masonry > article {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.blog article .entry-thumbnail {
    display: block;
    margin: 0 !important;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 10px;
}

body.blog article .entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.blog article .entry-meta,
body.blog article .entry-content,
body.blog article .entry-footer {
    display: none !important;
}

body.blog article .entry-header {
    padding-top: 12px;
}

body.blog article .entry-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

@media (max-width: 960px) {
    body.blog #cenote-content-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    body.blog #cenote-content-masonry {
        gap: 20px 12px;
    }

    body.blog article .entry-header {
        padding-top: 8px;
    }

    body.blog article .entry-title {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* 記事と固定ページ：サイドバーなしで横に広がりすぎないよう、読みやすい幅で中央に置く */
body.single #primary,
body.page:not(.home) #primary {
    float: none;
    max-width: 780px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 記事の本文：見出しを見やすくする（JIN:R の飾りがなくなった分） */
.single .entry-content h2 {
    margin: 2.2em 0 1em;
    padding: 0.6em 0.9em;
    border-left: 6px solid var(--hk-main);
    border-radius: 4px;
    background: var(--hk-soft);
    font-size: 1.4rem;
    line-height: 1.5;
}

.single .entry-content h3 {
    margin: 1.8em 0 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--hk-pink);
    font-size: 1.2rem;
    line-height: 1.5;
}

.single .entry-content img {
    border-radius: 8px;
}

/* 記事：投稿者名（ログインID）と投稿者紹介の枠を出さない */
.entry-meta .byline,
.entry-meta .author,
.tg-author-box {
    display: none !important;
}

/* 念のため、コメント欄が出ても見せない */
.single #comments,
.single #respond {
    display: none !important;
}
