.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1%;
}

.gallery>article {
    width: 24%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid #D9D9D9;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1%;
    cursor: pointer;
}

.gallery>article .image {
    width: 100%;
    height: 100px;
}

.gallery>article .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery>article .text {
    height: 70px;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #222222;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ギャラリー画像拡大モーダル */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.gallery-modal__inner {
    position: relative;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;

    padding: 50px 50px 60px;

    background: #FFFFFF;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.gallery-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-modal__close:hover {
    opacity: 0.8;
}

.gallery-modal__image {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.gallery-modal__image img {
    display: block;
    width: 100%;
    max-height: 272px;
    height: auto;
    object-fit: contain;
}

.gallery-modal__title {
    font-weight: 700;
    font-size: 24px;
    line-height: 130%;
    color: #285FBB;
    padding-bottom: 16px;
    border-bottom: 1px solid #285FBB;
    margin-bottom: 40px;
    width: 100%;
    text-align: left;

}

.gallery-modal__caption {
    font-size: 16px;
    line-height: 175%;
    color: #000000;
    text-align: left;

}



.modalBox{
    display: none;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
	left: 0;
	z-index: 100;
}
.modalBG{
    background: rgba(0,0,0,0.8);
    height: 100vh;
    position: absolute;
    width: 100%;
}
.modalAreaDesc{
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%,-50%);
	width: 100%;
	border-radius: 10px;
	padding: 0 40px;
	max-width: 1000px;
}
.modalAreaDescIn{
	max-width: 1000px;
	margin: 0 auto;
	background: #fff;
	border-radius: 10px;
	position: relative;
	padding: 60px;
}
.modalAreaDescIn .modalClose{
	position: absolute;
	top: 0;
	right: 8px;
	color: #000;
	font-size: 30px;
    cursor: pointer;
}

.gallery-modal__caption .panel-layout{
    padding: 0;
    margin: 0;
}

@media screen and (max-width: 767.5px) {
    .gallery>article {
        width: 49%;
    }
    .modalAreaDescIn{
        padding: 40px 20px 30px;
    }
    
    .modalAreaDesc{
        padding: 0 15px;
    }

    .gallery-modal__title{
        font-size: 22px;
        margin-bottom: 20px;
    }
    .gallery-modal__image {
        margin-bottom: 20px;
    }

    .gallery-modal__image img{
        max-height: 200px;
    }
}
