@charset "UTF-8";

/* =========================================
   写真ギャラリーページ (Pictures) 特有のスタイル
   ========================================= */

.page-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.intro-text {
  text-align: center;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 50px;
  letter-spacing: 0.05em;
  font-family: "Shippori Mincho", serif;
}

@media (max-width: 768px) {
  .intro-text {
    text-align: left;
    font-size: 4vw;
  }
}

/* --- 写真ギャラリー (Grid Layout) --- */
.photo-gallery {
  display: grid;
  /* PCでは3〜4列程度 */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3; /* 画像の高さを揃えて綺麗に並べる */
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  filter: brightness(1.1);
}

/* --- モーダル（拡大表示）のスタイル --- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 40px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85); /* 半透明の黒背景 */
  backdrop-filter: blur(8px); /* 背景をぼかす */
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 900px;
  max-height: 85vh; /* 縦長の画像が画面からはみ出さないように */
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation-name: zoom;
  animation-duration: 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: var(--ink);
  font-size: 45px;
  font-weight: normal;
  transition: 0.3s;
  font-family: sans-serif;
  line-height: 1;
}

.close:hover,
.close:focus {
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}

/* --- 戻るボタン --- */
.back-action {
  text-align: center;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  margin-bottom: 20px;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
  .photo-gallery {
    /* スマホでは2列程度に表示 */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }

  .close {
    right: 20px;
    top: 10px;
    font-size: 35px;
  }
}