@charset "UTF-8";

/* 全体 - その他 */
html {
    scroll-behavior: smooth;
}

#upper .logo {
    pointer-events: none;
}

.ourai-nav-list {
    display: none !important;
}

#under .f_link {
    display: none !important;
}

#overallTop .top_wrapper.documents-wrapper {
    min-height: initial;
    padding-bottom: 50px;
}

.main-content.documents-main .bread_area {
    margin: 0;
}

.top_wrapper.documents-wrapper .bread_area .bread_wrap {
    padding: 0 0 61px 47px;
    margin-bottom: 0;
}

#overallTop .main-content.documents-main .section-title {
    margin-bottom: 58px;
}

/*◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
資料DL 一覧ページ
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆*/
.main-content.documents-main {
    max-width: 1440px;
    padding: 116px 32px 0;
    position: relative;
    display: block;
}

.main-content.documents-main::-webkit-scrollbar {
    display: none;
}

/* コンテナ（幅・余白） */
.documents-content {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible;
}

/* 一覧グリッド */
.documents-list {
    max-width: 1032px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 52px 42px;
}

/* カード */
.documents-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    aspect-ratio: 316 / 300;
    max-width: 316px;
    max-height: 300px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .25);
    padding: 24px 16px;
    box-sizing: border-box;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
    gap: 10px;
}

.documents-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
}

/* サムネイル */
.documents-card__thumb {
    width: 100%;
    aspect-ratio: 284/160;
    overflow: hidden;
}

.documents-card__thumbLink {
    display: block;
    width: 100%;
    height: 100%;
}

.top_wrapper .documents-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.documents-card__thumb.--placeholder {
    display: block;
    background: #d3d9e4;
    width: 100%;
    height: 100%;
}

/* タイトル */
.documents-card__title,
.documents-card__titleLink {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: #000080;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.documents-card__titleLink {
    color: inherit;
    text-decoration: none;
}

.documents-card__titleLink:hover {
    color: #0079BD;
}

/* メタ・本文 */
.documents-card__meta {
    margin-top: 6px;
    font-size: 1.2rem;
    color: #083461;
}

.documents-card__date {
    font-variant-numeric: tabular-nums;
}

.documents-card__excerpt {
    margin: 10px 0 0;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #083461;
}

/* ボタン（カテゴリ用バッジ含む） */
.documents-card__actions {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.documents-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px 5px;
    min-height: 26px;
    font-size: 11px;
    font-weight: 500;
    line-height: 14px;
    background: rgba(65, 105, 225, .2);
    color: #4169E1;
    border-radius: 25px;
    text-decoration: none;
    white-space: nowrap;
}

.documents-button:hover {
    filter: brightness(1.12);
}

.documents-button--primary {
    background: linear-gradient(90deg, #4169E1 0%, #CB00E3 100%);
    color: #fff;
}


/* レイアウト補助 */
.documents-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* アラート / 空表示 */
.documents-alert {
    padding: 12px 14px;
    border-radius: 6px;
    background: #fff1f1;
    color: #a40000;
}

.documents-alert--error {
    background: #fff1f1;
    color: #a40000;
}

.documents-empty {
    color: #555;
}

/* ローディング */
.documents-loader {
    text-align: center;
    padding: 28px 0 40px;
    font-size: 1.4rem;
    color: #555;
}

.documents-loader::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border: 2px solid #ccc;
    border-top-color: #4169E1;
    border-radius: 50%;
    animation: documents-spin .6s linear infinite;
    vertical-align: middle;
}

@keyframes documents-spin {
    to {
        transform: rotate(360deg);
    }
}

/*◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
資料DL シングル
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆*/
#upper:has(~ .single_wrapper)>.inner.gnav {
    max-width: 1440px;
    padding: 0 36px;
}

.single_wrapper .main-content.documents-main .post-single .bread_area {
    margin: 0 0 12px;
}

