/* ===== 基本設定 ===== */
body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #333;
  font-size: 16px; /* 初期サイズ */
  transition: font-size 0.3s ease;
}

/* ===== ヘッダー ===== */
header {
  text-align: center;
  padding: 10px;
}
.logo {
  max-width: 100px;
}
.tagline {
  font-size: 0.9em;
  color: #666;
}


/* ===== ロゴ画像 ===== */
.logo {
  width: 100%;
  max-width: 400px;   /* PCでは最大400pxで表示 */
  height: auto;
  display: block;
  margin: 0 auto;
  transition: max-width 0.3s ease;
}

/* 画像がないときの代替テキスト */
.logo-text {
  font-size: 2.4em;
  font-weight: bold;
  color: #e91e63;
  text-align: center;
  display: inline-block;
}

/* h1を中央揃え */
header h1 {
  text-align: center;
  margin: 10px 0;
}

header h1 a {
  text-decoration: none;
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .logo {
    max-width: 250px;  /* スマホでは250pxまで縮小 */
  }
}


/* ===== ナビゲーション（固定表示） ===== */
.navbar {
  background-color: #e91e63;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.navbar li {
  margin: 0;
}
.navbar a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
}
.navbar a:hover {
  background: #c2185b;
}

/* ▼ ナビゲーションのアクティブページ */
.nav-list a.active {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 4px;
  text-decoration: underline;
  color: #fff;
  display: inline-block;
  line-height: 1.5;   /* ✅ これで縦位置が自然に中央揃え */
}

/* ===== フォントサイズ変更ボタン ===== */
.font-buttons {
  margin-left: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.font-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;          /* ナビゲーションの背景色に合わせて白字 */
  margin-right: 5px;
}

.font-buttons button {
  margin: 0 2px;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #e91e63;
  font-weight: bold;
  cursor: pointer;
}
.font-buttons button:hover {
  background: #f8bbd0;
}
/* ===== メインレイアウト ===== */
.container {
  display: flex;
  flex-wrap: wrap;
  margin: 20px;
  gap: 20px;
}

/* ===== メインビジュアル ===== */
.main-visual {
  text-align: center;
  margin: 20px auto;
}
.main-image {
  width: 100%;
  max-width: 1000px;   /* PCでは最大1000pxまで拡大可 */
  height: auto;
  display: block;
  margin: 0 auto;
}


/* ===== メインレイアウト ===== */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ✅ 全体を中央寄せ */
  margin: 20px auto;
  gap: 20px;
}

/* ===== main-content（中央寄せ） ===== */
.main-content {
  flex: 3;
  min-width: 250px;
  max-width: 800px;
  margin: 0 auto;
}

/* ===== sidebar（中央寄せ） ===== */
.sidebar {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  background: #f5f5f5;
  padding: 10px;
  margin: 0 auto;
}

/* ===== サイドバナー：私の戦争体験 ===== */
.sidebar-banner {
  text-align: center;
  margin: 20px 0;
}

.sidebar-banner .war-banner {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* 画像が表示されない時の代替テキスト */
.sidebar-banner .alt-text {
  display: inline-block;
  font-size: 14px;
  color: #333;
  padding: 10px;
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 4px;
}


/* ===== 新着情報リスト ===== */
.news-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px 0;
}

.news-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 5px 0;
  border-bottom: 1px dotted #ccc;
}

/* 📌 アイコン */
.news-icon {
  color: #e91e63;
  font-size: 1.2em;
  line-height: 1.2;
}

/* 日付 */
.news-date {
  font-size: 0.9em;
  color: #666;
  min-width: 110px;   /* 年月日表示用に幅調整 */
  text-align: left;
}

/* 本文 */
.news-text {
  font-size: 1em;
  color: #333;
}

