/* ニュース詳細ページ用 CSS（works と統一感のあるスタイル） */
html {
  background-color: #ffffff;
}

body {
  background-color: #f8f7f3;
  font-family: "Yu Mincho", "游明朝", serif;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 3;
  letter-spacing: 0.075em;
}

.news-article {
  max-width: 960px;
  margin: 70px auto;
  padding: 0 20px;
}

.news-title {
  padding-top: 3em;   /* ← ← ← ここで確実にスペースを作る */
  font-size: 2rem;
  font-weight: bold;
  color: #1e2d3a;
  margin-top: 1.5em; /* ← 例：1〜2emくらいがおすすめ */
  margin-bottom: 2.5em;
  text-align: center;
}

.news-block {
  display: flex;
  flex-wrap: wrap;
  gap: 4em;
  margin-bottom: 4em;
  align-items: flex-start;
}

.news-block .text {
  font-size: 1.05em;
  flex: 1.2;  /* ← 文章の幅を少し大きくする（1.2：0.8 のバランスに） */
  min-width: 280px;
}

.news-block .image {
  flex: 0.8;  /* ← 画像をややコンパクトに */
  min-width: 280px;
  max-width: 400px; /* ← あまり大きくならないように制限（任意） */
  margin-top: 1.5em; /* ← お好みで調整（例：0.5em〜2em） */
}

.news-block .image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.caption {
  font-size: 0.9em;
  color: #777;
  margin-top: 0.5em;
  font-family: "Yu Mincho", serif;
}

/* レイアウト切り替え */
.layout-right .text { order: 1; }
.layout-right .image { order: 2; }

.layout-left .text { order: 2; }
.layout-left .image { order: 1; }

.layout-bottom {
  flex-direction: news;
}

.external-link {
  text-decoration: none;
  color: #406882;
}
.external-link:hover {
  text-decoration: underline; /* ← ホバー時にだけ下線つけたければ */
  color: #1c2a33;
}


/* 戻るリンク */
.back-link {
  display: block;
  text-align: left;
  margin: 40px auto;
  max-width: 960px;
  padding: 0 20px;
  color: #2e3e4e;
  text-decoration: underline;
}

.back-link:hover {
  color: #1c2a33;
}

/* 詳細ページ用の簡易ナビバー */
.detail-nav {
  background-color: rgba(28, 42, 51, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* Safari対策 */  
  position: fixed;             /* ← 固定表示 */
  top: 0;                      /* ← 上端にぴったり */
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 20px;       /* ✅ OK（上下にpaddingないか確認） */
  display: flex !important;              /* ← 念のため明示 */
  align-items: center;
  justify-content: flex-start !important; /* ← 中央寄せを打ち消す！ */
  padding-left: 50px; /* ← 少し詰めたい場合 */
  box-sizing: border-box;
  z-index: 1000;               /* ← 他要素の上に出す */
  font-family: "Yu Mincho", "游明朝", serif;
}

/* ナビ内のリンク */
.detail-nav nav {
  width: 100%;                    /* ← 横幅いっぱいに広げる */
  display: block;           /* ← flexになってないか確認 */
  text-align: left;         /* ← 念のため左寄せ */
}

/* ナビ内のリンク（1つだけ） */
.detail-nav nav a {
  position: relative;
  padding: 4px 15px;
  display: inline-block;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: white;
  text-decoration: none;
}

.detail-nav nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: white;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.detail-nav nav a:hover::after {
  transform: scaleX(1);
}

footer {
  display: flex;                 /* ← 必須！ */
  justify-content: center;       /* ← 横中央揃え（任意） */
  align-items: center;     /* ← 垂直中央揃え！ */
  padding: 15px 20px;
  background-color: rgba(28, 42, 51, 1.0);
  color: white;
  font-size: 14px;
  margin-top: auto;
  height: 40px;                     /* ← 固定高さ */
}

footer p {
  margin: 0;
}

.lang-switch-inline {
  font-size: 1rem !important;
  color: white;
  margin-left: 16px;
  display: none !important;
  position: relative;
}

.lang-switch-inline a {
  font-size: 12px !important; /* ← nav a に勝つ */
  color: white;
  text-decoration: none;
  padding: 0 4px ;  
  transition: opacity 0.3s;
}

.lang-switch-inline a:hover {
  opacity: 0.6;
}

.lang-switch-inline a::after {
  display: none !important;
  content: none !important;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .detail-nav {
    padding-left: 20px; /* ← ここを詰めて左寄せに */
  }

  .news-block {
    flex-direction: news;
  }
 .layout-right {
    flex-direction: news-reverse;
  }

  .layout-left {
    flex-direction: news;
  }

  .back-link {
    text-align: left;         /* ← 中央から左へ */
    margin-left: 20px;        /* ← 左寄せの位置を微調整 */
    margin-right: auto;       /* ← 自動で右を押し出す */
    padding-left: 0;          /* ← 必要ならpaddingも調整 */
    max-width: 100%;          /* ← スマホで余白をなくす */
  }
/* 👇 ここから追加：文字サイズの縮小 */
  body {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .news-title {
    font-size: 1.2rem;
  }

  .news-block .text {
    font-size: 0.95rem;
  }

  .caption {
    font-size: 0.8rem;
  }

  .back-link {
    font-size: 0.9rem;
  }

  .detail-nav nav a {
    font-size: 16px;
  }
}