.single_wrapper .top_wrapper.documents-wrapper .bread_area .bread_wrap {
    padding: 0;
}

.single_wrapper .documents-main .post-mautic-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.single_wrapper .documents-main .post-single .post_header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px 32px;
}

.single_wrapper .documents-main .post-single {
    width: 100%;
}

.single_wrapper .documents-main .post-single #entry_style {
    max-width: 720px;
    width: 100%;
    padding: 40px 32px 56px 32px;
    margin-bottom: 0;
}

.single_wrapper .documents-main .post-single #entry_style.full-wide {
    max-width: 1374px;
    width: 100%;
}

.single_wrapper .documents-main .post_category {
    margin-right: 16px;
}

.single_wrapper .main-content.documents-main {
    overflow-y: initial;
    overscroll-behavior: initial;
    padding: 111px 32px 0;
}

/* Mauticフォーム箇所 */
/* 基本のラッパー */
.single_wrapper #mautic-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 24px 48px 24px;
    padding: 32px 75px;
    max-width: 614px;
    background: #FFFFFF;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    width: 100%;
    height: fit-content;
}

.single_wrapper #mautic-wrapper.fixed {
    position: fixed;
    width: 50%;
    top: 84px;
    right: calc(50% - 688px);
}

.single_wrapper #mautic-wrapper.fixed.bottom {
    position: absolute;
    top: initial;
    bottom: 0;
}

.single_wrapper #mautic-wrapper .mauticform-page-wrapper {
    width: 100%;
}

/* 内部フォーム */
.single_wrapper .mauticform-innerform {
    width: 100%;
    max-width: 464px;
}

.single_wrapper .mauticform_wrapper {
    margin: 0;
    max-width: 464px;
}

/* フォームラベル */
.single_wrapper .mauticform-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: clamp(12px, 1vw, 16px);
    line-height: 20px;
    color: #000080;
    display: flex;
    align-items: center;
    margin: 0;
    width: 34%;
}

/* ※マーク */
.single_wrapper .mauticform-label .mauticform-required {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 14px;
    color: #FF0000;
    margin-left: 5px;
}

/* 入力フィールド */
.single_wrapper .mauticform-input,
.single_wrapper .mauticform-selectbox,
.single_wrapper .mauticform-textarea {
    width: 66%;
    max-width: 312px;
    height: 35px;
    padding: 0.5em 0.5em;
    background: #EFEFEF;
    border: 1px solid #D4D4D4;
    border-radius: 2px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.4rem;
    color: #001464;
}

/* 必須フィールド */
.single_wrapper .mauticform-required {
    position: relative;
}

/* ラジオボタン */
.single_wrapper .mauticform-radiogrp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single_wrapper .mauticform-radiogrp-radio {
    width: 13px;
    height: 13px;
    background: #FFFFFF;
    border: 1px solid #333333;
}

/* ラジオボタンラベル */
.single_wrapper .mauticform-radiogrp-row .mauticform-radiogrp-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 17px;
    color: #333333;
    display: flex;
    align-items: center;
    font-size: 1.3rem;

}

/* ボタン */
#overallTop.single_wrapper .mauticform-button-wrapper .mauticform-button {
    display: inline-block;
    margin-top: 20px;
    padding: 7px 13px 8px 19px;
    background: linear-gradient(90deg, #4169E1 0%, #CB00E3 100%);
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    width: 200px;
    height: 40px;
    cursor: pointer;
    border: none;
    margin: 0 auto;
}

.single_wrapper .mauticform-button-wrapper .mauticform-button:disabled {
    background: #D4D4D4;
    cursor: not-allowed;
}

.single_wrapper .mauticform-row.mauticform-required .mauticform-label:after {
    color: #e32;
    content: " ※";
    display: inline;
    font-size: 10px;
    bottom: 2px;
    position: relative;
}

/* フレームのコンテナ */
.single_wrapper .mauticform-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
}

.single_wrapper .mauticform-row.mauticform-radiogrp.mauticform-field-6 {
    display: block;
}

