@charset "utf-8";

/* =========================================================
    お知らせ（一覧 page-news.php／記事 single-news.php）
    ・記事は管理画面「お知らせ」から投稿（inc/news.php）
    ・背景はよくあるご質問（css/faq.css）と同じ和柄。一覧・記事は白い枠の中に
    ・本文の文字サイズは管理画面で rem で入る。「Text size」で html の font-size が変わると一緒に大きくなる
========================================================= */
/* 和柄（1332×461px）を背景として敷く（faq.css と同じ。スクロールしても画面の同じ位置にとどめる） */
/* 記事が少ない・本文が短いときもフッター（山の絵）が最初の画面に上がってこないよう、画面の高さ以上にする */
.news-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: 96px 0 128px;
    background: var(--bg);
}

.news-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url(../img/common/bg-room.webp) no-repeat center 16px / 1332px auto;
    pointer-events: none;
}

/* ---------- 一覧 ---------- */
.news-index {
    max-width: 960px;
    margin: 4rem auto 0; /* 64px auto 0 */
    list-style: none;
}

.news-index li + li {
    margin-top: 1rem; /* 16px */
}

/* 1 件：左に画像、右に日付・タイトル。右端に矢印 */
.news-index-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    gap: 2rem; /* 32px */
    position: relative;
    padding: 1.25em 4em 1.25em 1.25em; /* 20px 64px 20px 20px */
    border-radius: 8px;
    background: var(--white);
    transition: opacity 0.3s;
}

.news-index-item::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 28px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--text);
    border-right: 2px solid var(--text);
    transform: translateY(-50%) rotate(45deg);
}

@media (hover: hover) {
    .news-index-item:hover {
        opacity: 0.6;
    }
}

.news-index-photo img {
    border-radius: 4px;
    aspect-ratio: 340 / 255;
}

.news-index-date {
    display: block;
    font-size: 1rem; /* 16px */
    font-weight: 300;
    line-height: 1.4;
}

.news-index-title {
    display: -webkit-box;
    margin: 0.5rem 0 0; /* 8px 0 0 */
    overflow: hidden;
    font-family: var(--Mincho);
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-empty {
    max-width: 960px;
    margin: 4rem auto 0; /* 64px auto 0 */
    padding: 2.5em 1.5em; /* 40px 24px */
    border-radius: 8px;
    background: var(--white);
    text-align: center;
}

/* ---------- ページ送り ---------- */
.news-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem; /* 8px */
    margin-top: 3.5rem; /* 56px */
}

.news-pager a,
.news-pager span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.4em;
    border: 1px solid var(--warm-gray);
    border-radius: 50%;
    background: var(--white);
    font-size: 1rem; /* 16px */
    line-height: 1;
    letter-spacing: 0;
}

/* 和文フォントの数字の字面を、文字サイズに合わせて丸の中心へ上げる */
.news-pager .news-pager-num {
    padding-block-end: 0.15em;
    font-variant-numeric: lining-nums tabular-nums;
}

/* 今のページは黄色 */
.news-pager [aria-current="page"] {
    border-color: var(--yellow);
    background: var(--yellow);
    font-weight: 700;
}

.news-pager-arrow svg {
    display: block;
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) {
    .news-pager a:hover {
        border-color: var(--yellow);
    }
}

/* ---------- 記事 ---------- */
.news-article {
    max-width: 960px;
    margin: 4rem auto 0; /* 64px auto 0 */
    padding: 3.5em 4em 4em; /* 56px 64px 64px */
    border-radius: 8px;
    background: var(--white);
}

.news-article-header {
    padding-bottom: 1.5em; /* 24px */
    border-bottom: 1px solid var(--warm-gray);
}

.news-article-date {
    display: block;
    font-size: 1rem; /* 16px */
    font-weight: 300;
    line-height: 1.4;
}

.news-article-title {
    margin: 0.75rem 0 0; /* 12px 0 0 */
    padding-left: 0.6154em; /* 16px */
    border-left: 4px solid var(--yellow);
    font-family: var(--Mincho);
    font-size: 1.625rem; /* 26px */
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.06em;
}

/* アイキャッチ：幅は記事の中身いっぱい（本文に入れた画像と同じ幅に揃える）。
    以前は max-width: 680px で頭打ちにしていたが、本文の画像（最大 832px）より
    狭くなって見た目が揃わないため外した */
.news-article-photo {
    margin-top: 2.5rem; /* 40px */
}

.news-article-photo img {
    border-radius: 4px;
}

