/*
 * CATEGORY専用CSS：新しい category.php 用
 * style.css は変更せず、このファイルでカテゴリー画面を整える
 */

/* ==================================================
   1. カテゴリー全体
================================================== */

body.category {
    --category-text: #35464a;
    --category-muted: #65777b;
    --category-accent: #299fc5;
    --category-pale: #eaf6f8;
    --category-line: #d8e7e9;
    --category-card-bg: #ffffff;
    font-family: "Noto Sans JP", "Yu Gothic", "游ゴシック", sans-serif;
    color: var(--category-text);
}

/* 共通テーマのコンテナ幅に引っ張られず、カテゴリー専用で管理 */
body.category .category-container {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* サイドバーは category.php から呼び出さない */

/* ==================================================
   2. ヒーロー
================================================== */

body.category .category-header {
    box-sizing: border-box;
    width: 100%;
    min-height: 230px;
    margin: 0;
    padding: 48px 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #dceff3;
    background-image:
        linear-gradient(rgba(0, 45, 55, 0.22), rgba(0, 45, 55, 0.22)),
        url("https://piyo-chayama.site/wp-content/uploads/2026/10/header_img5.png");
    background-repeat: repeat, repeat;
    background-position: center, center;
    background-size: auto, 60% auto;

}

body.category .category-title-content {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;

    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

body.category .category-title {
    flex: 0 1 auto;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: .16em; 
    line-height: 1.25;
    overflow-wrap: anywhere;
}

body.category .category-description {
    flex: 1 1 420px;
    max-width: 620px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.9;
}

body.category .category-description > :first-child {
    margin-top: 0;
}

body.category .category-description > :last-child {
    margin-bottom: 0;
}

/* ==================================================
   3. パンくず
   ヒーローの直下に配置
================================================== */

body.category .breadcrumb {
    box-sizing: border-box;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 22px;

    color: var(--category-muted);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.6;
}

body.category .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em 0.6em;

    margin: 0;
    padding: 0;
    list-style: none;
}

body.category .breadcrumb li {
    margin: 0;
    padding: 0;
}

body.category .breadcrumb a {
    color: var(--category-accent);
    text-decoration: none;
}

body.category .breadcrumb a:hover,
body.category .breadcrumb a:focus-visible {
    text-decoration: underline;
}

/* ==================================================
   4. 投稿一覧
================================================== */

body.category .category-main {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.category .category-post-list {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;

    width: min(1120px, calc(100% - 48px));
    margin: 18px auto 64px;
}

body.category .category-card {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;

    background: var(--category-card-bg);
    border: 1px solid var(--category-line);
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(38, 76, 85, 0.08);
}

body.category .category-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--category-pale);
}

body.category .category-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.category .category-card-body {
    padding: 22px 24px 26px;
}

body.category .category-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

body.category .category-card-category {
    display: inline-block;
    padding: 4px 10px;

    color: #276d7d;
    background: var(--category-pale);
    border-radius: 999px;

    font-size: 0.78rem;
    line-height: 1.5;
}

body.category .category-card-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

body.category .category-card-title a {
    color: var(--category-text);
    text-decoration: none;
}

body.category .category-card-title a:hover,
body.category .category-card-title a:focus-visible {
    color: var(--category-accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

body.category .category-card-excerpt {
    color: var(--category-muted);
    font-size: 0.95rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

body.category .category-no-posts {
    box-sizing: border-box;
    width: min(1120px, calc(100% - 48px));
    margin: 32px auto 72px;
    padding: 28px;
    background: var(--category-pale);
    border-radius: 10px;
    line-height: 1.8;
}

/* ==================================================
   5. ページ送り
================================================== */

body.category .category-pagination {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto 80px;
    text-align: center;
}

body.category .category-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

body.category .category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;

    color: var(--category-text);
    background: #ffffff;
    border: 1px solid var(--category-line);
    border-radius: 8px;

    text-decoration: none;
}

body.category .category-pagination a.page-numbers:hover,
body.category .category-pagination a.page-numbers:focus-visible {
    color: #ffffff;
    background: var(--category-accent);
    border-color: var(--category-accent);
}

body.category .category-pagination .page-numbers.current {
    color: #ffffff;
    background: var(--category-accent);
    border-color: var(--category-accent);
}


/* ==================================================
   6. 共通フッター（PC版）
   ABOUT版のPCフッターに合わせた設定
================================================== */

body.category .site-footer {
    position: relative;
    box-sizing: border-box;
    min-height: 180px;
    padding: 48px max(40px, calc((100% - 1064px) / 2));
    color: #fff;
    background: url("https://piyo-chayama.site/wp-content/uploads/2026/10/header_img5.png") center / 75% repeat;
    isolation: isolate;
}

body.category .site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 45, 55, 0.22);
    z-index: -1;
}

