/* リセットスタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基本スタイル */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
}

/* ヘッダー */
header {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 20px;
}

header h1 {
  font-size: 2.5rem;
}

/* コンテナ */
.container {
  display: flex;
  flex-wrap: wrap; /* サイドバーとメインコンテンツが横並びで表示され、必要に応じて縦に折り返し */
  margin: 20px;
}

/* サイドバー */
.sidebar {
  width: 250px;
  background-color: #fff;
  padding: 20px;
  margin-right: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.sidebar ul {
  list-style-type: none;
}

.sidebar ul li {
  margin: 10px 0;
}

.sidebar a {
  text-decoration: none;
  color: #333;
}

.sidebar a:hover {
  text-decoration: underline;
}

/* メインコンテンツ */
.main-content {
  flex-grow: 1;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.main-content article h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.main-content article p {
  font-size: 1.2rem;
}

/* フッター */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 10px;
  margin-top: 20px;
}

/* 背景の半透明なオーバーレイ */
.popup {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.popup-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

.textarea{
  height: 200px;
  width: 300px;
}

.message{
  font-size: large;
}

.last{
  height: 300px;
  width: 400px;
}

.link-center {
  display: flex;               /* フレックスボックスを使用 */
  justify-content: center;     /* 中央に配置 */
  gap: 20px;                   /* リンク間の間隔 */
  margin-top: 20px;             /* 上部に余白 */
}

.link {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  text-decoration: none;
}

img{
  height: 300px;
  width: 400px;
}

/* レスポンシブ対応 */

/* スマートフォンやタブレットでの表示を調整 */
@media (max-width: 768px) {
  /* ヘッダー */
  header h1 {
    font-size: 2rem;
  }

  /* コンテナ */
  .container {
    flex-direction: column; /* サイドバーとメインコンテンツを縦に並べる */
    margin: 10px;
  }

  /* サイドバー */
  .sidebar {
    width: 100%; /* サイドバーを画面幅いっぱいに広げる */
    margin-right: 0;
    margin-bottom: 20px;
  }

  /* メインコンテンツ */
  .main-content {
    width: 100%; /* メインコンテンツも画面幅いっぱいに広げる */
  }

  /* ボタン */
  button {
    padding: 10px;
    font-size: 1rem;
  }

  /* テキストエリア */
  .textarea {
    width: 100%;
    height: auto;
  }

  /* 最後の画像 */
  .last {
    width: 100%; /* 画像を画面幅いっぱいに */
    height: auto;
  }
}

/* モバイル表示用調整 (更に小さな画面に対応) */
@media (max-width: 480px) {
  /* ヘッダー */
  header h1 {
    font-size: 1.8rem;
  }

  /* サイドバー */
  .sidebar {
    padding: 15px; /* サイドバー内の余白を調整 */
  }

  /* メインコンテンツ */
  .main-content {
    padding: 15px; /* メインコンテンツ内の余白を調整 */
  }

  /* テキスト */
  .sidebar h2 {
    font-size: 1.2rem; /* サイドバーのタイトルを小さく */
  }

  .main-content article h2 {
    font-size: 1.6rem; /* メインコンテンツのタイトルを小さく */
  }

  .main-content article p {
    font-size: 1rem; /* メインコンテンツの文章を小さく */
  }
}


