/* 基本リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* ハンバーガーメニュー */
nav {
  display: grid;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #333;
  color: white;
}

.hamburger {
  cursor: pointer;
  margin: 15px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: white;
  margin: 5px 0;
}

#menu {
  display: none;
  list-style: none;
}

#menu.active {
  display: flex;
  flex-direction: column;
}

#menu li {
  margin: 10px 0;
}

#menu a {
  color: white;
  text-decoration: none;
}

/* ヘッダー画像切り替え */
header {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.main-image {
  margin: 20px;
  padding: 10px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  width: 80%;
}

.main-image.active {
  opacity: 1;
}

.thumbnail-container {
  display: flex;
  justify-content: center;
  margin: 15px;
}

.thumbnail-container img {
  width: 80px;
  height: 80px;
  margin: 5px;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.thumbnail-container img:hover {
  transform: scale(1.1);
}

/* インク背景セクション */
.ink-section {
  height: 60vh;
  background: url("images/ink-background.jpg") no-repeat center center/cover;
  animation: ink-move 10s infinite linear;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes ink-move {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.ink-section h2 {
  color: white;
  font-size: 3rem;
}

/* カードデザイン */
.card-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 2rem;
}

.card {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
}

/* 背景配置テキスト */
.text-section {
  margin: 10px;
  position: relative;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  color: white;
}

.text-overlay {
  position: absolute;
  font-size: 10rem;
  color: rgba(255, 255, 255, 0.1);
  z-index: 1;
  transform: rotate(-15deg);
}

.content {
  position: relative;
  z-index: 2;
  font-size: 2rem;
}

.comic-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px;
}

.comic-block {
  color: white;
  position: relative;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 10px;
}

.comic-block img {
  width: 100%;
  border-radius: 5px;
}

.comic-block:nth-child(odd) {
  grid-template-columns: 2fr 1fr;
}

.comic-text {
  position: relative;
  z-index: 2;
}

.comic-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px;
}

.cards {
  text-align: center;
  padding: 15px;
  border: 1px solid #ddd; /* やわらかい境界線 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* カードに影を追加 */
}

.cards h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.card-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  /*display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
}

.card {
  text-decoration: none;
  color: #fff; /* 白い文字に変更 */
  background-size: cover; /* 背景画像をカード全体に表示 */
  background-position: center; /* 中央に画像を配置 */
  border-radius: 10px;
  padding: 20px;
  width: 250px;
  height: 300px; /* 高さを固定 */
  text-align: center;
  position: relative; /* オーバーレイのため */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 背景画像ごとに個別指定 */
.card1 {
  background-image: url("../images/path-to-image1.jpg");
}

.card2 {
  background-image: url("../images/path-to-image2.jpg");
}

.card3 {
  background-image: url("../images/path-to-image3.jpg");
}

/* テキストのオーバーレイ効果 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* 黒の透明レイヤー */
  z-index: 1;
}

.card h3,
.card p {
  position: relative;
  z-index: 2; /* オーバーレイの上に表示 */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.discription {
  margin: 10px;
  padding: 10px;
  text-align: center;
  color: inherit; /* 親要素のテキスト色を継承する */
  text-decoration: none; /* 下線を消す（必要に応じて） */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px;
}

.discription p {
  margin: 10px;
  padding: 10px;
}

.discription :hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 768px以下の画面幅用メディアクエリ */
@media screen and (max-width: 768px) {
  nav {
    padding: 0.5rem 1rem; /* ハンバーガーメニューのパディングを小さくする例 */
  }

  .hamburger {
    margin: 10px; /* ハンバーガーアイコンのマージンを調整する例 */
  }

  .hamburger div {
    width: 20px; /* ハンバーガーアイコンのバーの幅を小さくする例 */
  }

  .thumbnail-container {
    margin: 10px; /* サムネイルのマージンを調整する例 */
  }

  .thumbnail-container img {
    width: 60px; /* サムネイルの画像サイズを小さくする例 */
    height: 60px;
  }

  .ink-section h2 {
    font-size: 2rem; /* インク背景セクションの見出しのフォントサイズを小さくする例 */
  }

  .card-section {
    flex-direction: column; /* カードセクションのカードを縦並びにする例 */
    gap: 10px; /* カード間の間隔を狭くする例 */
  }

  .comic-layout {
    padding: 20px; /* コミックレイアウトのパディングを調整する例 */
  }

  .comic-block {
    padding: 10px; /* コミックブロックのパディングを調整する例 */
    gap: 5px; /* コミックブロックの要素間の間隔を狭くする例 */
  }
}
