/* 全体のスタイル */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: #f9f9f9;
  scroll-behavior: smooth;
}

/* メインコンテンツラッパー */
.wrapper {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  padding-left: 3cm;
}

.content-wrapper {
  flex: 1; /* コンテンツ部分がサイドバーの隣に表示されるようにする */
  margin-right: 20px; /* サイドバーとの余白 */
}

.latest-update {
  padding: 10px;
  max-width: 1000px;
}

.latest-update h3 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

.latest-update p {
  font-size: 1.2em;
}

/* 四角い箱のスタイル */
.update-box {
  display: flex;
  align-items: center; /* アイテムを縦方向で中央揃え */
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  padding: 15px;
  margin-top: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer; /* 四角い箱全体をクリック可能にする */
  max-width: 1000px;
}

/* 左側の写真 */
.update-photo img {
  width: 90px; /* 写真の幅 */
  height: 90px; /* 写真の高さ */
  object-fit: cover;
  border-radius: 5px;
  margin-right: 14px;
  align-items: center; /* アイテムを縦方向で中央揃え */
}

/* 右側の説明 */
.update-info {
  flex: 1; /* 説明部分が残りのスペースを占める */
  display: flex;
  align-items: center; /* 縦方向の中央揃え */
  justify-content: flex-start; /* 横方向の左揃え */
  text-align: left; /* テキストを左揃え */
}

.update-info p {
  font-size: 1em;
  margin: 0;
}

.update-link {
  font-size: 1.8em; /* リンクマークのサイズ */
}

/* リンク部分のスタイル */
.update-link a {
  text-decoration: none;
  color: #333;
  margin-left: 14px;
  display: flex;
  align-items: center;
}

/* 四角い箱全体をクリック可能にする */
.update-box a {
  display: flex;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.content-section {
  margin-bottom: 40px;
}

h2 {
  color: #333;
}

#recommended-explanation {
  margin: 0 auto;
  padding: 1rem;
  flex-grow: 1; /* フレックスボックスでの成長を設定 */
}

/* 基本デザイン（おすすめトピックとイベント情報で共通） */
.info-block {
  width: 20cm;
  padding: 20px;
  border-radius: 15px;
  margin-top: 20px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
  display: inline-block;
  position: relative;
  transform: perspective(1000px) rotateX(5deg);
  animation: pop-in 0.5s ease-in-out;
}

/* おすすめトピック用の背景 */
#recommended-topics {
  background: linear-gradient(
    135deg,
    #ffeb3b,
    #ff5722
  ); /* 黄色からオレンジのグラデーション */
}

/* 初心者必見用の背景 */
#events {
  background: linear-gradient(
    135deg,
    #a6d5a7,
    #82c930
  ); /* 緑系のグラデーション */
}

/* 豆知識用の背景 */
#tisikis {
  background: linear-gradient(
    135deg,
    #758bd4,
    #0d29a8
  ); /* 緑系のグラデーション */
}

#masters {
  background: linear-gradient(
    135deg,
    #d98181,
    #ce4517
  ); /* 赤系のグラデーション */
}

.separator-line {
  border: none;
  border-top: 2px solid #ddd;
  margin: 20px auto;
  width: 90%;
  position: relative;
}

/* トピックやイベントのアイテムデザイン */
.special-item {
  background-size: cover;
  background-position: center;
  color: transparent; /* 文字を透明にして画像が見えるようにする */
  text-align: center;
  padding: 10px;
  position: relative;
  height: 100px; /* 高さを調整 */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.special-item a {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px;
  border-radius: 5px;
}

.special-item a:hover {
  background: rgba(0, 0, 0, 0.8);
}

@keyframes pop-in {
  0% {
    transform: scale(0.8) rotateX(10deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotateX(5deg);
    opacity: 1;
  }
}

.info-block h2 {
  margin-bottom: 15px;
  color: #ffffff;
  font-size: 1.5em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.info-block ul {
  list-style-type: none;
  padding: 0;
}

.info-block li {
  background-color: #ffffff;
  border-radius: 5px;
  margin-bottom: 10px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
}

.info-block li:hover {
  transform: translateY(-5px);
  background-color: #ffe0b2;
}

.site-summary {
  margin-bottom: 2cm;
}

@media (max-width: 1210px) {
  body {
    line-height: 1.4;
  }

  .wrapper {
    flex-direction: column; /* レイアウトを縦方向に */
    padding-right: 3cm;
    padding-left: 2cm;
  }

  .content-wrapper {
    margin-right: 0px; /* サイドバーとの余白 */
    margin: 7px;
  }

  .content-wrapper {
    margin-right: 0;
  }

  .info-block {
    width: 100%; /* スマホ画面で幅を100%にする */
    padding: 10px; /* 内側の余白を小さくする */
    margin: 10px 0; /* 上下に少し余白を追加 */
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1em;
  }
  .wrapper {
    padding-left: 1.5cm;
    margin-right: 0.5cm;
  }
  .kontentu {
    margin-right: 0.9cm;
  }

  /* 四角い箱のスタイル */
  .update-box {
    padding: 10px;
  }
  .update-info p {
    font-size: 12px;
  }
  .update-link span {
    font-size: 15px;
  }
}

@media (max-width: 650px) {
  .wrapper {
    padding: 0;
    margin-left: 0.5cm;
  }
  main {
    padding: 0;
    margin: 0px;
    margin-bottom: 20px;
  }
}