/* 本文（管理画面のエディタで入れたもの） */
.news-article-content {
    margin-top: 2.5rem; /* 40px */
    font-size: 1rem; /* 16px */
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.news-article-content p + p {
    margin-top: 1.2em;
}

.news-article-content a {
    color: var(--green);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (hover: hover) {
    .news-article-content a:hover {
        opacity: 0.6;
    }
}

.news-article-content strong,
.news-article-content b {
    font-weight: 700;
}

/* 本文の画像
    大きさは管理画面のツールバーの「画像小・画像中・画像大」で決める（inc/news.php）。
    ボタンを押していない画像は「大」＝幅いっぱいで、アイキャッチと同じ幅になる。
    角丸はアイキャッチ（.news-article-photo img）と同じ 4px */
.news-article-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.news-article-content img.gogaku-img-s {
    width: 25%;
}

.news-article-content img.gogaku-img-m {
    width: 50%;
}

.news-article-content img.gogaku-img-l {
    width: 100%;
}

/* 画像の配置：左寄せ・中央寄せ・右寄せ
    float は使わない（文字が画像の横に回り込まないようにするため）。
    画像をブロックにして、左右の margin を auto にすることで寄せる */
.news-article-content .alignleft,
.news-article-content .aligncenter,
.news-article-content .alignright {
    display: block;
    float: none;
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.news-article-content .alignleft {
    margin-right: auto;
    margin-left: 0;
}

.news-article-content .aligncenter {
    margin-inline: auto;
}

.news-article-content .alignright {
    margin-left: auto;
    margin-right: 0;
}

.news-article-content .wp-caption {
    max-width: 100%;
}

.news-article-content .wp-caption-text {
    margin-top: 0.5em;
    color: var(--gray);
    font-size: 0.875rem; /* 14px */
}

/* 前後の記事・一覧へ戻る */
.news-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem; /* 24px */
    max-width: 960px;
    margin: 3rem auto 0; /* 48px auto 0 */
}

.news-nav-prev a,
.news-nav-next a {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-size: 1rem; /* 16px */
    line-height: 1.4;
}

.news-nav-next {
    text-align: right;
}

.news-nav-prev a::before,
.news-nav-next a::after {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--text);
    border-right: 2px solid var(--text);
}

.news-nav-prev a::before {
    transform: rotate(-135deg);
}

.news-nav-next a::after {
    transform: rotate(45deg);
}

@media (hover: hover) {
    .news-nav-prev a:hover,
    .news-nav-next a:hover {
        opacity: 0.6;
    }
}

/* ---------- SP ---------- */
@media (max-width: 767px) {
    /* SP は和柄を 800px に縮める（faq.css と同じ） */
    .news-page {
        padding: 150px 0 88px;
    }

    .news-page::before {
        background-position: center 115px;
        background-size: 800px auto;
    }

    .news-index,
    .news-empty {
        margin-top: 2rem; /* 32px */
    }

    .news-index li + li {
        margin-top: 0.75rem; /* 12px */
    }

    .news-index-item {
        grid-template-columns: 110px 1fr;
        gap: 1rem; /* 16px */
        padding: 0.75em 2.5em 0.75em 0.75em; /* 12px 40px 12px 12px */
    }

    .news-index-item::after {
        right: 18px;
        width: 8px;
        height: 8px;
    }

    .news-index-date {
        font-size: 0.875rem; /* 14px */
    }

    .news-index-title {
        margin-top: 0.25rem; /* 4px */
        font-size: 1rem; /* 16px */
        -webkit-line-clamp: 3;
    }

    .news-pager {
        gap: 0.375rem; /* 6px */
        margin-top: 2.5rem; /* 40px */
    }

    .news-pager a,
    .news-pager span {
        min-width: 38px;
        height: 38px;
    }

    .news-article {
        margin-top: 2rem; /* 32px */
        padding: 2em 1.25em 2.5em; /* 32px 20px 40px */
    }

    .news-article-header {
        padding-bottom: 1em; /* 16px */
    }

    .news-article-title {
        padding-left: 0.6em; /* 12px */
        font-size: 1.25rem; /* 20px */
    }

    .news-article-photo,
    .news-article-content {
        margin-top: 1.5rem; /* 24px */
    }

    /* SP も寄せ方は PC と同じ（回り込みは PC・SP とも無し）。上下の間隔だけ広げる */
    .news-article-content .alignleft,
    .news-article-content .aligncenter,
    .news-article-content .alignright {
        margin-top: 1em;
        margin-bottom: 1em;
    }

    /* SP：前・次を上に左右で並べ、一覧へ戻るボタンはその下の中央に */
    .news-nav {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 0.75rem; /* 24px 12px */
        margin-top: 2rem; /* 32px */
    }

    .news-nav-back {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: center;
    }

    .news-nav-back .btn {
        width: 100%;
        max-width: 340px;
        min-width: 0;
    }

    .news-nav-prev a,
    .news-nav-next a {
        font-size: 0.875rem; /* 14px */
    }
}