.single_wrapper .mauticform-row.mauticform-radiogrp.mauticform-field-6>.mauticform-label {
    margin-bottom: 24px;
    width: 100%;
}

.single_wrapper .mauticform-row.mauticform-field-6 .mauticform-radiogrp-row {
    max-width: 312px;
    width: 66%;
    gap: 0;
    margin: 0 0 13px auto;
}

.single_wrapper .mauticform-row.mauticform-field-6 .mauticform-radiogrp-label {
    font-size: 1.2rem;
    white-space: nowrap;
}

.single_wrapper .mauticform-row.mauticform-field-7 {
    position: relative;
    gap: 0;
}

.single_wrapper .mauticform-row.mauticform-field-7 .mauticform-radiogrp-row {
    margin: 5px 24px 0 0;
    gap: 0;
}

.single_wrapper .mauticform-row.mauticform-field-7 .mauticform-input {
    position: absolute;
    right: 0;
    top: 0;
}

.single_wrapper [data-validation-type="textarea"] {
    display: block;
}

.single_wrapper [data-validation-type="textarea"]>label {
    margin-bottom: 12px;
}

.single_wrapper [data-validation-type="textarea"] textarea {
    width: 100% !important;
    max-width: 100%;
}

.single_wrapper .mauticform-radiogrp.mauticform-field-7 .mauticform-label {
    margin: 5px 0 0 0;
}

/* プライバシーポリシー */
#overallTop.single_wrapper .mauticform-freehtml>p {
    color: #000080;
}

.single_wrapper .mauticform-freehtml a {
    color: #CB00E3;
}

/* 入力フィールドのプレースホルダー */
.single_wrapper .mauticform-input::placeholder,
.single_wrapper .mauticform-selectbox::placeholder {
    color: #D4D4D4;
}

/* ダウンロードボタン */
.single_wrapper #mauticform_submit .mauticform-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    margin-top: 20px;
}

/* フォームの最後の説明 */
.single_wrapper .mauticform-freehtml {
    font-size: 1.2rem;
    color: #000080;
    text-align: center;
}

.single_wrapper .mauticform-freehtml.mauticform-field-9 {
    justify-content: center;
    margin-bottom: 26px;
}

.single_wrapper .mauticform-button-wrapper.mauticform-field-10 {
    margin-bottom: 24px;
}

.single_wrapper .mauticform-freehtml.mauticform-field-11 {
    margin-bottom: 0;
}

.single_wrapper .mauticform-freehtml.mauticform-field-11>.mauticform-freehtml {
    font-size: 1.1rem;
    line-height: 1.9;
}


#scroll-wrapper.scroll-on {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 1400px) {
    .single_wrapper #mautic-wrapper {
        padding: 2.1vw 4vw;
    }

    .single_wrapper #entry_style:has(~ #mautic-wrapper.fixed) {
        width: calc(50% - 16px);
    }

    .documents-main .post-single .post_entry {
        width: calc(50% - 20px);
        height: fit-content;
    }

    .single_wrapper #mautic-wrapper.fixed {
        position: fixed;
        width: calc(47% - 20px);
        right: max(32px, calc(50vw - 688px));
    }
}

@media screen and (min-width: 768px) and (max-width: 1260px) {

    .single_wrapper .mauticform-row.mauticform-field-6 .mauticform-radiogrp-label {
        font-size: clamp(7px, 0.9vw, 12px);
    }

    .single_wrapper .mauticform-row.mauticform-field-7 .mauticform-radiogrp-row {
        margin: 0 2.4vw 0 0;
    }

    .single_wrapper .mauticform-radiogrp-row .mauticform-radiogrp-label {
        font-size: clamp(8px, 0.9vw, 12px);
    }
}

