﻿  :root {
    --transition-duration: 600ms;
    --header-height: 64px; /* ヘッダーの高さ */
    --side-panel-width: 320px; /* 追加: サイドメニューの共通張り出し幅 */
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* 固定式ヘッダーのスタイル */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 1rem;
    transition: background-color 260ms ease, color 200ms ease;
  }

  .site-header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: sans-serif;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  /* 追加: ロゴ（タイトル）ホバー時に色を明るく */
  .site-header .logo a:hover {
    opacity: 0.75;
    transition: opacity 0.18s;
  }

  .site-header nav { display: flex; gap: 1rem; align-items: center; }

  .site-header nav a {
    color: #000;
    text-decoration: none;
    font-size: 0.9rem; /* 文字サイズを小さく調整 */
    font-family: sans-serif;
    padding: 0.4rem 0.8rem; /* 余白を調整 */
    border-radius: 4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }
  @media (max-width: 1200px) {
    .site-header nav a {
      font-size: 0.8rem; /* メニューの文字サイズをさらに縮小 */
      padding: 0.3rem 0.6rem; /* 余白をさらに調整 */
    }
  }

  .accident-btn-icon { height:1.8em; width:auto; object-fit:contain; vertical-align:middle; margin-right:4px; clip-path:inset(12%); }
  .site-header nav .accident-btn-icon { filter: brightness(0); transition: filter 200ms ease; }
  .site-header nav a:hover .accident-btn-icon { filter: brightness(0) invert(1); }
  .site-header.at-top nav .accident-btn-icon { filter: brightness(0) invert(1); }
  .mobile-panel .accident-btn-icon { height:24px; }
  .site-header nav a.accident-btn,
  .site-header nav a.inquiry-btn {
    height: 2em;
  }
  .site-header.at-top nav a.accident-btn {
    background-color: transparent;
  }
  .site-header.at-top nav a.accident-btn:hover {
    background-color: #6B7B8C;
  }
  .site-header nav a.inquiry-btn {
    background-color: #0b66c2;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
  }
  .site-header nav a.inquiry-btn:hover {
    background-color: #0955a8 !important;
    color: #fff !important;
  }
  .site-header.at-top nav a.inquiry-btn {
    background-color: rgba(11,102,194,0.9);
  }
  .site-header nav a:hover {
    background-color: #6B7B8C;
    color: #fff;
  }

  /* スクロールトップ時（ページ先頭）に透明化して文字を白にする */
  .site-header.at-top {
    background-color: transparent;
    color: #fff;
    box-shadow: none;
  }
  .site-header.at-top .logo,
  .site-header.at-top nav a {
    color: #fff;
  }
  .site-header.at-top .hamburger .bars span {
    background: #fff;
  }

  /* ハンバーガーメニュー */
  .hamburger {
    display: none;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
  }

  .hamburger .bars {
    width: 28px;
    height: 20px;
    position: relative;
    display: block;
  }

  .hamburger .bars span {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: #000;
    border-radius: 2px;
    transition: transform 220ms, opacity 220ms;
    display: block;
  }

  .hamburger .bars span:nth-child(1) { top: 0; }
  .hamburger .bars span:nth-child(2) { top: 8px; }
  .hamburger .bars span:nth-child(3) { top: 16px; }

  .hamburger.open .bars span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.open .bars span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open .bars span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* モバイルパネル */
  .mobile-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(var(--side-panel-width), 90vw);
    height: calc(100vh - var(--header-height));
    background: rgba(255,255,255,0.78);
    border-radius: 60px 0 0 60px / 100% 0 0 100%;
    box-shadow: -12px 0 40px rgba(12,12,12,0.22);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 3px solid rgba(25,118,210,0.5);
    font-family: sans-serif;
    letter-spacing: normal;
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(.2,.9,.3,1), opacity 200ms;
    opacity: 0;
    z-index: 1099;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
    align-items: center;
  }

  .mobile-panel.open {
    transform: translateX(0);
    opacity: 1;
  }

  .mobile-panel a {
    font-family: sans-serif;
    font-weight: 400;
    letter-spacing: normal;
    color: #222;
    text-shadow: none;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    transition: background 0.18s, transform 0.2s cubic-bezier(0.22,1,0.36,1), color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-panel a:hover {
    color: #1a56d6;
    background: rgba(11,102,194,0.09);
    transform: translateX(5px);
  }

  /* パネル内テキストもリセット */
  .mobile-panel p {
    font-family: sans-serif;
    color: #888;
    letter-spacing: normal;
    text-shadow: none;
    text-align: center;
    margin-top: 32px !important;
    margin-bottom: 0 !important;
  }

  /* モバイル時のみ表示 */
  @media (max-width: 900px) {
    .hamburger { display: flex; }
    .site-header nav { display: none; }
    .mobile-panel { display: flex; }
    .site-header .logo { font-size: 1.5rem; }
  }
  @media (min-width: 901px) {
    .mobile-panel { display: none !important; }
  }

  /* リスポンシブデザイン */
  @media (max-width: 1200px) {
    :root {
      --header-height: 56px;
    }
    .site-header {
      font-size: 0.9rem;
    }

  }

  @media (max-width: 768px) {
    :root {
      --header-height: 48px;
    }
    .site-header {
      font-size: 0.8rem;
    }
    .site-header .logo {
      font-size: 1.3rem;
    }
  }

  /* 追加: レスポンシブ最適化（フォームページ） */
  @media (max-width: 480px) {
    .site-header { padding: 0 0.75rem; }
    .site-header .logo { font-size: 1.3rem; }
    .site-header nav a { padding: 0.6rem 0.8rem; font-size: 0.95rem; }
    .mobile-panel { width: min(var(--side-panel-width), 90vw); padding: 16px; box-sizing: border-box; }
    .mobile-panel a { padding: 0.75rem 12px; font-size: 1.12rem; }
    /* Googleフォームiframeの高さ調整（レスポンシブ） */
    #contactMain iframe { height: 1200px !important; width: 100% !important; }
  }
  @media (min-width: 481px) and (max-width: 768px) {
    #contactMain iframe { height: 1200px !important; width: 100% !important; }
  }
  @media (min-width: 769px) and (max-width: 900px) {
    #contactMain iframe { height: 1200px !important; width: 100% !important; }
  }
  @media (min-width: 901px) and (max-width: 1200px) {
    #contactMain iframe { height: 1200px !important; width: 100% !important; }
  }
  @media (min-width: 1201px) {
    #contactMain iframe { height: 1200px !important; width: 100% !important; }
  }
  #contactMain {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .footer-link {
    white-space: nowrap;
    display: inline-block;
  }
  /* main自体のoverflowをhiddenにしてiframeの二重スクロール防止 */
  #contactMain {
    overflow-x: hidden;
    overflow-y: visible;
  }
  
  /* モバイル専用クイックリンク（事故・お問い合わせ） */
  .hero-quick-links {
    display: none;
    position: absolute;
    bottom: 20px;
    right: 12px;
    z-index: 10;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }
  @media (max-width: 900px) {
    .hero-quick-links { display: flex; }
  }
  .hero-quick-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.42);
    color: #fff;
    text-decoration: none;
    padding: 6px 14px 6px 10px;
    border-radius: 24px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.18s;
    white-space: nowrap;
  }
  .hero-quick-btn:hover,
  .hero-quick-btn:active {
    background: rgba(11,102,194,0.72);
  }
  .hero-quick-btn img {
    width: auto !important;
    height: 18px !important;
    object-fit: contain !important;
    flex-shrink: 0;
  }
  .hero-quick-btn svg {
    flex-shrink: 0;
  }
  
  /* hero文字レスポンシブ */
  .hero h1 { font-size: clamp(1.2rem, 5.5vw, 2rem) !important; line-height: 1.25 !important; }
  .hero p  { font-size: clamp(0.8rem, 3.2vw, 1rem) !important; line-height: 1.7; }
  
  /* リンクデフォルトスタイルリセット */
  a { text-decoration: none; transition: opacity 0.18s; }
  a:hover { text-decoration: none; opacity: 0.72; }

  .hero-quick-btn svg {
    flex-shrink: 0;
  }
  
  /* hero文字レスポンシブ */
  .hero h1 { font-size: clamp(1.2rem, 5.5vw, 2rem) !important; line-height: 1.25 !important; }
  .hero p  { font-size: clamp(0.8rem, 3.2vw, 1rem) !important; line-height: 1.7; }
  
  /* リンクデフォルトスタイルリセット */
  a { text-decoration: none; transition: opacity 0.18s; }
  a:hover { text-decoration: none; opacity: 0.72; }

  .hero-quick-btn svg {
    flex-shrink: 0;
  }
  
  /* hero文字レスポンシブ */
  .hero h1 { font-size: clamp(1.2rem, 5.5vw, 2rem) !important; line-height: 1.25 !important; }
  .hero p  { font-size: clamp(0.8rem, 3.2vw, 1rem) !important; line-height: 1.7; }
  
  /* リンクデフォルトスタイルリセット */
  a { text-decoration: none; transition: opacity 0.18s; }
  a:hover { text-decoration: none; opacity: 0.72; }



/* 大型モニターではヘッダーリンクを拡大 */
@media (min-width: 1200px) {
  .site-header nav a { font-size: 1rem; }
}
@media (min-width: 1600px) {
  .site-header nav a { font-size: 1.1rem; }
}


/* 印刷対応: Googleフォームのiframeは印刷できないため非表示にする */
@media print {
  #contactFormIframe {
    display: none !important;
  }
}
