/* =============================================
   common-header.css
   全ページ共通ヘッダー上書き用
   ※各ページCSSの「後」に読み込むこと
   ============================================= */

/* ===== PC (1025px+) ===== */
@media screen and (min-width:1025px) {

  /* --- ヘッダー全体 --- */
  #header {
    height: auto !important;
    background: #fff !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
  }

  /* ヘッダー高さ分のスペース確保（上段+下段 ≈ 130px） */
  body {
    padding-top: 130px !important;
  }

  #h_top {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
  }

  /* --- SP用要素をPC非表示 --- */
  .header-contact { display: none !important; }
  .lp-tel { display: none !important; }
  .lp-line { display: none !important; }
  .lp-tel-tab { display: none !important; }

  /* --- 上段：ロゴ + ボタン --- */
  .h-row-upper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 0 14px !important;
  }

  .h-row-upper .h_logo p,
  .h-row-upper .h_logo h1 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
  }

  .h-upper-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  /* 資料DL */
  .h-upper-right .nav-contact {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    text-align: center !important;
  }
  .h-upper-right .nav-contact span {
    display: none !important;
  }
  .h-upper-right .nav-contact a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    color: #003549 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    background: #f5f7f8 !important;
    padding: 10px 16px !important;
    border: 1px solid #e0e4e7 !important;
    border-radius: 8px !important;
    transition: all 0.2s;
    line-height: 1 !important;
  }
  .h-upper-right .nav-contact a::before {
    content: '\f019';
    font-family: 'FontAwesome';
    font-size: 11px;
    color: #003549;
  }
  .h-upper-right .nav-contact a:hover {
    border-color: #003549 !important;
    background: #edf1f3 !important;
    transform: translateY(-1px);
  }

  /* メール */
  .h-upper-right .nav-mail-pc a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: #003549 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.2s;
    line-height: 1 !important;
  }
  .h-upper-right .nav-mail-pc a::before {
    content: '\f0e0';
    font-family: 'FontAwesome';
    font-size: 10px;
  }
  .h-upper-right .nav-mail-pc a:hover {
    background: #00516e !important;
    transform: translateY(-1px);
  }

  /* LINE */
  .nav-line-pc a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #06C755 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s;
    line-height: 1 !important;
  }
  .nav-line-pc a:hover {
    background: #05a648 !important;
    transform: translateY(-1px);
  }
  .nav-line-pc a svg { flex-shrink: 0; }

  /* 電話 */
  .h-upper-right .nav-tell {
    margin: 0 !important;
    text-align: center !important;
    padding-left: 20px !important;
    margin-left: 12px !important;
    border-left: 2px solid #e8ecee !important;
  }
  .h-upper-right .nav-tell span {
    display: inline-block !important;
    font-size: 11px !important;
    color: #fff !important;
    line-height: 1 !important;
    margin-bottom: 6px !important;
    background: linear-gradient(135deg, #d85e27 0%, #c44d1a 100%) !important;
    padding: 5px 14px !important;
    width: auto !important;
    letter-spacing: 0.08em !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 4px rgba(216,94,39,0.25);
  }
  .h-upper-right .nav-tell a {
    font-size: 26px !important;
    color: #1a1e24 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    background: none !important;
    padding: 0 !important;
    letter-spacing: 0.04em;
    line-height: 1 !important;
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
  }
  .h-upper-right .nav-tell a .fa,
  .h-upper-right .nav-tell a i {
    margin-right: 5px;
    font-size: 20px !important;
    color: #d85e27 !important;
  }

  /* --- 下段：ナビバー --- */
  #h_top .h_nav {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(135deg, #1a1e24 0%, #2c3038 50%, #1a1e24 100%) !important;
    border-top: none !important;
  }
  #h_top .h_nav::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, #1a1e24 0%, #d85e27 15%, #e8a45a 50%, #d85e27 85%, #1a1e24 100%);
  }

  /* ナビ非表示要素 */
  #gNav .nav-contact-flex { display: none !important; }

  #gNav > .nav {
    display: flex !important;
    justify-content: center !important;
  }
  #gNav > .nav > li {
    margin-right: 0 !important;
    position: relative;
  }
  #gNav > .nav > li > a {
    font-size: 13.5px !important;
    padding: 0 20px !important;
    line-height: 52px !important;
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em;
    transition: all 0.3s;
    position: relative;
  }
  #gNav > .nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: #d85e27;
    transition: all 0.3s;
    transform: translateX(-50%);
  }
  #gNav > .nav > li:hover > a::after,
  #gNav > .nav > li.current > a::after {
    width: 60%;
  }
  #gNav > .nav > li > a:hover,
  #gNav ul > li:hover > a {
    color: #fff !important;
    background: transparent !important;
  }

  /* ▼アイコン */
  #gNav > .nav > li > span.header-nolink {
    font-size: 13.5px !important;
    padding: 0 20px !important;
    line-height: 52px !important;
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em;
    cursor: default;
    margin-right: 0 !important;
    transition: color 0.3s;
  }
  #gNav > .nav > li > span.header-nolink::after {
    content: '▾';
    margin-left: 4px;
    font-size: 12px;
    color: #d85e27;
    transition: transform 0.3s;
    display: inline-block;
  }
  #gNav > .nav > li:hover > span.header-nolink {
    color: #fff !important;
  }
  #gNav > .nav > li:hover > span.header-nolink::after {
    transform: rotate(180deg);
    color: #e8a45a;
  }

  #gNav li {
    font-size: 13.5px !important;
    color: rgba(255,255,255,0.85) !important;
  }

  /* サブメニュー */
  #gNav .sub-menu { background: #fff !important; }
  #gNav li:hover ul.sub-menu {
    top: 52px !important;
    border-radius: 0 0 8px 8px;
    border-left: 2px solid #d85e27 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    background: #fff !important;
  }
  #gNav li:hover ul.sub-menu a {
    color: #444 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    padding: 11px 18px !important;
  }
  #gNav li:hover ul.sub-menu a:hover {
    background: #faf6f3 !important;
    color: #d85e27 !important;
  }
}

/* ===== SP/タブレット (1024px以下) ===== */
@media screen and (max-width:1024px) {
  .h-row-upper {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .h-upper-right { display: none !important; }
  .nav-line-pc { display: none !important; }
  .nav-mail-pc { display: none !important; }
}