/* =========================================================
   UMCH Override CSS  (PC/スマホ最適化 + UX改善 / 本文16px版)
   読み込み順：既存CSS → 本ファイル（最後に読み込む）
========================================================= */

/* レンダリング改善 */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* 和文フォント優先（Robotoが無ければ日本語Web安全フォントにフォールバック） */
body, h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

/* ---------------------------------------------------------
   本文を16pxへ（Bootstrap等の14pxベースを上書き）
   行間は読みやすい 1.7 に微調整
--------------------------------------------------------- */
body {
  font-size: 16px !important;
  line-height: 1.7 !important;
}

/* 小さすぎる small の読みやすさ改善（65% → 80%相当） */
small { font-size: 0.8em !important; }

/* ヘルプテキストやフォームの文字を本文に合わせる */
.form-control,
.help-block,
input,
select,
textarea {
  font-size: 1rem !important; /* 本文と同じ16px */
  line-height: 1.5 !important;
}

/* 表の文字が潰れないように */
table { font-size: 1rem; }

/* ---------------------------------------------------------
   見出し（本文16pxに合わせた軽い調整）
   ※既存のデザイン感を崩さない最小限の変更
--------------------------------------------------------- */
h1 { font-size: 2.25rem; line-height: 1.2; } /* 36px */
h2 { font-size: 1.75rem; line-height: 1.3; } /* 28px */
h3 { font-size: 1.375rem; line-height: 1.35; } /* 22px */
h4 { font-size: 1.125rem; line-height: 1.5; } /* 18px */
h5, h6 { line-height: 1.5; }

/* 768px未満は見出しを少しコンパクトに */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
}

/* ---------------------------------------------------------
   ナビゲーション：小さすぎた 12px を適正化（PC/スマホ）
   - PC：14px（前回の方針を踏襲）
   - タブレット：13px
   - スマホ：14px + タップ領域の高さ確保
--------------------------------------------------------- */
.nav > li > a {
  font-size: 14px !important;
  letter-spacing: 0.03em;
}

@media (min-width: 768px) and (max-width: 990px) {
  .nav > li > a {
    font-size: 13px !important;
  }
}

@media (max-width: 767px) {
  .nav > li > a {
    font-size: 14px !important;
    line-height: 44px !important;
    height: 44px !important;
  }
}

/* ---------------------------------------------------------
   ニュース：小画面では1行固定を解除して折り返し可能に
--------------------------------------------------------- */
@media (max-width: 600px) {
  .news-item {
    white-space: normal !important;
  }
}

/* ---------------------------------------------------------
   フッター可読性アップ（0.7em → 0.85em）
--------------------------------------------------------- */
section#footer .copyright {
  font-size: 0.85em !important;
}

/* ---------------------------------------------------------
   アクセシビリティ（フォーカス可視化）
--------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #e60012;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------------------------------------------------
   ホバー時の下線（可読リンクに限定）
--------------------------------------------------------- */
.footer-nav a:hover,
.news-text a:hover,
a[href^="http"]:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   フッターナビのタップ領域を少し広げる
--------------------------------------------------------- */
.footer-nav a {
  display: inline-block;
  padding: 8px 10px;
}

/* ---------------------------------------------------------
   ページトップボタン：本文16pxに合わせ視認性を微調整
--------------------------------------------------------- */
#page-top {
  font-size: 12px; /* ボタン内テキストは控えめに */
}


/* ニュースリリース見出しを大きく */
.news-title {
  font-size: 1.2em !important;
  font-weight: bold;
}

/* ニュース一覧の行間を狭く */
.news-item {
  margin: 0.25em 0 !important;
  line-height: 1.2em !important;
}


/* 画面には非表示、SEOは維持 */
.seo-intro {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


.video-caption {
  color: #000 !important;
}

/* --- 全体のフォントをUMCH本サイトと同様のゴシック体系に統一 --- */
html, body {
  /* 英文 → 和文 → システム/汎用 の順でフォールバック（表示の安定性重視） */
  font-family:
    -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "メイリオ", Meiryo,
    "Noto Sans JP",
    "Segoe UI",
    sans-serif;
}

/* 見出し・ナビ・ボタンなども“必ず継承”させてバラつきを解消 */
h1, h2, h3, h4, h5, h6,
.navbar, .btn, .btn-cta, .btn-theme, .contact-cta,
.news-title, .news-item, .service-links a,
.video-caption {
  font-family: inherit !important;
}
