@charset "utf-8";
/* 共通 */
.main {
  line-height: 0;
}
.section-top__image h1 {
    font-size: 4rem;
}
@media (min-width: 700px) {
    .section-top__image h1 {
        font-size: clamp(5rem, 7.1vw, 8rem);
        display: block;
        margin: 0 auto;
        line-height: 1;
        margin-bottom: -20px;
    }
}
/* セクションタイトル装飾 */
.section-gallery h2 span::before,
.section-gallery h2 span::after {
  content: '';
  width: 70px;
  height: 2px;
  border-top: 1px solid #345654;
  border-bottom: 1px solid #345654;
}

.section-gallery {
  background-image: url("../images/common/base-border-milk.jpg");
  background-size: contain;
  background-repeat: repeat;
  padding: 0 20px 70px;
}
/* タグボタン */
.tag-button {
  text-align: center;
  margin: 0 auto;
  max-width: 600px;
}
.tag-button ul {
	display: flex;
	flex-wrap: wrap; /* ← これ重要！ */
	justify-content: flex-start; /* ← スマホでは左詰めにするのが安全 */
	justify-content: center;
	align-items: center;
	gap: 10px;
	padding: 0;
	margin-bottom: 15px;
}
.tag-button ul li {
  list-style: none;
  background-color: #345654;
	flex: 0 1 auto; /* 幅自動 */
}
.tag-button ul li a {
  display: inline-block;
  padding: 15px 10px;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  color: #F4F2E4;
  text-decoration: none;
}
/* スマホ表示で2列化 */
@media (max-width: 600px) {
  .tag-button ul {
    justify-content: space-between; /* 両端寄せ or left */
  }

  .tag-button ul li {
    flex: 0 1 calc(50% - 5px); /* gapが10pxなら、左右に5pxずつ */
    box-sizing: border-box;
  }
  .tag-button ul li a {
    display: block;
  }
}
.tag-button ul li a.active {
  background-color: #BCA98B;  /* 元の文字色 */
  color: #F4F2E4;             /* 元の背景色 */
}
/* ギャラリー画像リスト */
.section-gallery ul.gallery-list {
  margin: 0 auto;
  padding: 0;
  max-width: 500px;
}
.section-gallery ul.gallery-list li {
  list-style: none;
  margin-bottom: 15px;
}
.section-gallery ul.gallery-list li img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  margin: 0;
}
/* PC向けグリッド配置 */
@media (min-width: 700px) {
  .section-gallery ul.gallery-list {
    max-width: 1020px;
    display: grid;
    grid-template-columns: 0.48fr 1fr 1fr 1fr 0.48fr;
    grid-template-rows: repeat(5, auto);
    column-gap: 15px;
    row-gap: 15px;
    grid-auto-flow: dense;
    margin-bottom: 30px;
  }
  .section-gallery ul.gallery-list li {
    display: flex;
    width: 100%;
    padding: 0;
    font-size: 0;
	margin-bottom: 0;
  }
  .section-gallery ul.gallery-list li img {
    vertical-align: bottom;
  }

  /* グリッドのバリエーション */
  .gallery-list li.row-start-1 { grid-row-start: 1; }
  .gallery-list li.row-start-2 { grid-row-start: 2; }
  .gallery-list li.row-start-3 { grid-row-start: 3; }

  .gallery-list li.size-w2-h1 { grid-column: span 2; grid-row: span 1; }
  .gallery-list li.size-w2-h2 { grid-column: span 2; grid-row: span 2; }
  .gallery-list li.size-w2-h3 { grid-column: span 2; grid-row: span 3; }

  .gallery-list li.size-w3-h1 { grid-column: span 3; grid-row: span 1; }
  .gallery-list li.size-w3-h2 { grid-column: span 3; grid-row: span 2; }
  .gallery-list li.size-w3-h3 { grid-column: span 3; grid-row: span 3; }

  .gallery-list li.size-w5-h1 { grid-column: 1 / span 5; grid-row: span 1; }
  .gallery-list li.size-w5-h2 { grid-column: 1 / span 5; grid-row: span 2; }
  .gallery-list li.size-w5-h3 { grid-column: 1 / span 5; grid-row: span 3; }
}
/* Swiper モーダル全体 */
dialog[open] {
  display: block;
	display: flex;
  align-items: center;
  justify-content: center;
}

#modal.is-active {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 1000;
	background-color: rgba(244,242,228,0.7); /* ← 半透明のクリーム */
	justify-content: center;
	align-items: center;
	overflow: hidden;
}
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(244,242,228,0.7);/* ← 半透明のクリーム */
	z-index: 999; /* モーダル本体より1つ下に */
}
/* モーダルの中の画像部分 */
.modal-content {
	height: 100vh; /* または modal-content の高さを継承 */
   position: relative;
  z-index: 1001;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden; /* ← autoからhiddenに変更 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 90vh;
}
/* 閉じるボタン */
.modal-close {
	position: absolute;
	top: 0px;
	right: 0px;
	font-size: 4rem;
	background: transparent;
	border: none;
	color: #345654;
	cursor: pointer;
	z-index: 1002;
}
/* Swiperスライド内の画像 */
.swiper {
	width: 100%;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.swiper-wrapper {
	align-items: center!important;
}
/*.swiper-slide {} */
.swiper-box {
	justify-content: center;
	align-items: center;
	height: auto;
}
/* Swiperスライド内の画像（修正済） */
.swiper-slide img {
  margin: auto; /* 中央揃え */
  max-width: 100%;
  max-height: 75vh; /* 少し余裕を持たせて矢印や閉じるボタンのために */
  width: 80vw;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
/* ナビボタン */
.swiper-pagination {
	display: none;
}
/* スマホ用の追加 */
@media screen and (max-width: 1024px) {
  .modal-content,
  .modal-body,
  .swiper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
  }
  .swiper-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw !important;  /* ← 強制的にスライド幅を画面幅に */
    height: auto;
  }
  .swiper-slide img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
  }
dialog#modal .swiper-button-next,
  dialog#modal .swiper-button-prev {
    display: none;
  }
}
.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  color: transparent;
  pointer-events: auto;
}
/* 矢印アイコンのカスタム（疑似要素のみ） */
.swiper-button-prev::after,
.swiper-button-next::after {
  color: #345654 !important;
}