/* ------------------------------
   AestriBra Gallery Styles
   Author: GPT-5 Optimized Ver.
------------------------------ */

/* ====== 全体レイアウト ====== */
body {
  background-color: #0b0e26;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.gallery-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fcd34d; /* style.cssのaccentカラー */
  text-shadow:
    0 0 10px rgba(252, 211, 77, 0.5),
    0 0 20px rgba(252, 211, 77, 0.3),
    0 0 35px rgba(252, 211, 77, 0.2);
  margin-bottom: 12px;
  letter-spacing: 1px;
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-title:hover {
  text-shadow:
    0 0 10px rgba(255, 216, 107, 0.9),
    0 0 25px rgba(255, 216, 107, 0.6),
    0 0 50px rgba(255, 216, 107, 0.4);
  transform: scale(1.02);
}

.gallery-subtitle {
  color: #aaa;
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* ====== ギャラリー配置 ====== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  justify-content: center;
  align-items: start;
  width: 100%;
  margin: 0 auto;
}

/* ====== 各画像アイテム ====== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ====== モーダル拡大表示 ====== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
}

/* ✅ コメントテキスト（白で柔らかい光） */
#modal-comment {
  color: #ffffff;
  font-size: 1rem;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
  max-width: 80vw;
  line-height: 1.6;
  opacity: 0.9;
}

/* ====== 戻るボタン ====== */
.back-btn {
  display: inline-block;
  margin-top: 50px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
  color: #fcd34d;
  box-shadow: 0 0 20px rgba(252, 211, 77, 0.4);
  text-shadow: 0 0 8px rgba(252, 211, 77, 0.4);
  transform: translateY(-2px);
}

/* ====== レスポンシブ対応 ====== */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }

  .gallery-item {
    max-width: none;
  }

  .gallery-title {
    font-size: 1.6rem;
  }
}