@media screen and (max-width: 767px) {

    /*◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
資料DL 一覧ページ
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆*/

    .documents-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .top_wrapper.documents-wrapper {
        padding: calc(64px + 5vw) 5vw 6.25vw;
    }

    .documents-list {
        grid-template-columns: 1fr;
        gap: 7.5vw 0;
        left: initial;
    }

    .top_wrapper,
    .main-content.documents-main,
    .documents-content {
        min-height: 0;
    }

    .documents-card {
        aspect-ratio: 446 / 364;
        max-width: 100%;
        max-height: 100%;
        padding: 4.8vw;
        gap: 2vw;
    }

    .documents-card__title,
    .documents-card__titleLink {
        font-size: 16px;
        width: 85%;
    }

    .documents-card__actions {
        margin-bottom: 2vw;
    }

    #overallTop.documents #under .f_inner {
        margin-bottom: 3.75vw;
    }

    /* スクロール対象 */
    .main-content.documents-main {
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    /*◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
資料DL シングル
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆*/
    .single_wrapper .documents-main .post-mautic-wrapper {
        display: block;
    }

    .single_wrapper .documents-main .post-single .post_header {
        display: block;
        padding: 2.8vw 4vw 4.8vw;
        margin-bottom: 4.6vw;
    }

    .single_wrapper .main-content.documents-main .post-single .bread_area {
        margin-bottom: 2.6vw;
    }

    .single_wrapper .top_wrapper.documents-wrapper .bread_area .bread_wrap {
        padding: 0 0 0.8vw;
    }

    .single_wrapper .documents-main .post-single #entry_style {
        padding: 4.8vw 4vw 6.4vw;
        margin-bottom: 5vw;
    }

    .documents-button {
        font-size: 12px;
    }

    .documents-main #entry_style a.btn {
        display: flex;
        justify-content: center;
        align-items: center;
        background: linear-gradient(90deg, #4169E1 0%, #cb00e3 100%);
        color: #fff;
        text-decoration: none;
        border-radius: 50px;
        font-weight: 500;
        transition: 0.2s;
        position: relative;
        z-index: 1;
        font-size: 14px;
        width: 200px;
        height: 40px;
        gap: 10px;
        margin: 0 auto 3.75vw;

    }

    .documents-main #entry_style a.btn:hover {
        filter: brightness(1.2);
    }

    .single_wrapper .main-content.documents-main {
        overflow-y: initial;
        overscroll-behavior: initial;
    }

    .single_wrapper .post-single .bread_area .breadcrumb_element {
        font-size: 12px;
    }

    .single_wrapper .bread_area .bread_wrap {
        padding: 0 1.25vw 0.25vw 0;
        margin-bottom: 2vw;
    }

    .single_wrapper .documents-main .post_category {
        margin: 0 0 2.4vw 0;
    }

    .single_wrapper .documents-main .post-single .post_header h1 {
        font-size: 28px;
    }

    .single_wrapper #entry_style {
        width: 100%;
    }

    #overallTop .top_wrapper.documents-wrapper {
        padding: 23.3vw 5.3vw 12.25vw;
    }

    .top_wrapper.documents-wrapper .bread_area .bread_wrap {
        padding: 0 0 5.9vw 1.2vw;
    }

    #overallTop .main-content.documents-main .section-title {
        margin-bottom: 7vw;
        font-size: clamp(14px, 5vw, 24px);
    }

    #overallTop .top_wrapper.documents-wrapper h1 {
        text-align: left;
    }

    /* 基本のラッパー */
    .single_wrapper #mautic-wrapper {
        scroll-margin-top: 60px;
        max-width: 100%;
        width: 100%;
        padding: 3vw 4vw 4.8vw;
        height: auto;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.25);
        border-radius: 8px;
    }

    .single_wrapper .mauticform_wrapper {
        width: 100%;
        max-width: 100%;
    }

    #overallTop.single_wrapper .top_wrapper.documents-wrapper {
        padding: 0;
    }

    .single_wrapper .main-content.documents-main {
        padding: 21vw 6vw 6vw;
    }

    /* 内部フォーム */
    .single_wrapper .mauticform-innerform {
        width: 100%;
        padding: 0;
        max-width: 100%;
    }

    /* フレームごとのレイアウト */
    .single_wrapper .mauticform-row {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.6vw;
        align-items: flex-start;
        margin-bottom: 3.6vw;
    }

    /* 各フォームフィールド */
    .single_wrapper .mauticform-label {
        font-size: 1.6rem;
    }

    /* 入力フィールド */
    .single_wrapper .mauticform-input,
    .single_wrapper .mauticform-selectbox,
    .single_wrapper .mauticform-textarea {
        width: 100%;
        height: 5.1vw;
    }

    /* ラジオボタンのグループ */
    .single_wrapper .mauticform-radiogrp-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .single_wrapper .mauticform-row.mauticform-field-6 .mauticform-radiogrp-row {
        flex-direction: initial;
        margin: 0 0 3.4vw 0;
        width: 100%;
        max-width: 100%;
    }

    .single_wrapper .mauticform-row.mauticform-radiogrp.mauticform-field-6>.mauticform-label {
        margin-bottom: 3.5vw;
    }

    .single_wrapper .mauticform-radiogrp.mauticform-field-7 .mauticform-label {
        width: 43%;
    }

    .single_wrapper .mauticform-radiogrp-radio {
        width: 13px;
        height: 13px;
        background: #FFFFFF;
        border: 1px solid #333333;
    }

    /* ラジオボタンラベル */
    .single_wrapper .mauticform-radiogrp-label {
        font-size: 1.4rem;
        color: #333333;
        display: flex;
        align-items: center;
    }

    .single_wrapper .mauticform-row.mauticform-field-7,
    .single_wrapper .mauticform-row.mauticform-field-7 .mauticform-radiogrp-row {
        flex-direction: row;
    }

    /* ボタン */
    .single_wrapper .mauticform-button-wrapper .mauticform-button {
        width: 100%;
        padding: 7px 13px 8px 19px;
        background: linear-gradient(90deg, #4169E1 0%, #CB00E3 100%);
        border-radius: 50px;
        color: white;
        font-weight: 700;
        font-size: 1.4rem;
        text-align: center;
        height: 40px;
        cursor: pointer;
        border: none;
    }

    .single_wrapper .mauticform-button-wrapper .mauticform-button:disabled {
        background: #D4D4D4;
        cursor: not-allowed;
    }

    .single_wrapper [data-validation-type="textarea"] textarea {
        user-select: none;
    }

    /* プライバシーポリシー */
    .single_wrapper .mauticform-freehtml p {
        font-size: 1.4rem;
        text-align: center;
        color: #CB00E3;
    }

    /* フォームの最後の説明 */
    .single_wrapper .mauticform-freehtml {
        width: 100%;
    }

    /* フィールドサイズ調整 */
    .single_wrapper .mauticform-row .mauticform-input,
    .single_wrapper .mauticform-row .mauticform-textarea,
    .single_wrapper .mauticform-selectbox {
        font-size: 1.6rem;
        max-width: 100%;
    }

    .single_wrapper .mauticform-row.mauticform-field-7 .mauticform-input {
        position: inherit;
    }

    /* フィールドのラベル位置調整 */
    .single_wrapper .mauticform-label {
        font-size: 1.6rem;
        margin-bottom: 8px;
        width: 100%;
    }

    /* サブミットボタンのスタイル */
    .single_wrapper .mauticform-button-wrapper .mauticform-button {
        width: 100%;
        height: 50px;
        margin-top: 20px;
    }

    /* CTAボタン */
    .single_wrapper .mauticform-button-wrapper .mauticform-button {
        font-size: 1.6rem;
        text-align: center;
        padding: 14px;
    }

    /* フォームコンテナ */
    .single_wrapper #mauticform_submit .mauticform-button-wrapper {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }

    .single_wrapper .f_inner {
        margin-bottom: 3.2vw;
    }

}

