/* style.css: 共通スタイル */

/* 共通カラーとフォント設定 */
:root {
  --primary-color: #2a2f4a;
  --secondary-color: #f4f4f4;
  --accent-color: #b0d0ff;
  --text-color: #333;
}

* {
  box-sizing: border-box;
  font-family: "Helvetica Neue", "Helvetica", "Arial", "Yu Gothic", sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background-color: white;
  color: var(--text-color);
  line-height: 1.7;
}

/* コンテナ */
.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
}

main.container {
  margin-top: 0.5rem; /* ヘッダー直下の余白を少しに調整 */
}

main h2 {
  border-left: 4px solid var(--accent-color);
  padding-left: 0.5rem;
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* ヘッダー */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0; /* 高さをやや縮小 */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

header p {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

header h1 a {
  color: white;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

/* 言語切替 */
.language-switch {
  position: absolute;
  top: 8rem;
  right: 1rem;
}

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

/* ハンバーガーメニュー */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  background: white;
  height: 3px;
  margin: 4px 0;
  width: 25px;
  display: block;
}

/* Gallery */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.image-gallery img {
  width: 100%;
  max-width: 400px; /* ← 画像の最大サイズを調整 */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* ナビゲーション */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  margin-bottom: 0rem; /* 下の余白をゼロにする */
  transition: max-height 0.3s ease;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover,
nav a.active {
  border-bottom: 2px solid var(--accent-color);
}

.justified {
  text-align: justify;
  text-justify: inter-word; /* ← 単語間での調整 */
}

p {
  font-size: 1.1rem; /* 約17.6px：おすすめ */
}



/* レスポンシブ対応 */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    background-color: var(--primary-color);
    position: absolute;
    top: 60px;
    right: 1rem;
    width: 200px;
    padding: 1rem;
    border-radius: 8px;
    display: none;
  }

  nav ul.show {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}