body.category .site-footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    max-width: 1064px;
    margin: 0 auto;
    padding-bottom: 32px;
}

body.category .site-footer-brand {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

body.category .site-footer-brand p {
    margin: 0;
    color: #fff;
    text-align: left;
}

body.category .site-footer-home {
    display: inline-block;
    color: #fff;
    text-align: left;
    text-decoration: none;
}

body.category .site-footer-name {
    margin: 0 0 16px;
    font-family: "Noto Sans JP", "Yu Gothic", "游ゴシック", sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.6;
    text-align: left;
}

body.category .site-footer p.site-footer-copy {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    text-align: left;
    margin-bottom: 24px;
}

body.category .site-footer-sns {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

body.category .site-footer-nav {
    display: flex;
    flex: 0 0 100px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin: 0;
    padding: 0;
    text-align: left;
}

body.category .site-footer-nav a,
body.category .site-footer-nav a:visited,
body.category .site-footer-nav a:hover {
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
}

body.category .site-footer-bottom {
    max-width: 1064px;
    margin: 0 auto;
    margin-top: 30px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    text-align: right;
}

body.category .site-footer-copyright {
    margin: 0;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.6;
    text-align: right;
}



/* モバイル */
@media screen and (max-width: 700px) {
    body.category .site-footer {
        min-height: 0;
        padding: 32px 20px;
        background-size: auto 100%;
        background-repeat: no-repeat;
        background-position: center;
    }
    

    body.category .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 20px;
        width: 100%;
        padding-bottom: 24px;
    }

    body.category .site-footer-brand {
        width: 100%;
    }

    body.category .site-footer-name {
        font-size: 1.5rem;
        line-height: 1.5;
    }

    body.category .site-footer-copy {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    body.category .site-footer-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
        width: 100%;
    }

    body.category .site-footer-nav a,
    body.category .site-footer-nav a:visited,
    body.category .site-footer-nav a:hover {
        display: flex;
        flex: 1 1 0;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 10px 2px;
        font-size: 1.0rem;
        line-height: 1.5;
        text-align: center;
        white-space: nowrap;
    }
}




/* ==================================================
   7. タブレット
================================================== */

@media (max-width: 900px) {
    body.category .category-title-content {
        gap: 28px;
    }

    body.category .category-post-list {
        gap: 24px;
    }

    body.category .category-card-body {
        padding: 20px;
    }
}

/* ==================================================
   8. スマートフォン
================================================== */

@media (max-width: 600px) {
    body.category .category-header {
        min-height: 0;
        padding: 38px 22px;
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: auto, 100% 100%;
    }

    body.category .category-title-content {
        display: block;
    }

    body.category .category-title {
        margin-bottom: 16px;
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    body.category .category-description {
        max-width: none;
        font-size: 0.94rem;
    }

    body.category .breadcrumb {
        width: calc(100% - 36px);
        padding: 14px 0 18px;
        font-size: 0.8rem;
    }

    body.category .category-post-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        width: calc(100% - 36px);
        margin-top: 10px;
        margin-bottom: 48px;
    }

    body.category .category-card-body {
        padding: 18px 18px 22px;
    }

    body.category .category-card-title {
        font-size: 1.12rem;
    }

    body.category .category-no-posts,
    body.category .category-pagination {
        width: calc(100% - 36px);
    }

    body.category .category-pagination {
        margin-bottom: 56px;
    }
}

/* スマホ用：ヘッダー・フッターの背景調整 
@media screen and (max-width: 767px) {
.site-footer {
background-size: auto 100%;
background-repeat: no-repeat;
background-position: center;
}
}*/

