@charset "UTF-8";

/* ==========================================================================
   中野運輸 共通2026 / common2026.css
   新デザインのヘッダー・問い合わせ帯・フッター（TOP＋下層ページで使い回し）。
   下層ページでは旧CSS（common.css / style.css / sp.css / menu.css）と同居するため、
   ・コンポーネントは .l-header / .p-top-contact / .l-footer 配下のセレクタで記述
     （旧CSSの要素セレクタ nav ul / nav li / nav li a / footer / footer p より強くする）
   ・旧CSSが要素に当てる値（nav li a の height/padding/背景画像、footer p の padding 等）を明示的に打ち消す
   ========================================================================== */

:root {
  --color-navy: #2f5288;
  --color-green: #2cab6e;
  --color-text-dark: #1f232b;
  --color-text-body: #48525e;
  --color-text-sub: #353e4a;
  --color-bg-light: #dfe7ef;
  --color-border: #d9d9d9;
}

/* 旧CSSに box-sizing 指定が無いページでも新ブロック内は border-box に統一 */
.l-header,
.l-header *,
.l-header *::before,
.l-header *::after,
.p-top-contact,
.p-top-contact *,
.l-footer,
.l-footer * {
  box-sizing: border-box;
}

.l-header,
.p-top-contact,
.l-footer {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.6;
}

/* ページ外側の左右余白を一元管理（内寸1200px） */
.l-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}


/* ===== l-header: ヘッダー（ロゴ＋グローバルナビ） ===== */

.l-header {
  /* スクロール追従。fixedでなくstickyなのでフローに残り、
     body側の高さ補正パディングが不要＝ズレの計算そのものが発生しない。
     ※html/bodyの overflow-x は clip（hiddenだとstickyが効かなくなる／clipはスクロールコンテナを作らないので共存可） */
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #fff;
  /* 追従時にコンテンツと見分けるための薄い影 */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.l-header__inner {
  display: flex;
  align-items: center;
  /* 高さ72px。height固定を避けmin-heightで確保する */
  min-height: 72px;
}

.l-header .l-header__logo {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
  transition: opacity 0.35s ease;
}

.l-header .l-header__logo:hover {
  opacity: 0.7;
}

.l-header .l-header__logo img {
  display: block;
  border: 0;
}

.l-header .l-header__nav {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}

/* ハンバーガー開閉用チェックボックスとボタン（SP専用・CSSのみで開閉）。PCでは非表示 */
.l-header__navtoggle,
.l-header__hamburger {
  display: none;
}

/* --- グローバルナビ本体（8セル・セル間と両端に1px区切り線＝計9本） --- */
/* 旧CSS打ち消し: nav ul { font-size:0; text-align:right; } */
.l-header .p-globalnav {
  display: flex;
  align-items: center;
  /* カンプのナビ実寸 x509〜1321＝812px（101.5px×8セル） */
  width: 812px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 10px;
  list-style: none;
  text-align: left;
}

/* 旧CSS打ち消し: nav li { height:50px; } */
.l-header .p-globalnav__item {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--color-border);
  list-style: none;
}

.l-header .p-globalnav__item:last-child {
  border-right: 1px solid var(--color-border);
}

/* 旧CSS打ち消し: nav li a { display:table-cell; height:42px; padding:…; font-weight:bold; }
   ＋旧JSが現在ページのaに .active を実行時付与→ nav li a.active の背景画像(nav_on_*.png)も打ち消す */
