/* 全体のスタイル */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fafafa;
  color: #333;
}

header {
  background-color: #f8e1c4;
  color: #5a3d2b;
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid #e3e3e3;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  padding: 10px 0 0 0;
  margin: 0;
}

nav ul a {
  text-decoration: none;
  color: #5a3d2b;
  font-weight: 600;
  position: relative;
}

nav ul a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #d1a574;
  transition: width 0.3s;
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}

nav ul a:hover::after {
  width: 100%;
}

h2 {
  text-align: center;
  margin: 30px 0 20px 0;
  font-size: 2rem;
  color: #5a3d2b;
}

/* ギャラリーコンテナ */
.gallery-containers {
  margin: 10px;
  padding: 5px;
}

.gallery-container {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(500px, 1fr)
  ); /* 画像の表示エリア */
  gap: 20px;
}

.gallery-item {
  background: linear-gradient(to bottom, #fff, #f9f9f9);
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.gallery-content {
  padding: 20px;
  text-align: center;
  background-color: #f8e1c4;
}

.gallery-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.8rem;
  color: #5a3d2b;
}

.gallery-content p {
  font-size: 1rem;
  color: #666;
  margin: 10px;
}

.images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 10px;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s, opacity 0.5s;
}

.image-wrapper:hover img {
  transform: scale(1.1);
  filter: brightness(0.8);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(88, 61, 43, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.image-wrapper:hover .overlay {
  opacity: 1;
}

.overlay span {
  font-size: 1.2rem;
  font-weight: bold;
}

/* フッター */
footer {
  background-color: #f8e1c4;
  color: #5a3d2b;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #e3e3e3;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* モーダル関連スタイル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.discription {
  margin: 10px 50px;
  padding: 10px;
  color: inherit; /* 親要素のテキスト色を継承する */
  text-decoration: none; /* 下線を消す（必要に応じて） */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
}

.discription :hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 15px;
  }

  h2 {
    font-size: 1.8rem;
  }

  .gallery-container {
    gap: 30px;
    display: block;
  }

  .gallery-content h3 {
    font-size: 1.5rem;
  }

  .overlay span {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 10px;
  }

  h2 {
    font-size: 1.5rem;
  }

  .gallery-content h3 {
    font-size: 1.2rem;
  }

  .images {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
  }

  .overlay span {
    font-size: 0.9rem;
  }
}
