﻿/* =========================
   body調整
========================= */

body {
  margin: 0;
  padding-top: 90px; /* ヘッダー90px + 上ボーダー5px */
  font-family: sans-serif;
}

/* =========================
   ヘッダー
========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #fff;
  border-top: 5px solid #1f2a80;
  border-bottom: 0px solid #ddd;
  z-index: 1000;
    box-shadow: 0px 0px 3px rgba(128, 128, 128, 0.5);
}

.header-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   ロゴ
========================= */

.header-logo {
  width: 345px;
  height: auto;
  display: flex;
  align-items: center;
}

.header-logo img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
}

/* =========================
   ナビ
========================= */

.header-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 12px;
  color: #1f2a80;
}

.nav-menu i {
  font-size: 22px;
  margin-bottom: 4px;
  color: #1f2a80;
}

/* =========================
   ハンバーガー
========================= */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: #1f2a80;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ☰ → × */
.hamburger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================
   レスポンシブ
========================= */

@media (max-width: 800px) {

  .nav-menu {
    position: fixed;
    top: 95px;
    right: 0;
    width: 120px;
    height: calc(100vh - 95px);
    background: rgba(255, 255, 255, 0.9);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 10px rgba(0,0,0,0.1);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }
}

/* =========================
   ヘッダーを固定した影響で、ページ内リンクの
　　移動先の位置にずれが生じることへの対策
========================= */
:root {
  --header-height: 100px;
}
div[id],
section[id],
h1[id],
h2[id],
h3[id] {
  scroll-margin-top: var(--header-height);
}
@media (max-width: 800px) {
  :root {
    --header-height: 100px;
  }
}