/* 共通スタイル */
body {
  margin: 0;
  font-family: "Yu Gothic", sans-serif;
  background-color: #fff;
  color: #333;
}

section h1 {
  font-weight: bold;
  font-size: 20px;
  margin: 0.5em 0;
  text-align: center; /* 中央表示したい場合 */
  color: #333;
}

section h2 {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4em 0.5em; /* 文字の上下・左右の余白 */
  color: #494949;        /* 文字色 */
  background: #f4f4f4;   /* 背景色 */
  border-left: solid 5px #b8d200; /* 左線（カテゴリ色などに連動可） */
  border-bottom: solid 3px #d7d7d7; /* 下線で区切り感 */
  font-weight: bold;
  font-size: 18px;
}

section p {
  line-height: 1.8;
  margin-bottom: 1.2em;
}

section ul {
  background-color: #e6f4d7; /* うすい黄緑 */
  padding: 1em;
  border-radius: 8px;
}
section li {
  padding: 0.5em 1em;
  border-radius: 6px;
  list-style-position: inside;
}

.hero-message {
  font-size: 18px;
  font-weight: bold;
  text-align: left;
  color: #555;
  margin: 0.5em 0;
}

.hero-image {
  display: block;
  margin: 1em auto;
  max-width: 300px;
  border-radius: 8px;
}


a {
  color: #333333;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
/* 最下部にフッターを固定するためのFlexレイアウト */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout {
  flex: 1;
  display: flex;
  flex-direction: row;
}

/* ヘッダー */
header {
  color: #4c6618;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.header-left {
  width: 40px; /* ハンバーガーとバランスを取るための空スペース */
}

.logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 10;
}

.logo img {
  height: 72px;
}

.logo a {
  display: inline-block;
}


.menu-toggle {
  font-size: 24px;
  background: none;
  border: none;
  color: #4c6618;
  display: inline-block;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}

/* サイドバー */
#sidebar {
  background-color: #f8f8f8;
  color: #333333;
  width: 200px;
  padding: 20px;
  box-sizing: border-box;
  height: 100vh;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

#sidebar.active {
  transform: translateX(0);
}

#sidebar a {
  color: #333;
}


#sidebar ul {
  list-style: none;
  padding: 0;
}

#sidebar li {
  margin-bottom: 10px;
}

#sidebar li:hover {
  color: #0078D4;
  transform: translateY(0) scale(1.02);
}

/* メインコンテンツ */
main {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* フッター */
footer {
  background-color: #f2f2f2;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: #555;
  padding-top: 40px;
}

.footer-nav a {
  color: #555;
  margin: 0 5px;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.tagline {
  font-style: italic;
  margin-top: 10px;
}

/* レイアウト（PC） */
@media (min-width: 769px) {
  .logo {
    margin: 0 auto;
    text-align: center;
  }
.logo img {
    height: 100px;
  }

  .menu-toggle {
    display: none;
  }

  .layout {
    display: flex;
    flex-direction: row;
    max-width: 1080px;
    margin: 0 auto;

  }

  #sidebar {
    width: 200px;
    flex-shrink: 0;
    display: block;
    transform: none;
    position: relative;
    height: auto;
    z-index: auto;
  }
  
  #sidebar li {
    opacity: 1;
    transform: none;

  main {
    flex: 1;
  }
}


/* レイアウト（スマホ） */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100vh;
    background-color: #f8f8f8;
    z-index: 1000;
    overflow-y: auto;
  }

  #sidebar.active {
    transform: translateX(0);
  }
  
section p {
    line-height: 1.9;
    font-size: 1em;
    margin-bottom: 1.4em;
  }

  section li {
    font-size: 1em;
    margin-bottom: 1em;
  }

  .menu-toggle {
    display: block;
  }

  main {
    width: 100%;
  }
}

