/* ===============================
   基本レイアウト
=============================== */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 上段：ロゴ・言語切替・スマホメニュー */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}

/* ロゴ */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 42px;
}

.company-name {
  font-size: 20px;
  font-weight: 600;
  color: #1a3d7c; /* 高級感ブルー */
}

/* ===============================
   PC 言語切替
=============================== */
.lang-switch {
  display: flex;
  gap: 10px;
}

.lang-switch .lang-btn {
  padding: 6px 12px;
  border: 1px solid #6aa6ff;   /* 薄い青 */
  background: #e9f2ff;         /* 淡い青背景 */
  color: #1a3d7c;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: 0.2s;
}

.lang-switch .lang-btn:hover {
  background: #1a3d7c;
  color: #fff;
}


/* ===============================
   PC メニュー
=============================== */
.header-bottom {
  background: #f8f8f8;
  border-top: 1px solid #e5e5e5;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 14px 0;
  margin: 0;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
  transition: 0.2s;
}

.main-nav a:hover {
  color: #1a3d7c;
}

/* ===============================
   スマホ用（〜768px）
=============================== */
@media (max-width: 768px) {

  .header-top {
    display: flex !important;
    justify-content: space-between;  /* 左：≡ / 中央：ロゴ / 右：言語 */
    align-items: center;
    padding-left: 10px;   /* ← ボタンとロゴの間に余白を作る */
    padding-right: 10px;
    height: 60px;
    position: relative;
  }

  .logo-area {
    justify-self: center;
    text-align: center;
    display: flex;
    flex-direction: column; /* ← 狭い時は2行になる */
    gap: 2px;
  } 
  
  .logo {
  height: 26px;
  align-items: center;
  }

  .company-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a3d7c; /* 高級感ブルー */
  }

  /* PC メニュー非表示 */
  .header-bottom {
    display: none;
  }

  /* PC 言語切替非表示 */
  .lang-switch {
    display: none;
  }

  /* ===============================
     スマホ言語切替（🌐）
  =============================== */
  .smartphone-mobile {
    position: static;
    right: 10px;
    top: 10px;
    justify-self: end;
    display: flex;
    gap: 6px;
  }

    .smartphone-lang-menu {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: 40px;
    background: #e9f2ff;  
    border: 1px solid #6aa6ff; 
    padding: 6px 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 80px;
    z-index: 9999;
  }

  .smartphone-lang-menu.open {
    display: block;
  }

  .smartphone-lang-menu .menubar-btn {
    display: block;
    width: 100%;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #333;
  }

  .smartphone-lang-menu .menubar-btn:last-child {
    border-bottom: none;  
  }

  .smartphone-toggle {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1a3d7c;
  }

  /* ===============================
     スマホメニュー（≡）
  =============================== */
  /* 左上に ≡ を固定 */
  .smartphone-menu-wrapper {
    position: static;
    top: 10px;
    left: 10px;
    width: auto;
  }

  .smartphone-nav-menu {
    display: none;
    position: absolute;
    left: 10px;     
    top: 40px;
    background: #e9f2ff;  
    border: 1px solid #6aa6ff; 
    padding: 6px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 140px;
    z-index: 999999;
  }

  .smartphone-nav-menu.open {
    display: block;
  }

  .smartphone-nav-menu a {
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    font-size: 15px;
  }

  .smartphone-nav-menu a:last-child {
    border-bottom: none;  
  }

    /* 三本線ボタン（≡）を丸く高級デザインに */
  .smartphone-menu-toggle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #f9f9fa;
    border: none;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
  }

  /* 三本線を太く・バランスよく中央に配置 */
  .smartphone-menu-toggle span,
  .smartphone-menu-toggle span::before,
  .smartphone-menu-toggle span::after {
    content: "";
    display: block;
    background-color: #fff;
    height: 3px;              /* ← 少し太く */
    width: 22px;              /* ← バランスの良い長さ */
    border-radius: 2px;
    position: relative;
  }

  .smartphone-menu-toggle span::before {
  position: absolute;
  top: -7px;
  }

  .smartphone-menu-toggle span::after {
    position: absolute;
    top: 7px;
  }

  /* ===============================
     中央：ロゴ＋会社名（自動で1行/2行）
  =============================== */
  .logo-area {
    flex: 1;                     /* ← 中央を広く使う */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
  }

  .logo {
    height: 24px;
  }

  .company-name {
    font-size: 16px;
    line-height: 1.2;
    color: #1a3d7c;
  }
  
  /* ===============================
     PCメニュー・PC言語は非表示
  =============================== */
  .header-bottom,
  .lang-switch {
    display: none !important;
  }

}
/* ===============================
   PC版（769px以上）
=============================== */
@media (min-width: 769px) {

  /* 上段を3カラムにする（左：ロゴ / 中央：空白 / 右：言語） */
  .header-top {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 14px 20px;
    background: #ffffff; /* 1行目と2行目の背景を統一 */
    border-bottom: none; /* 行の間の線を消す */
  }

  /* スマホメニュー非表示 */
  .smartphone-menu-wrapper {
    display: none !important;
  }

  /* スマホ言語切替非表示 */
  .smartphone-mobile {
    display: none !important;
  }

  /* PC言語切替を右寄せ */
  .lang-switch {
    display: flex !important;
    justify-content: flex-end;
    gap: 10px;
  }

  /* PCメニュー（2行目）も背景色を統一 */
  .header-bottom {
    background: #ffffff !important;
    border-top: none !important; /* 行の間の線を消す */
  }
}

