/* 濃紺のヘッダーに、文字リンクと金色の予約ボタンを組み合わせた固定ナビゲーション */
:root {
  --sticky-header-offset: 76px;
  --nav-navy: #071b28;
  --nav-gold: #d29643;
  --nav-gold-dark: #b9792f;
}

html {
  scroll-padding-top: var(--sticky-header-offset);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 60px;
  height: auto;
  padding: 0;
  background: var(--nav-navy);
  color: var(--white);
  border-bottom: 2px solid var(--nav-gold);
  box-shadow: none;
  backdrop-filter: none;
}

.header-inner {
  width: min(1120px, calc(100% - 48px));
  min-height: 60px;
  margin: 0 auto;
  padding: 4px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.site-header .brand-mark {
  border-color: rgba(255, 255, 255, 0.8);
}

/* 選定ロゴをヘッダーとフッターで共通利用する */
.brand-logo-image {
  display: inline-flex;
  flex: 0 0 auto;
  width: 218px;
  height: 52px;
  gap: 0;
}

.brand-logo-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.site-footer .brand-logo-image {
  width: 156px;
  height: 38px;
}

.header-links {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: flex-end;
  gap: clamp(22px, 2.3vw, 36px);
  min-width: 0;
  font-size: 0.8rem;
}

.header-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #F7F4ED;
  line-height: 1.42;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: visible;
  transition: color 0.2s ease;
}

.header-links a::after {
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 72%;
  height: 2px;
  background: var(--nav-gold);
  content: "";
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.header-links a:hover,
.header-links a:focus-visible {
  border-color: transparent;
  background: transparent;
  color: #EFC47C;
}

.header-links a:hover::after,
.header-links a:focus-visible::after,
.header-links a.is-active::after {
  transform: translateX(-50%) scaleX(1);
}

.header-links a.is-active {
  color: #EFC47C;
}

.header-links a.consult-button {
  min-width: 108px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  color: #E07A5F;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: none;
}

.header-links a.consult-button::after {
  display: none;
}

.header-links a.consult-button:hover,
.header-links a.consult-button:focus-visible,
.header-links a.consult-button.is-active {
  border-color: transparent;
  background: transparent;
  color: #F29C83;
}

.nav-break {
  display: none;
}

.nav-label--compact {
  display: none;
}

@media (max-width: 1000px) {
  :root {
    --sticky-header-offset: 124px;
  }

  .header-inner {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px 0;
  }

  .header-inner .brand {
    align-self: flex-start;
  }

  .header-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    column-gap: 0;
    row-gap: 0;
  }

  .header-links a {
    width: auto;
    min-width: 0;
    height: 28px;
    min-height: 28px;
  }
}

@media (max-width: 860px) {
  .header-links a {
    width: auto;
    min-width: 0;
    padding-inline: 4px;
    font-size: 0.78rem;
  }
}

@media (max-width: 520px) {
  :root {
    --sticky-header-offset: 136px;
  }

  .header-inner {
    width: min(100% - 28px, 1120px);
  }

  .brand-logo-image {
    width: 172px;
    height: 42px;
  }

  .header-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 2px;
  }

  .header-links a {
    width: auto;
    min-width: 0;
    height: 27px;
    min-height: 27px;
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .header-links a::after {
    width: 58%;
  }

  .nav-break {
    display: block;
  }

  .nav-label--full {
    display: none;
  }

  .nav-label--compact {
    display: inline;
  }
}

@media (min-width: 521px) and (max-width: 720px) {
  :root {
    --sticky-header-offset: 154px;
  }

  /* 2段ナビでも下端の余白を保ち、文字が境界線に近づかないようにする */
  .header-inner {
    padding-bottom: 6px;
  }

  .nav-break {
    display: block;
  }

  .nav-label--full {
    display: none;
  }

  .nav-label--compact {
    display: inline;
  }

  .header-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 2px;
  }

  .header-links a {
    height: 28px;
    min-height: 28px;
    font-size: 0.68rem;
    line-height: 1.1;
  }
}