/* ===== トピックス ===== */
.topics {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.topic-img {
  width: 100px;
  height: auto;
}
.topic-text h3 {
  margin: 0;
}

/* ===== sidebar（中央寄せ＆白ベース） ===== */
.sidebar {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  background: #ffffff;  /* ✅ 白ベースに変更 */
  padding: 10px;
  margin: 0 auto;
  border: 1px solid #ddd;  /* ✅ 薄い枠線を追加して区切りを分かりやすく */
  border-radius: 6px;      /* ✅ 少し角を丸める */
}
.sidebar h2 {
  font-size: 1.2em;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar li {
  margin: 8px 0;
}
.sidebar a {
  color: #e91e63;
  text-decoration: none;
}

/* ▼ ページトップボタン */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-color: #e91e63; /* ✅ ナビゲーションと同じピンク色 */
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none; /* デフォルト非表示 */
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top:hover {
  opacity: 0.8;          /* ホバー時は少し透明感を出す */
  transform: scale(1.1); /* ホバー時にちょっと大きく */
}

/* ===== フッター ===== */
footer {
  text-align: center;
  background: #eee;
  padding: 10px;
  font-size: 0.9em;
  margin-top: 20px;
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .topics {
    flex-direction: column;
  }
  .font-buttons {
    width: 100%;
    text-align: center;
    margin-top: 5px;
  }
}
/* 会について  専用 */
.about-content {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 15px;
  text-align: left;
}
.about-content h2,
.about-content h3 {
  font-size: 1.8em;
  margin-bottom: 1em;
  border-bottom: 2px solid #e91e63;
  padding-bottom: 0.3em;
  color: #e91e63;
}
.about-content p {
  line-height: 1.6;
  margin-bottom: 1em;
}
.about-content ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1em;
}
.logo-info {
  display: flex;
  align-items: flex-start;  /* ← 上揃え */
  gap: 15px;
  margin-bottom: 20px;
}
/* 画像 */
.about-logo {
  max-width: 150px;
  height: auto;
  flex-shrink: 0;
}
/* 説明文 */
.logo-info p {
  flex: 1;
  margin: 0;
  font-size: 1em;        /* ✅ 他の<p>と同じ文字サイズ */
  font-weight: normal;    /* ✅ 太字を解除 */
  color: #333;            /* ✅ 本文カラー（共通テキストカラー） */
  text-align: left;       /* ✅ 左寄せに固定 */
  line-height: 1.6;
}
/* --- スマホでは縦並び --- */
@media screen and (max-width: 600px) {
  .logo-info {
    flex-direction: column;
    align-items: center;   /* 画像だけ中央寄せ */
    text-align: center;
  }
  .logo-info p {
    text-align: left;     /* ✅ スマホでも文章は左寄せのまま */
    margin-top: 1em;
  }
  .about-logo {
    max-width: 70%;
    margin-bottom: 10px;
  }
}

/* 会則ページ */
.yakusoku-content {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 15px;
  text-align: left;
}
.yakusoku-content h2 {
  font-size: 1.8em;
  margin-bottom: 1em;
  border-bottom: 2px solid #e91e63;
  padding-bottom: 0.3em;
  color: #e91e63;
}
.yakusoku-content h3 {
  font-size: 1.4em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #e91e63;
}

/* 会則内の番号リスト（1）〜6））はリストマークなし */
.yakusoku-content ul.no-bullet {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.yakusoku-content ul.no-bullet li {
  margin-bottom: 0.5em;
}
.yakusoku-list {
  font-size: 1em;
  line-height: 1.8em;
  margin-left: 1.2em;
}
.yakusoku-list li {
  list-style: none;
  margin-bottom: 1em;
}
.yakusoku-sublist {
  list-style: none;
  margin: 0.5em 0 0.5em 1.5em;
  padding: 0;
}
.yakusoku-sublist li {
  margin-bottom: 0.5em;
}

@media print {
  /* 印刷時に非表示にしたい共通要素 */
  header,
  nav,
  footer,
  #back-to-top,
  .back-link,
  .back-link *,
  .back-icon {
    display: none !important;
  }

  /* 本文はA4横幅に最適化 */
  main, .container, .war_experience-content, .yakusoku-content, .picturediary-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
  }

  /* フォントサイズと行間の調整（読みやすさ重視） */
  body {
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
  }


  /* 見出しの色を印刷向けに黒へ変更（インク節約＆可読性） */
  .yakusoku-content h2,
  .yakusoku-content h3 {
    color: #000;
    border-color: #000;
  }

  /* リンク後の URL を印刷しない */
  a[href]:after {
    content: none !important;
  }
}

/* ===== 私の戦争体験　専用 ===== */

#war_content {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 15px;
  text-align: left;
}
#war_content  h2,
#war_content  h3 {
  color: #e91e63;
  margin-top: 1.5em;
}
#war_content p {
  line-height: 1.6;
  margin-bottom: 1em;
}
#war_content ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1em;
}

/* === 戦争体験リスト === */

.war-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.war-list li {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.war-no {
  font-weight: bold;
  margin-right: 10px;
  min-width: 50px;
  color: #e91e63;
}

.war-title a {
  color: #333;
  text-decoration: underline;
  font-weight: bold;
}

.war-title a:hover {
  color: #e91e63;
}

.war-author {
  margin-left: auto;
  color: #666;
  font-size: 0.95em;
}

@media screen and (max-width: 600px) {
  .war-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .war-author {
    margin-left: 0;
  }
}

/* ===== レスポンシブ対応 ===== */
@media screen and (max-width: 600px) {
  .war-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .war-author {
    margin-left: 0;
  }
}

/* ===== 私の戦争体験 戦争体験記事 ===== */

#war_content h2 {
  color: #e91e63;
  font-size: 1.8em;
  margin-top: 2em;
  margin-bottom: 1em;
  border-bottom: 2px solid #e91e63;
  padding-bottom: 0.3em;
}