@media screen and (max-width: 640px) {
    .ourai-hamburger {
        display: none !important;
    }

    .documents-main #entry_style a.btn {
        max-width: 220px;
        width: 62vw;
        height: 10vw;
        max-height: 40px;
    }

    .single_wrapper .mauticform-label {
        font-size: clamp(16px, 4vw, 18px);
    }

    .single_wrapper .mauticform-row .mauticform-input,
    .single_wrapper .mauticform-row .mauticform-textarea,
    .single_wrapper .mauticform-selectbox {
        font-size: 16px;
        height: 100%;
        min-height: 45px;
    }

    /* iOS対策: select は appearance を外して明示的に高さを指定 */
    .single_wrapper .mauticform-row .mauticform-selectbox select {
        -webkit-appearance: none;
        appearance: none;
        height: 45px;
        line-height: 45px;
    }

    .single_wrapper .mauticform-row.mauticform-field-6 .mauticform-radiogrp-label {
        font-size: 12px;
    }

    .single_wrapper .mauticform-radiogrp-row .mauticform-radiogrp-label {
        font-size: 12px;
    }

    .single_wrapper .mauticform-freehtml p {
        font-size: 12px;
    }

    .single_wrapper .mauticform-row.mauticform-field-8 {
        margin-bottom: 4.9vw;
    }

    .single_wrapper .mauticform-row .mauticform-textarea {
        resize: none;
        max-height: 14vw;
        height: 100%;
    }

    .single_wrapper .mauticform-freehtml .mautic_txt1 {
        font-size: 12px;
        line-height: 1.4;
    }

    #overallTop.single_wrapper .mauticform-button-wrapper .mauticform-button {
        width: 200px;
        font-size: 0.7rem;
        height: 40px;
        font-size: 14px;
    }

    .single_wrapper .mauticform-button-wrapper.mauticform-field-10 {
        margin-bottom: 4.8vw;
    }

    .single_wrapper .mauticform-freehtml.mauticform-field-11>.mauticform-freehtml {
        line-height: 1.7;
    }
}