.l-header .p-globalnav__link {
  background-image: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: auto;
  /* セル高56px = アイコン36 + gap2 + ラベル行送り14 + 上下padding2 */
  padding: 2px 0;
  color: var(--color-navy);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  /* ホバーはすべてフェードで切り替える */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 旧CSS打ち消し: nav li a:hover 等の背景画像（nav_on_*.png）
   ホバーは現在ページ表示と同じ「セル紺地・ラベル白・アイコン白抜き」 */
.l-header .p-globalnav__link:hover,
.l-header .p-globalnav__link:active {
  background-image: none;
  background-color: var(--color-navy);
  color: #fff;
  text-decoration: none;
}

.l-header .p-globalnav__link:hover .p-globalnav__icon,
.l-header .p-globalnav__link:active .p-globalnav__icon {
  filter: brightness(0) invert(1);
}

/* 現在ページ: セル全体を紺地・ラベル白 */
.l-header .p-globalnav__link--current {
  background-color: var(--color-navy);
  color: #fff;
}

/* 現在ページのアイコンは青PNGをCSSフィルタで白抜きに（専用画像を増やさない） */
.l-header .p-globalnav__link--current .p-globalnav__icon {
  filter: brightness(0) invert(1);
}

/* 他のボタンをホバーしている間は、現在ページの紺セルを通常状態（白地・青）に戻す
   ＝紺の帯が常にホバー先1つだけに見える
   （ナビ上にカーソルがあり、かつ現在ページセル自身はホバーされていない時だけ効く） */
.l-header .p-globalnav:hover .p-globalnav__link--current:not(:hover) {
  background-color: transparent;
  color: var(--color-navy);
}

.l-header .p-globalnav:hover .p-globalnav__link--current:not(:hover) .p-globalnav__icon {
  filter: brightness(1) invert(0);
}

.l-header .p-globalnav__icon {
  display: block;
  flex: 0 0 auto;
  border: 0;
  /* ホバーの白抜き反転もフェードで切り替える。none→filterは補間できないので恒等filterを基準にする */
  filter: brightness(1) invert(0);
  transition: filter 0.3s ease;
}

.l-header .p-globalnav__label {
  /* カンプは9pxだがChromeの日本語最小フォントサイズに合わせ10pxを採用 */
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
}

@media screen and (max-width: 1023px) {
  /* セル幅が101.5pxを割るので、ラベルを折り返してオーバーフローを防ぐ */
  .l-header .p-globalnav__label {
    white-space: normal;
    text-align: center;
  }
}

@media screen and (max-width: 767px) {
  /* SPはハンバーガー（checkbox方式・JS不要）。ヘッダーが薄いのでSPも追従（sticky）のまま */
  .l-header__inner {
    min-height: 56px;
    padding-block: 8px;
  }

  .l-header__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    padding: 10px 6px;
    cursor: pointer;
  }

  .l-header__hamburger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-navy);
    transition: transform 0.2s, opacity 0.2s;
  }

  /* 開いたらバーを×に */
  .l-header__navtoggle:checked ~ .l-header__hamburger .l-header__hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .l-header__navtoggle:checked ~ .l-header__hamburger .l-header__hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .l-header__navtoggle:checked ~ .l-header__hamburger .l-header__hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 開閉パネル: ヘッダー直下に重ねるドロップダウン
     （absoluteはヘッダーへの真の重なりのための使用＝レイアウト配置ではない。基準はsticky化された.l-header）
     display切替だと瞬時に切り替わるため、opacity+visibility+わずかな縦移動でフェード開閉させる */
  .l-header .l-header__nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin-left: 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background-color: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  }

  .l-header__navtoggle:checked ~ .l-header__nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .l-header .p-globalnav {
    display: block;
    width: 100%;
  }

  .l-header .p-globalnav__item {
    border-left: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .l-header .p-globalnav__item:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .l-header .p-globalnav__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 20px;
  }

  .l-header .p-globalnav__icon {
    width: 36px;
    height: 27px;
  }

  .l-header .p-globalnav__label {
    font-size: 13px;
    white-space: nowrap;
  }
}

/* /l-header: ヘッダー */


/* ===== p-top-contact: 問い合わせ帯 ===== */

.p-top-contact {
  margin-top: 22px;
  padding: 19px 0;
  background-color: var(--color-bg-light);
}

.p-top-contact .p-top-contact__inner {
  display: flex;
  align-items: center;
}

