@charset "utf-8";
/* ==========================================
   フォトギャラリー
========================================== */
#photo-gallery h2 {
  font-size: 20px;
  border-left: 6px solid #AADEB6;
  padding-left: 10px;
  margin: 30px 0 16px;
}
#photo-gallery ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pg-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #e5e5e5;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.pg-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s, opacity .3s;
}
.pg-thumb:hover img {
  transform: scale(1.05);
  opacity: .9;
}
.pg-thumb:focus-visible {
  outline: 3px solid #3a8f4f;
  outline-offset: 2px;
}

/* ピックアップ（横スクロール） */
.pg-pickup-wrap {
  position: relative;
}
.pg-pickup-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.pg-pickup-list li {
  flex: 0 0 calc((100% - 36px) / 4);
  scroll-snap-align: start;
}
.pg-pickup-nav {
  position: absolute;
  top: calc(50% - 4px);
  transform: translateY(-50%);
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  font-size: 28px;
  line-height: 1;
  color: #333;
  cursor: pointer;
}
.pg-pickup-nav.prev { left: -14px; }
.pg-pickup-nav.next { right: -14px; }
.pg-pickup-nav:disabled { display: none; }

/* カテゴリボタン */
.pg-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pg-filter button {
  padding: 8px 18px;
  border: 1px solid #AADEB6;
  border-radius: 20px;
  background: #fff;
  color: #237600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s;
}
.pg-filter button:hover { background: #eef8f0; }
.pg-filter button[aria-pressed="true"] {
  background: #AADEB6;
  font-weight: bold;
}

/* 一覧 */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pg-empty {
  text-align: center;
  color: #888;
  padding: 40px 0;
}

/* 拡大表示（モーダル） */
body.pg-modal-open { overflow: hidden; }
.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .9);
}
.pg-modal[hidden] { display: none; }
.pg-figure {
  margin: 0;
  max-width: calc(100vw - 160px);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0 20px;
  box-sizing: border-box;
}
.pg-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}
.pg-figure figcaption {
  width: 100%;
  max-width: 800px;
  color: #fff;
  text-align: center;
}
.pg-modal-text {
  margin: 14px 0 4px;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 90px;
  overflow-y: auto;
}
.pg-modal-count {
  margin: 6px 0 0;
  font-size: 12px;
  color: #aaa;
}
.pg-close, .pg-arrow {
  position: absolute;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
}
.pg-close:hover, .pg-arrow:hover { opacity: 1; }
.pg-close {
  top: 10px;
  right: 16px;
  font-size: 44px;
  padding: 4px 10px;
}
.pg-arrow {
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  padding: 20px 16px;
}
.pg-arrow.prev { left: 10px; }
.pg-arrow.next { right: 10px; }

/* タブレット */
@media screen and (max-width: 1024px) {
  .pg-grid { grid-template-columns: repeat(3, 1fr); }
  .pg-pickup-list li { flex-basis: calc((100% - 24px) / 3); }
}

/* スマホ */
@media screen and (max-width: 768px) {
  #photo-gallery h2 { font-size: 17px; }
  .pg-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pg-pickup-list { gap: 8px; }
  .pg-pickup-list li { flex-basis: 42%; }
  .pg-pickup-nav { display: none; }
  .pg-filter button { padding: 6px 14px; font-size: 13px; }
  .pg-figure { max-width: 100vw; padding: 56px 10px 16px; }
  .pg-figure img { max-height: calc(100vh - 200px); }
  .pg-modal-text { font-size: 14px; text-align: left; }
  .pg-arrow {
    top: auto;
    bottom: 6px;
    transform: none;
    font-size: 44px;
    padding: 10px 20px;
  }
  .pg-modal-count { margin-bottom: 40px; }
}
