/* 親ヘッダーの黄色枠直下に配置する想定 */
.tp-header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  max-width: 1200px;
  /* 一番上のバナーと同じ幅 */
  margin: 0 auto;
  /* 画面中央寄せ */
  padding-left: 20px;
  /* バナーに合わせた左右余白 */
  padding-right: 20px;
}

/* ロゴ：高さを一定に、縦中央揃え */
.tp-header-logo img {
  height: 44px;
  width: auto;
  display: block;
}

/* 検索フォーム（右側いっぱいに） */
.tp-search-form {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 720px;
  width: 100%;
}

.tp-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 2px solid #00367c;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  line-height: 1;
  box-sizing: border-box;
}

.tp-search-button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 18px;
  border: 2px solid #00367c;
  border-radius: 0 8px 8px 0;
  background: #00367c;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.tp-search-button:hover,
.tp-search-button:focus {
  filter: brightness(1.05);
}

.tp-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 54, 124, 0.15);
}

.header {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "header-inner"
    "gnav-pc"
    "gnav-sp";
  align-items: center;
  justify-items: center;
  background-color: #fff;
}

.header>.__header-inner {
  grid-area: header-inner;
  display: flex;
  flex-direction: column;
}

.header>.gnav-pc {
  grid-area: gnav-pc;
}

.header>.gnav-sp {
  grid-area: gnav-sp;
}

.gnav-pc {
  width: 100%;
}

.__content-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.__search-form {
  width: 100%;
  margin-bottom: 0;
}

.tp-search-form {
  margin-bottom: 0;
  padding: 0 15px;
}

.header .__banner .__wrap a.__logo {
  padding: 0;
}

/* __content-topと__bannerを囲む親要素のスタイル */
.__header-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 10px 0;
}

.header .__banner {
  width: auto;
}

/* PC表示時はgnav-spを非表示 */
@media (min-width: 599px) {
  .header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "header-inner"
      "gnav-pc";
    align-items: start;
  }

  .header>.__header-inner {
    flex-direction: row;
  }

  .header>.__header-inner>.__banner {
    flex: 0 0 auto;
  }

  .header>.__header-inner>.__content-top {
    flex: 1 1 auto;
  }

  .header>.gnav-sp {
    display: none;
  }

  .tp-search-form {
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .header .__banner .__wrap a.__logo {
    padding: .5em 0;
  }
}

/* SR-only */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

/* レスポンシブ：狭い幅ではロゴ上・検索下の2段 */
@media (max-width: 768px) {
  .tp-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .tp-search-form {
    max-width: none;
  }

  .tp-header-logo img {
    height: 40px;
  }
}

@media screen and (max-width: 599px) {
  .header .__banner .__wrap a.__logo {
    text-align: left;
    height: 3.5em;
  }
}