/*===============================
ヘッダー
===============================*/

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  z-index: 15;
  padding: 8px 0 7px;
  background-color: #0000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.4s ease;
}

.header.is-active {
  background-color: #004896;
  .header-nav a {
    padding: 4px 6px;
    transition: background-color 0.2s ease;
    &:hover {
      background-color: #1a6ec8;
      border-bottom: 0;
    }
  }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-base-width);
  padding: 0 var(--padding-x-base-pc);
  margin: 0 auto;
}

.header-logo {
  position: relative;
  aspect-ratio: 206/45;
  height: 45px;
  a {
    display: block;
    width: 100%;
    height: 100%;
  }
}

.header-nav {
  ul {
    display: flex;
    gap: 20px;
  }

  li {
    a {
      font-weight: normal;
      font-size: 16px;
      line-height: 25px;
      padding: 4px 6px;
      text-align: left;
      color: white;
      padding-bottom: 4px;
      border-bottom: 1px solid transparent;
      transition: border-bottom 0.2s ease;
      &:hover {
        border-bottom: 3px solid white;
      }
    }
  }
}

/* ハンバーガーメニュー */
.header-hamburger {
  display: none;
  width: 30px;
  height: 20px;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.header-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.header-hamburger span:nth-child(1) {
  top: 0;
}

.header-hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.header-hamburger span:nth-child(3) {
  bottom: 0;
}

/* アクティブ時のハンバーガーアイコン（×印） */
.header-hamburger.is-active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.header-hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.header-hamburger.is-active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

@media screen and (max-width: 1024px) {
  .header {
    padding: 10px 0;
  }

  .header-hamburger {
    display: block;
  }

  .header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 72, 150, 0.95);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .header-nav.is-active {
    opacity: 1;
    visibility: visible;
  }

  .header-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .header-nav li a {
    font-size: 18px;
    font-weight: bold;
  }
}

/*===============================
フォーム共通UI
===============================*/

.form-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 18px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  line-height: 1.5;
  font-size: 14px;
}

.form-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

@media screen and (max-width: 767px) {
  .form-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
  }
}
