/* ==================================================
   事業結果
   ================================================== */


/* ------------------------------
   年度ナビゲーション
   ------------------------------ */

.business-result-page .result-year-section {
    width: 100%;
    margin: 0 0 26px;
    padding: 15px 16px;

    background: #f4f8fd;
    border: 1px solid #cad9ec;
    border-radius: 12px;

    box-sizing: border-box;
}

.business-result-page .result-year-label {
    margin: 0 0 10px;
    color: #333333;
    font-size: 15px;
    font-weight: 700;
}

.business-result-page .result-year-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
}


/* 年度ボタン
   白背景＋青い枠で統一 */
.business-result-page .result-year-nav a,
.business-result-page .result-year-nav .wp-block-button__link {
    display: inline-block;

    padding: 8px 16px;

    background: #ffffff !important;
    border: 2px solid #1f57ae !important;
    border-radius: 999px;

    color: #1f57ae !important;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    text-decoration: none !important;
    box-shadow: none;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}


/* マウスを乗せたとき */
.business-result-page .result-year-nav a:hover,
.business-result-page .result-year-nav a:focus,
.business-result-page .result-year-nav .wp-block-button__link:hover,
.business-result-page .result-year-nav .wp-block-button__link:focus {
    background: #e8f0fb !important;
    color: #154b98 !important;
}


/* 現在表示中の年度も白＋青枠
   少しだけ強調する */
.business-result-page .result-year-nav a.is-current-year,
.business-result-page .result-year-nav .is-current-year > a,
.business-result-page .result-year-nav .is-current-year .wp-block-button__link {
    background: #ffffff !important;
    color: #154b98 !important;
    border-color: #154b98 !important;
    box-shadow: inset 0 0 0 1px #154b98;
}


/* ------------------------------
   事業結果カード
   ------------------------------ */

.business-result-page .result-card {
    margin: 0 0 22px;
    padding: 0;

    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-left: 6px solid #1f57ae;
    border-radius: 10px;

    box-shadow: 0 3px 12px rgba(25, 55, 90, 0.08);
    overflow: hidden;
}


/* 事業名 */
.business-result-page .result-card > summary {
    position: relative;
    display: block;

    padding: 18px 58px 18px 20px;

    background: #ffffff;
    color: #154b98;

    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;

    cursor: pointer;
    list-style: none;
    box-sizing: border-box;
}

.business-result-page .result-card > summary::-webkit-details-marker {
    display: none;
}

.business-result-page .result-card > summary::after {
    content: "＋";

    position: absolute;
    top: 50%;
    right: 20px;

    color: #1f57ae;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;

    transform: translateY(-50%);
}

.business-result-page .result-card[open] > summary::after {
    content: "−";
}

.business-result-page .result-card[open] > summary {
    border-bottom: 1px solid #e4e9ef;
}


/* 開催日 */
.business-result-page .result-card-date {
    display: inline-block;

    margin: 18px 20px 4px;
    padding: 6px 13px;

    background: #e8f4f1;
    border-radius: 999px;

    color: #286b62;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}


/* 説明文 */
.business-result-page .result-card-text {
    margin: 15px 20px 20px;

    color: #333333;
    font-size: 16px;
    line-height: 1.9;
}


/* ------------------------------
   写真ギャラリー
   PC：2列
   写真は切り抜かない
   ------------------------------ */

.business-result-page .result-card-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;

    margin: 18px 20px 22px;

    align-items: start;
}


/*
 * 縦写真と横写真が混ざっても、
 * 同じ大きさの「写真スペース」に収める。
 * 写真そのものはトリミングしない。
 */
.business-result-page .result-card-gallery figure {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 4 / 3;

    margin: 0;
    padding: 0;

    background: #f5f6f7;
    border-radius: 9px;

    overflow: hidden;
}


/* 元写真を全部見せる */
.business-result-page .result-card-gallery img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center;

    border-radius: 7px;
}


/* ------------------------------
   スマホ
   ------------------------------ */

@media (max-width: 700px) {

    .business-result-page .result-year-section {
        margin-bottom: 18px;
        padding: 13px;
    }

    .business-result-page .result-year-nav {
        gap: 7px;
    }

    .business-result-page .result-year-nav a,
    .business-result-page .result-year-nav .wp-block-button__link {
        padding: 7px 12px;
        font-size: 13px;
    }


    .business-result-page .result-card {
        margin-bottom: 16px;
        border-left-width: 5px;
    }

    .business-result-page .result-card > summary {
        padding: 15px 48px 15px 14px;
        font-size: 18px;
    }

    .business-result-page .result-card > summary::after {
        right: 15px;
        font-size: 24px;
    }

    .business-result-page .result-card-date {
        margin: 15px 14px 2px;
        font-size: 13px;
    }

    .business-result-page .result-card-text {
        margin: 14px 14px 17px;
        font-size: 15px;
        line-height: 1.8;
    }


    /* スマホは写真1列 */
    .business-result-page .result-card-gallery {
        grid-template-columns: 1fr;
        gap: 12px;

        margin: 18px 14px 22px;
    }


    /*
     * スマホでは固定の写真スペースをやめて、
     * 元写真そのものの縦横比で表示
     */
    .business-result-page .result-card-gallery figure {
        display: block;

        aspect-ratio: auto;

        background: transparent;
        overflow: visible;
    }

    .business-result-page .result-card-gallery img {
        width: 100%;
        height: auto;

        max-width: 100%;
        max-height: none;

        margin: 0 auto;
    }
}

body {
    outline: 8px solid red !important;
}