@charset "utf-8";

/* ============================================================
   responsive.css — モバイル対応（既存CSSは一切変更しない）
   768px以下でモバイルレイアウトを適用
   ============================================================ */

/* デスクトップではハンバーガーボタンを非表示 */
#mobile-menu-btn { display: none; }

@media screen and (max-width: 768px) {

  /* ── 全体 ── */
  img { max-width: 100%; height: auto; }
  iframe { max-width: 100%; }
  object { display: none; }

  /* head_bg.png は固定高さのため縦積みレイアウトで崩れる → モバイルでは無効化 */
  body { background-image: none; background-color: #fff; }

  div#container {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body { overflow-x: hidden; }

  /* ── ハンバーガーボタン ── */
  #mobile-menu-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #355887;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-top: 1px solid #5070a0;
    text-align: left;
    cursor: pointer;
    margin: 0;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  /* ── ヘッダー ── */
  div#header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0 8px;
    box-sizing: border-box;
  }
  div#header h1       { flex: 0 0 100%; order: 1; }
  div#header p#headrogo {
    flex: 0 0 auto;
    float: none;
    height: auto;
    margin: 4px 0;
    order: 2;
  }
  div#header ul#headinfo {
    flex: 1;
    float: none;
    margin-top: 45px;
    margin-bottom: 4px;
    text-align: right;
    order: 3;
  }
  div#header ul#headinfo li { font-size: 11px; }
  div#header ul#headinfo li img { display: block; margin-left: auto; }
  div#header p#headbanner {
    flex: 0 0 100%;
    display: block;
    margin: 4px 0;
    order: 5;
  }
  div#header p#headbanner img { width: 100%; height: auto; }
  div#header ul#headnavi {
    flex: 0 0 calc(100% + 16px);
    margin: 0 -8px;
    order: 4;
    background: #2a4878;
    text-align: left;
    border-top: none;
    padding: 0 12px;
    margin-top: 0;
  }
  div#header ul#headnavi li {
    display: inline-block;
    margin: 0;
    font-size: 11px;
    background-image: none;
    padding: 0;
  }
  div#header ul#headnavi li a {
    display: inline-block;
    padding: 7px 6px;
  }

  /* ── 左サイドバー (ドロワー) ── */
  div#leftcontents {
    float: none;
    width: 100%;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
    background: #f0f4f8;
    border-bottom: 2px solid #355887;
    margin: 0 0 10px 0;
    padding: 0;
  }
  div#leftcontents.nav-open { display: block; }

  /* ナビゲーションボタン：元の背景画像を維持しつつ幅をフル対応 */
  ul#navigation { padding: 0; }
  ul#navigation li {
    margin: 0;
    position: relative;
  }
  /* サムネイルとテキストエリアの境界にグラデーション継続効果 */
  ul#navigation li::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 85px;
    width: 28px;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
    pointer-events: none;
    z-index: 1;
  }
  ul#navigation li a {
    width: 100% !important;
    min-height: 72px;
    height: auto !important;
    padding: 0 12px 0 96px !important;
    display: flex !important;
    align-items: center;
    overflow: hidden;
    background-position: left -2px !important;
    background-size: 90px 74px !important;
    background-color: transparent !important;
    font-size: 13px !important;
    font-weight: bold;
    color: #333 !important;
    border-bottom: 1px solid #d0dae6;
    line-height: 1.6 !important;
    text-indent: 0 !important;
    box-sizing: border-box;
    white-space: normal !important;
    word-break: break-word;
  }
  ul#navigation li#navi_1 a { background-image: url(../images/navigation_bg1_t.png) !important; }
  ul#navigation li#navi_2 a { background-image: url(../images/navigation_bg2_t.png) !important; }
  ul#navigation li#navi_3 a { background-image: url(../images/navigation_bg3_t.png) !important; }
  ul#navigation li#navi_4 a { background-image: url(../images/navigation_bg4_t.png) !important; }
  ul#navigation li#navi_5 a { background-image: url(../images/navigation_bg5_t.png) !important; }
  ul#navigation li#navi_6 a { background-image: url(../images/navigation_bg6_t.png) !important; }
  ul#navigation li#navi_7 a { background-image: url(../images/navigation_bg7_t.png) !important; }
  ul#navigation li#navi_8 a { background-image: url(../images/navigation_bg8_t.png) !important; }
  ul#navigation li a::before { content: none; }

  div#leftmap { width: 100%; box-sizing: border-box; }
  div#leftmap iframe { width: 100%; height: 200px; }

  div#leftinqlink {
    width: 100%;
    height: auto;
    background: none;
    padding: 8px;
    box-sizing: border-box;
    border-top: 1px solid #ccc;
  }
  div#leftinqlink p { margin: 4px 0; }
  div#leftinqlink p#inq_2 { margin: 0; }
  p#inqlink a {
    width: auto;
    height: auto;
    background: #355887;
    color: #fff;
    padding: 10px 16px;
    display: inline-block;
    margin: 6px 0;
    font-weight: bold;
    border-radius: 3px;
  }

  /* ── メインコンテンツ ── */
  div#maincontents {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0 8px;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* h2：ページ固有の大ヘッダー画像を幅100%スケール（テキストは画像内に含まれる） */
  div.cont1 h2,
  div.faq h2 {
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vw * 150 / 775);
    background-size: 100% auto !important;
    border-left: none !important;
    border-bottom: none !important;
    margin: 16px 0 8px 0;
  }
  /* トップページのh2のみ：carアイコンバー（テキスト表示） */
  div#point h2,
  div#greeting h2 {
    height: 32px !important;
    min-height: 32px;
    background-image: url(../images/main_h2_bg2.png) !important;
    background-size: auto 100% !important;
    text-indent: 0 !important;
    padding: 0 0 0 40px !important;
    font-size: 13px !important;
    font-weight: bold;
    color: #333 !important;
    line-height: 32px !important;
  }
  /* feature.html の大型セクションヘッダー（475×207px）：h2と同様にスケール */
  div.cont1 h3.feat_1,
  div.cont1 h3.feat_2,
  div.cont1 h3.feat_3 {
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vw * 207 / 475);
    background-size: 100% auto !important;
    padding: 0 !important;
    text-indent: -9999px !important;
    border-left: none !important;
    line-height: normal !important;
  }
  div.cont1 h3.feat_1 { background-image: url(../images/feature/img004.jpg) !important; }
  div.cont1 h3.feat_2 { background-image: url(../images/feature/img005.jpg) !important; }
  div.cont1 h3.feat_3 { background-image: url(../images/feature/img006.jpg) !important; }

  /* h3：全ページcarアイコンバー */
  div.cont1 h3 {
    width: 100% !important;
    height: 32px !important;
    background-image: url(../images/main_h2_bg2.png) !important;
    background-size: auto 100% !important;
    text-indent: 0 !important;
    padding: 0 0 0 40px !important;
    font-size: 13px !important;
    font-weight: bold;
    color: #333 !important;
    line-height: 32px !important;
    border-left: none !important;
    margin: 12px 0 6px 0;
  }

  /* コンテンツ内float解除 */
  p.images, p.images_l { float: none; margin: 8px 0; }

  /* ── トップページ (top.css) ── */
  /* 当社のポイント：カテゴリ名と説明文を2カラムに */
  div#point ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.3em;
  }
  div#point ul li strong {
    flex: 0 0 auto;
    align-self: center;
    padding-right: 0.3em;
    white-space: nowrap;
  }

  /* 横並びfloat要素を縦積みに変更するだけ。背景画像・高さ等は維持 */
  div#top_banner3,
  div#greeting,
  div#koe,
  div#example {
    float: none;
    width: 100%;
    box-sizing: border-box;
  }
  div#top_banner3 {
    position: relative !important;
    background-size: 100% auto;
    min-height: calc(100vw * 354 / 415);
    padding-top: calc(100vw * 203 / 415);
    box-sizing: border-box;
  }
  div#top_banner3 h2 {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 !important;
    text-align: center;
  }
  div#koe {
    height: auto !important;
    background-size: 100% 100%;
    padding: 0 16px 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }
  div#koe h2 {
    margin: 0 0 6px 0 !important;
    padding: 2px 0;
  }
  div#koe p {
    margin: 2px 0 !important;
    line-height: 1.5 !important;
  }
  p#koebtn {
    position: static !important;
    margin-top: auto;
    padding-top: 12px;
    text-align: left;
  }
  p#koebtn a {
    position: static !important;
    display: inline-block !important;
    margin-top: 0;
  }
  div#example {
    height: auto !important;
    background-size: 100% auto;
    min-height: calc(100vw * 350 / 560);
  }
  div#example h2 {
    margin: 5px 0 calc(100vw * 0.625 - 30px) 0 !important;
  }

  /* ── 会社案内 (information.css) ── */
  div.box-a {
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }
  div.box775 ul,
  div.box775w ul {
    width: 100% !important;
    box-sizing: border-box;
  }
  div.box775 ul li.info-title,
  div.box775w ul li.info-title {
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  div.box775 ul li.info-tx,
  div.box775w ul li.info-tx {
    float: none !important;
    width: 100% !important;
    padding-left: 10px !important;
    box-sizing: border-box;
  }

  /* ── カルーセル（repair.html） ── */
  .repair-carousel {
    width: 100% !important;
    box-sizing: border-box;
  }
  .carousel-track img {
    width: 280px !important;
    height: 210px !important;
  }
  .carousel-btn { height: 210px !important; }

  /* ── フッター ── */
  div#footbg { background-image: none !important; }
  div#footer {
    height: auto !important;
    position: static !important;
    padding: 8px 8px 20px 8px;
    box-sizing: border-box;
  }
  p#toplink {
    position: static !important;
    display: block;
    width: 100%;
    height: auto;
    text-align: right;
    padding: 0 0 8px 0;
    margin: 0;
    border-top: none;
    /* ボタン幅(186px)を除いた左側のみに影付き線を描画（ボタン左端の7px影グラデーションと一致） */
    background-image:
      linear-gradient(to right, #cdcdcd, #cdcdcd),
      linear-gradient(to bottom, #e2e2e2, transparent) !important;
    background-size:
      calc(100% - 186px) 1px,
      calc(100% - 186px) 7px !important;
    background-position:
      0 0,
      0 1px !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  p#toplink a {
    display: inline-block;
    width: 186px;
    height: 42px;
    line-height: 27px;
    background: url(../images/foot_toplink_bg.png) top left no-repeat !important;
    color: #999999 !important;
    font-size: 12px;
    text-align: center;
    text-decoration: none;
  }
  ul#footnavi {
    position: static !important;
    display: flex;
    flex-wrap: wrap;
    padding: 4px 0 8px 0;
  }
  ul#footnavi li {
    width: 50%;
    box-sizing: border-box;
    font-size: 12px;
    background: url(../images/foot_lm.png) center left no-repeat !important;
    padding: 0 0 0 10px !important;
    margin: 5px 0;
  }
  ul#footnavi li a { display: block; }
  ul#footinfo {
    position: static !important;
    text-align: left;
    padding: 8px 0 0 0;
  }
  ul#footinfo li { font-size: 11px; margin: 3px 0; }
  ul#footinfo li img { max-width: 100%; height: auto; }
}
