/* ====================
   共通スタイル（ヘッダー・フッター含む）
==================== */
html {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background-color: #F5F7FA;
  overflow-x: hidden;
  color: #333;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

header {
  background-color: #003366;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100vw;
  box-sizing: border-box;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav {
  display: flex;
  align-items: center;
  position: relative;
}

nav a {
  color: white;
  margin: 0 0.5rem;
  text-decoration: none;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: auto; 
}

.menu-toggle span {
  background: white;
  height: 3px;
  margin: 5px 0;
  width: 25px;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.nav-links.active {
  display: flex;
}

.nav-links a {
  display: block;
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.language-selector {
  position: relative;
}

.language-toggle {
  cursor: pointer;
  font-size: 1.5rem;
}

.language-options {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #003366;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-width: 120px;
  max-width: 150px;
  z-index: 1000;
  white-space: nowrap;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.language-options a {
  display: block;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
}

.language-selector:hover .language-options,
.language-selector:focus-within .language-options {
  display: block;
}

footer {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  width: 100vw; /* ← これを追加 */
  box-sizing: border-box;
}

footer a {
  color: white !important;
  text-decoration: none !important;
}

/* ====================
   セクション構造
==================== */
section {
  width: 100%;
  padding: 4rem 1rem 0 1rem;
  text-align: center;
  box-sizing: border-box;
}

section h2 {
  color: #003366;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0279a0;
  display: inline-block;
  text-align: center;
  margin: 0 auto 1rem auto;
}

section p,
section li {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  text-align: left;
  font-weight: normal;
  width: 100%;
  box-sizing: border-box;
}
/* ====================
   リスト階層デザイン
==================== */

.outer-list {
  list-style: decimal;
  padding-left: 2rem;
  margin: 0 auto;
  width: 66%;
  max-width: 1000px;
  box-sizing: border-box;
}

.middle-list {
  list-style: none;
  counter-reset: sub-counter;
  padding-left: 2em;
}

.middle-list li::before {
  counter-increment: sub-counter;
  content: counter(sub-counter) ") ";
  margin-right: 0.5em;
  display: inline-block;
  font-weight: normal;
}

.inner-list {
  list-style-type: none;
  counter-reset: inner-counter;
  padding-left: 2em;
}

.inner-list li::before {
  counter-increment: inner-counter;
  content: "(" counter(inner-counter) ")";
  margin-right: 0.5em;
  font-weight: normal;
}

.outer-list,
.middle-list,
.inner-list {
  width: 100%;
  padding-left: 2rem;
  box-sizing: border-box;
}

/* ====================
   レスポンシブ対応
==================== */
@media (max-width: 768px) {
  header,
  footer {
    padding: 1rem 0.5rem;
  }

  .menu-toggle {
    display: flex !important;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #003366;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
  }

  .nav-links a {
    padding: 1rem;
    border-top: 1px solid #ffffff33;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .outer-list {
    width: 90%;
    max-width: none;
  }
}