/*◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
WordPress ギャラリー
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆*/
.wp-block-gallery {
    display: grid;
    gap: 16px; /* 画像間のスペース */
    margin: 1.5em 0;
    padding: 0;
}

/* デフォルトは3カラム */
.wp-block-gallery:not([class*="columns-"]),
.wp-block-gallery.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* カラム数に応じた設定 */
.wp-block-gallery.columns-1 { grid-template-columns: 1fr; }
.wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wp-block-gallery.columns-4 { grid-template-columns: repeat(4, 1fr); }
.wp-block-gallery.columns-5 { grid-template-columns: repeat(5, 1fr); }
.wp-block-gallery.columns-6 { grid-template-columns: repeat(6, 1fr); }

/* 各画像アイテムのコンテナ */
.wp-block-gallery .wp-block-image {
    margin: 0;
}

/* 画像自体 */
.wp-block-gallery .wp-block-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をトリミングしてコンテナにフィットさせる */
}

/* ギャラリー全体のキャプション */
.wp-block-gallery > figcaption {
    grid-column: 1 / -1; /* 全カラムにまたがるように設定 */
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-top: 8px;
}

/* 画像個別のキャプション */
.wp-block-gallery .wp-block-image figcaption {
    font-size: 13px;
    text-align: center;
    color: #333;
    padding: 8px;
}

/* --- レスポンシブ対応 --- */
@media screen and (max-width: 767px) {
    /* 3カラム以上のギャラリーは、SP表示では2カラムにする */
    .wp-block-gallery:not([class*="columns-"]),
    .wp-block-gallery.columns-3,
    .wp-block-gallery.columns-4,
    .wp-block-gallery.columns-5,
    .wp-block-gallery.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 1,2カラムはそのままの設定を維持 */
    .wp-block-gallery.columns-1 { grid-template-columns: 1fr; }
    .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
}