@charset "UTF-8";

/* index.html追加機能専用
   既存の背景色・表示幅・メニューバー・表のスタイルは style.css をそのまま使用する。 */

.disclosure-block,
.school-year-details {
    margin: 10px 0 18px 0;
}

.disclosure-block > summary,
.school-year-details > summary {
    cursor: pointer;
    padding: 9px 12px;
    border: 1px solid #b7bbc2;
    background-color: #dce1e9;
    color: #3f5170;
    font-weight: bold;
    list-style: none;
}

.disclosure-block > summary::-webkit-details-marker,
.school-year-details > summary::-webkit-details-marker {
    display: none;
}

.disclosure-block > summary::before,
.school-year-details > summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 0.6em;
}

.disclosure-block[open] > summary::before,
.school-year-details[open] > summary::before {
    content: "▼";
}

.news-archive > .info {
    margin-top: 8px;
}

.ich-blog {
    margin: 0 0 24px 0;
}

.ich-blog-intro {
    margin: 0 0 12px 0;
}

.ich-blog-empty,
.ich-blog-post {
    margin: 0 0 14px 0;
    padding: 14px;
    border: 1px solid #b7bbc2;
    background-color: #ffffff;
}

.ich-blog-post time {
    display: block;
    margin-bottom: 4px;
    color: #3f5170;
    font-weight: bold;
}

.ich-blog-post h4 {
    margin: 0 0 10px 0;
    padding: 0;
}

/*
 * TOPページでは記事の冒頭だけを表示する。
 * 折りたたまれた状態でも、この領域内をスクロールして全文を確認できる。
 */
.ich-blog-post-body {
    max-height: 500px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 10px 2px 0;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.ich-blog-post.is-expanded .ich-blog-post-body {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.ich-blog-post-body:focus-visible {
    outline: 2px solid #3f5170;
    outline-offset: 2px;
}

.ich-blog-post p,
.school-year-empty {
    margin: 0;
}

.ich-blog-post-body > p + .ich-blog-gallery,
.ich-blog-gallery + .ich-blog-gallery {
    margin-top: 14px;
}

/* 画像2枚を横並びにする。画面幅に合わせて各画像は自動縮小する。 */
.ich-blog-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-bottom: 14px;
}

.ich-blog-photo {
    min-width: 0;
    margin: 0;
}

.ich-blog-post img,
.ich-blog-photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}

.ich-blog-photo figcaption {
    margin-top: 6px;
    line-height: 1.5;
    font-size: 0.92em;
}

.ich-blog-toggle {
    display: block;
    min-width: 9em;
    margin: 12px auto 0;
    padding: 9px 18px;
    border: 1px solid #3f5170;
    border-radius: 4px;
    background-color: #3f5170;
    color: #ffffff;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.ich-blog-toggle:hover,
.ich-blog-toggle:focus-visible {
    background-color: #ffffff;
    color: #3f5170;
}

.ich-blog-toggle[hidden] {
    display: none;
}

.school-year-current,
.school-evaluation-independent {
    margin: 0 0 22px 0;
}

.school-year-content {
    padding: 10px 8px 16px 8px;
    border-right: 1px solid #b7bbc2;
    border-bottom: 1px solid #b7bbc2;
    border-left: 1px solid #b7bbc2;
}

.school-year-content > h3:first-child {
    margin-top: 0;
}

@media screen and (max-width: 767px) {
    .disclosure-block > summary,
    .school-year-details > summary {
        padding: 9px 8px;
    }

    .school-year-content {
        padding: 8px 4px 12px 4px;
    }

    .ich-blog-post {
        padding: 10px;
    }

    .ich-blog-post-body {
        max-height: 340px;
        padding-right: 6px;
    }

    /* スマホでも2枚横並び。各画像は列幅に合わせて自動的に小さくなる。 */
    .ich-blog-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 10px;
    }

    .ich-blog-photo figcaption {
        margin-top: 4px;
        font-size: 0.82em;
    }

    .ich-blog-toggle {
        width: 100%;
        min-height: 44px;
    }
}


/* 文化祭ポスター用：縦長画像を上下で切らず、全体を表示する。 */
.slider img.keyvisual-poster {
    object-fit: contain;
    object-position: center center;
    background-color: #d9b77f;
}

/* PTAグッズキービジュアル：完成済み800×450画像を一切切らずに表示し、余る左右だけをぼかし背景で補う。 */
.slider .keyvisual-portrait-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #f4eee5;
    isolation: isolate;
}

/* 左右の余白を、同じ画像を拡大・ぼかした背景で埋める。 */
.slider .keyvisual-portrait-slide::before {
    content: "";
    position: absolute;
    inset: -28px;
    z-index: 0;
    background-image: var(--kv-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    filter: blur(24px);
    transform: scale(1.10);
    opacity: 0.88;
}

/* 中央の800×450画像は、上下左右を切らずに必ず全体表示する。 */
.slider .keyvisual-portrait-slide img.keyvisual-portrait-main {
    position: relative;
    z-index: 1;
    display: block;
    width: auto !important;
    max-width: 100%;
    height: 100% !important;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain !important;
    object-position: center center;
    background: transparent;
}

@media screen and (max-width: 768px) {
    .slider .keyvisual-portrait-slide {
        height: 260px;
    }

    .slider .keyvisual-portrait-slide img.keyvisual-portrait-main {
        width: auto !important;
        max-width: 100%;
        height: 100% !important;
        object-fit: contain !important;
    }
}