.p-top-contact .p-top-contact__button {
  padding: 9px 24px;
  border-radius: 3px;
  background-color: var(--color-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.p-top-contact .p-top-contact__button:hover {
  opacity: 1;
  transform: translateY(-3px);
  background-color: #254a78;
  box-shadow: 0 6px 14px rgba(28, 68, 115, 0.22);
  text-decoration: none;
}

.p-top-contact .p-top-contact__button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: none;
}

.p-top-contact .p-top-contact__button:focus-visible,
body:not(#top) .estimates a:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 3px;
}

/* 下層ページ共通の見積りバナーにも同じ押下反応を付ける。 */
body:not(#top) .estimates a {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body:not(#top) .estimates a:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 18px rgba(28, 68, 115, 0.18);
}

body:not(#top) .estimates a:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}

.p-top-contact .p-top-contact__tel {
  margin-left: 13px;
  color: var(--color-text-sub);
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
}

.p-top-contact .p-top-contact__chip {
  margin-left: 23px;
  padding: 2px 8px;
  border: 1px solid var(--color-text-sub);
  border-radius: 3px;
  color: var(--color-text-sub);
  font-size: 14px;
}

.p-top-contact .p-top-contact__hours {
  margin-left: 9px;
  color: var(--color-text-sub);
  font-size: 14px;
}

.p-top-contact .p-top-contact__links {
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--color-text-sub);
  font-size: 14px;
}

/* 「サイトマップ」等がリンク語の途中で折り返さないよう、折り返しはリンク間のみ許可
   下線は常設して色だけtransparent⇄表示色をフェードさせる */
.p-top-contact .p-top-contact__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: text-decoration-color 0.35s ease;
}

.p-top-contact .p-top-contact__link:hover {
  text-decoration-color: currentColor;
}

.p-top-contact .p-top-contact__separator {
  margin: 0 12px;
}

@media screen and (max-width: 1023px) {
  /* 横1行に収まらないので2段に折り返す */
  .p-top-contact .p-top-contact__inner {
    flex-wrap: wrap;
    gap: 10px 0;
  }

  .p-top-contact .p-top-contact__links {
    flex: 0 0 100%;
    margin-left: 0;
  }
}

@media screen and (max-width: 767px) {
  .p-top-contact .p-top-contact__inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .p-top-contact .p-top-contact__tel {
    margin-left: 0;
  }

  .p-top-contact .p-top-contact__chip {
    margin-left: 0;
  }

  .p-top-contact .p-top-contact__hours {
    margin-left: 0;
  }

  /* SPは「｜」区切りの1行だと中途半端に折り返すため、3リンクを白ボタンの縦リストにする */
  .p-top-contact .p-top-contact__links {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    margin: 4px auto 0;
  }

  .p-top-contact .p-top-contact__separator {
    display: none;
  }

  .p-top-contact .p-top-contact__link {
    display: block;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background-color: #fff;
    text-align: center;
  }

  .p-top-contact .p-top-contact__link:active {
    transform: scale(0.985);
  }
}

/* /p-top-contact: 問い合わせ帯 */

@media (prefers-reduced-motion: reduce) {
  .p-top-contact .p-top-contact__button,
  body:not(#top) .estimates a {
    transition-duration: 0.01ms;
  }
}


/* ===== l-footer: フッター ===== */

/* 旧CSS打ち消し: footer { background:#2d3d57(style.css)/#969eab(sp.css) } */
.l-footer {
  padding: 36px 0 17px;
  background-color: var(--color-navy);
}

.l-footer .l-footer__body {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

/* 旧CSS打ち消し: footer p { padding:15px 0; } */
.l-footer .l-footer__company {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  text-align: left;
}

.l-footer .l-footer__address {
  /* 社名の1行目とベースラインを揃えるための微調整 */
  margin: 0;
  padding: 6px 0 0;
  color: #fff;
  font-size: 12px;
  line-height: 17px;
  text-align: left;
}

.l-footer .l-footer__copyright {
  margin: 34px 0 0;
  padding: 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media screen and (max-width: 767px) {
  .l-footer .l-footer__body {
    flex-direction: column;
    gap: 10px;
  }

  .l-footer .l-footer__address {
    padding-top: 0;
  }
}

/* /l-footer: フッター */