#war_content h3 {
  color: #e91e63;
  font-size: 1.5em;
  margin-top: 1.5em;
}

#war_content h4 {
  font-size: 1.2em;
  color: #e91e63;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

#war_article-content .author-name {
  font-size: 1em;
  color: #555;
  margin-bottom: 1.5em;
}

.article-body h3 {
  font-size: 1.2em;
  color: #e91e63;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* 前編・後編ナビをボタン風に */
.article-nav {
  margin: 1.5em 0;
  text-align: center;
}

.article-nav .nav-btn {
  display: inline-block;
  background-color: #e91e63;
  color: #fff;
  padding: 0.4em 1em;
  margin: 0 0.5em;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.95em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.article-nav .nav-btn:hover {
  background-color: #c2185b;
  transform: scale(1.05);
}

/* 印刷時は非表示 */
@media print {
  .article-nav {
    display: none !important;
  }
}

/* ===== 戻るボタン ===== */
.back-link {
  margin-top: 40px;
  text-align: left;
}

.back-link a {
  font-size: 1em;
  text-decoration: none;
  color: #e91e63;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.back-link a:hover {
  text-decoration: underline;
}

.back-icon {
  font-size: 1.2em;
}

/* ===== Picture Diary ページ専用 ===== */

.picturediary-content {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 15px;
  text-align: left;
}
.picturediary-content h2,
.picturediary-content h3 {
  color: #e91e63;
  margin-top: 1.5em;
}


.creator-profile {
  display: flex;
  align-items: flex-start;  /* ← 上揃え */
  gap: 15px;
  margin-bottom: 20px;
}

/* 画像 */
.creator-profile-pic {
  max-width: 300px;
  height: auto;
  flex-shrink: 0;
}

/* 説明文 */
.creator-profile p {
  flex: 1;
  margin: 0;
  font-size: 1rem;        /* ✅ 他の<p>と同じ文字サイズ */
  font-weight: normal;    /* ✅ 太字を解除 */
  color: #333;            /* ✅ 本文カラー（共通テキストカラー） */
  text-align: left;       /* ✅ 左寄せに固定 */
  line-height: 1.6;
}

/* --- スマホでは縦並び --- */
@media screen and (max-width: 600px) {
  .creator-profile {
    flex-direction: column;
    align-items: center;   /* 画像だけ中央寄せ */
    text-align: center;
  }
  .creator-profile p {
    text-align: left;     /* ✅ スマホでも文章は左寄せのまま */
    margin-top: 10px;
  }
  .creator-profile-pic {
    max-width: 70%;
    margin-bottom: 10px;
  }
}

/* ✅ 画像グリッド */
.picturediary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  justify-items: center;
}

.picturediary-item {
  text-align: center;
}

.picturediary-item img {
  max-width: 170px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ccc;
  transition: transform 0.3s ease;
}

.picturediary-item img:hover {
  transform: scale(1.05);
}

.picturediary-item .caption {
  font-size: 0.9em;
  color: #555;
  margin-top: 5px;
}

/* ✅ タブレット（3列表示） */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  .picturediary-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ✅ スマホ（2列表示＆プロフィール縦並び） */
 @media screen and (max-width: 600px) {
  .picturediary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}
/* 会報 */
/* 会報一覧ページ */
.kaihou-section h2 {
  margin-bottom: 20px;
  font-size: 1.8em;
  border-bottom: 2px solid #e6007e;
  padding-bottom: 8px;
}
/* ▼ 会報グリッド（PC 5列） */
.kaihou-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
  justify-items: center;
}

/* ▼ kaihou-item 全体 */
.kaihou-item {
  text-align: center;
}

/* ▼ 年代リンク（ページ切り替え） */
.year-links {
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}
.year-links a {
  color: #e6007e;
  text-decoration: none;
  margin: 0 8px;
}
.year-links a:hover {
  text-decoration: underline;
}
/* ▼ 号数タイトル */
.issue-title {
  margin-bottom: 4px;
  font-weight: bold;
  font-size: 1.2em;
}
/* ▼ 発行日 */
.issue-date {
  margin-bottom: 8px;
  font-size: 0.8em;
  color: #555; /* 少し淡いグレーで号数より控えめ */
}
/* ▼ 画像 */
.kaihou-item img {
  width: auto;
  max-width: 160px;
  height: 220px;         /* ✅ 高さ統一 */
  object-fit: cover;     /* ✅ 縦横比維持 */
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: transform 0.3s ease;
}
.kaihou-item img:hover {
  transform: scale(1.05);
}
/* ▼ モバイル（600px以下 → 2列） */
@media screen and (max-width: 600px) {
  .kaihou-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .issue-title {
    font-size: 15px;
  }
  .issue-date {
    font-size: 13px;
  }
}
/* ▼ タブレット（601px〜1024px → 3列） */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  .kaihou-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .kaihou-item img {
    max-width: 140px;
    height: 200px;
  }
}