@charset "utf-8";

.galleryBlock {
  margin: 80px auto 0;
}

.galleryBlock section {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: 15px;
}

.galleryItemBox {
    min-width: 0;
    width: 100%;
}

.gallery-list-img img+.noimg{
    display: none;
}

/* モーダル表示時にbodyに付与するスクロール防止クラス */
body.is-modal-open {
  overflow: hidden !important;
}

.is-modal-open .wrapper01, .is-modal-open .inner {
    position: static;
}

/* ページャーカラム調整 */
.galleryBlock>section .webgene-pagination:nth-last-child(1) {
    grid-area: auto/auto/auto/span 2;
    margin: 30px 0 0;
}

/* ==================================
   カテゴリ
================================== */

.galleryCateBox.firstBox {
    display: none;
}

.galleryCateBox.firstBox:first-child {
    display: block;
    width: 100%;
    max-width: 225px;
}

.galleryCateBox {
    display: block;
    width: 100%;
    max-width: 225px;
}

.galleryBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 225px;
    width: 100%;
    padding: 15px 10px;
    border: 1px solid #d8d6d2;
    color: #555;
    background-color: transparent;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: all .4s;
}

.galleryBtn p {
    margin: 0;
    font-size: inherit;
    color: inherit;
}

.galleryBtnBlockBox section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    flex-wrap: wrap;
    gap: 10px;
}

.galleryBtn.active,.galleryBtn:hover {
    color: #181716;
    background: rgba(129,124,117,.2);
}

.galleryBtn.active:before,.galleryBtn:before:hover {
    background-color: #9a7725;
}

/* ==================================
   モーダルスクロールバーのカスタマイズ
================================== */

/* 1. Chrome / Safari / Edge (WebKit系) */
.modal-container::-webkit-scrollbar {
  width: 8px; /* スクロールバーの幅（細めに設定） */
}

.modal-container::-webkit-scrollbar-track {
  background: #f1f1f1; /* バーの背景（レール部分） */
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
  background: #ccc; /* スクロールつまみの色 */
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: #4B433A; /* ホバー時のつまみの色 */
}

/* ----------------------------------
   サムネイル・カード全体
---------------------------------- */

.post-list {
    cursor: pointer;
}

.post-item {
    border: 1px solid #D2CFCA;
}

.gallery-list-img:hover img {
    transform: scale(1.1);
    transition: all .4s;
}

.gallery-list-img img {
    transition: all .4s;
}

.gallery-list-img {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
  	overflow: hidden;
}

.gallery-list-img img {
    object-fit: contain;
    object-position: center;
}

/* ----------------------------------
   モーダル背景（オーバーレイ）
---------------------------------- */

/* モーダルオーバーレイ（最前面に配置） */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    padding: 15px;
    background: rgba(239, 237, 232, 0.8);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ----------------------------------
   モーダル容器（カード本体）
---------------------------------- */
.modal-container {
    position: relative;
    width: 100%;
    max-width: 1120px;
    max-height: calc(100dvh - 30px);
    padding: 20px 15px;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 閉じるボタン */
.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    border: 1px solid #ccc;
    z-index: 9999;
}

/* カテゴリー・タイトル */
.modal-intro {
    margin-bottom: 12px;
}

.modal-cate {
    display: table;
    margin: 0 0 7px;
    padding: 0 6px 2px;
    background: #B49A72;
    color: #fff;
    font-family: "Zen Kaku Gothic New", sans-serif;
  	font-weight: 500;
    line-height: 1.45;
}

.modal-title {
    margin: 0;
    padding: 0;
    font-family: "Zen Kaku Gothic New", sans-serif;
  	font-weight: 500;
}

/* メイン画像2列 */
.gallery-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.gallery-row-img {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-row-img img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* 画像がある場合は代替画像を非表示 */
.gallery-row-img img + .noimg {
    display: none;
}

.gallery-row-img p {
    position: absolute;
    color: #181716;
    background: #e5e5e5;
    bottom: 0;
    right: 0;
    padding: 0 20px;
    line-height: 1.8;
    z-index: 5;
}

/* サブ画像6列 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
}

.gallery-grid-img {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-grid-img img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

/* ----------------------------------
   テキストエリア（タイトル・本文）
---------------------------------- */
.modal-body {
  padding: 0 !important;
}

.modal-text {
    margin: 0;
    /* font-size: 12px; */
    line-height: 1.8;
    /* color: #777; */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

@media screen and (min-width:375px) {

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 375px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

@media screen and (min-width:414px) {

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 414px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

@media screen and (min-width:544px) {

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

.galleryBtnBlockBox section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 30px;
}  
  
/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 544px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

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

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
  
.galleryBtnBlockBox section {
    gap: 10px;
}
  
.galleryCateBox.firstBox:first-child {
    display: block;
    width: 100%;
    max-width: 225px;
}

.galleryCateBox {
    display: block;
    width: 100%;
    max-width: 225px;
}

.galleryBlock section {
    grid-template-columns: repeat(3, 1fr);
}

.galleryBlock>section .webgene-pagination:nth-last-child(1) {
    grid-area: auto/auto/auto/span 3;
}

.galleryBtn {
    font-size: 18px;
}

.modal-overlay {
    padding: 20px;
}

.modal-container {
    max-height: calc(100dvh - 40px);
    padding: 18px 23px 25px;
}

.gallery-row {
    gap: 18px;
}

.gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 768px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

@media screen and (min-width:992px) {

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 992px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */

@media screen and (min-width:1024px) {

/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
  
.galleryBtnBlockBox section {
    gap: 10px 30px;
}

.galleryBlock section {
    grid-template-columns: repeat(4, 1fr);
}

.galleryBlock>section .webgene-pagination:nth-last-child(1) {
    grid-area: auto/auto/auto/span 4;
}
  
.modal-container {
    padding: 30px 40px;
}
  
/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */

} /* min-width: 1024px ここまで */

/* ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆ */