/* お知らせの本文を自動で整えた見た目（inc/news-format.php）。お知らせの詳細ページだけで読む。
   お手本：/news/nyuen-setsumeikai-20261002/（明朝体の見出し・淡い地色・広めの余白） */
.nf {
    --nf-green: #6e8f5a;
    --nf-ink: #3b3a36;
    --nf-paper: #faf8f3;
    --nf-line: #e4dfd5;
    --nf-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
    max-width: 860px;
    margin: 0 auto;
    color: var(--nf-ink);
}

.detailBox .nf p,
.detailBox .nf li {
    line-height: 2;
}

/* 見出し（元は「太字＋下線」の段落） */
.detailBox .nf h3.nf-h {
    margin: 5rem 0 1.6rem;
    padding: 0 0 1rem;
    background: none;
    border-bottom: 1px solid var(--nf-line);
    color: var(--nf-ink);
    font-family: var(--nf-serif);
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: .08em;
}

.detailBox .nf h3.nf-h:first-child {
    margin-top: 0;
}

.detailBox .nf h3.nf-h::before {
    content: "";
    display: inline-block;
    width: .5em;
    height: .5em;
    margin: 0 .6em .15em 0;
    border-radius: 50%;
    background: var(--nf-green);
    vertical-align: middle;
}

/* 表（文字の入った表） */
.detailBox .nf table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    background: var(--nf-paper);
}

.detailBox .nf table td,
.detailBox .nf table th {
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--nf-line);
    vertical-align: top;
}

/* 写真のタイル */
.nf-photos {
    display: grid;
    gap: 1.2rem;
    margin: 3rem 0;
}

.nf-photos--1 {
    grid-template-columns: 1fr;
}

.nf-photos--2,
.nf-photos--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nf-photos--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nf-photo {
    margin: 0;
}

.nf-photos:not(.nf-photos--1) .nf-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.nf-photos--1 .nf-photo img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.nf-photo img {
    border-radius: 1rem;
}

.nf-photo figcaption {
    margin-top: .6rem;
    color: #717171;
    font-size: 1.3rem;
    line-height: 1.7;
}

.nf-zoom {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.nf-zoom img {
    transition: opacity .2s;
}

.nf-zoom:hover img,
.nf-zoom:focus-visible img {
    opacity: .85;
}

/* PDF のカード */
.detailBox .nf a.nf-pdf {
    display: flex;
    gap: 1.6rem;
    align-items: center;
    max-width: 560px;
    margin: 2rem 0;
    padding: 1.4rem;
    border: 1px solid var(--nf-line);
    border-radius: 1rem;
    background: #fff;
    color: var(--nf-ink);
    text-decoration: none;
    transition: box-shadow .2s;
}

.detailBox .nf a.nf-pdf:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.nf-pdf__thumb {
    flex: 0 0 9rem;
    width: 9rem;
    aspect-ratio: 210 / 297;
    object-fit: cover;
    object-position: top;
    border: 1px solid var(--nf-line);
}

.nf-pdf__body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.nf-pdf__title {
    font-weight: 600;
    line-height: 1.6;
}

.nf-pdf__more {
    color: var(--nf-green);
    font-size: 1.3rem;
}

.nf-pdf__more::after {
    content: " →";
}

/* 写真を大きく見る（モーダル） */
.nf-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    background: rgba(20, 20, 20, .88);
}

.nf-modal[hidden] {
    display: none;
}

.nf-modal img {
    max-width: 100%;
    max-height: 92vh;
    border-radius: .6rem;
}

.nf-modal__btn {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.nf-modal__close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.nf-modal__prev,
.nf-modal__next {
    top: 50%;
    width: 44px;
    height: 64px;
    margin-top: -32px;
    border-radius: 6px;
}

.nf-modal__prev {
    left: 12px;
}

.nf-modal__next {
    right: 12px;
}

@media only screen and (max-width: 768px) {
    .detailBox .nf h3.nf-h {
        font-size: 2.6rem;
    }

    .nf-photos--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nf-photo figcaption,
    .nf-pdf__more {
        font-size: 1.8rem;
    }

    .nf-pdf__thumb {
        flex-basis: 12rem;
        width: 12rem;
    }
}
