/* ヘッダー */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  z-index: 99;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5.2vw; /* 1920pxの時100px */
  padding: calc(10 / 1920 * 100vw) calc(140 / 4000 * 100vw); /* FVの端に合わせる */
  box-sizing: border-box;
}

.header-image {
  height: 100%;
  margin: 0;

  img {
    height: 100%;
    width: auto;
    margin: 0;
  }
}

.header__btns {
  display: flex;
  align-items: center;
  gap: 2%;
  height: 100%;
}

/* ヘッダースマホ用 */
@media screen and (max-width: 640px) {
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 70px;
    padding-inline: 12px;
  }

  .header__btns {
    gap: 3%;
  }

  .header-image {
    height: auto;
    img {
      height: auto;
      max-height: 70px;
    }
  }

  .btn-h {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    right: 10px;
  }

  .gnav {
    position: absolute;
    left: 200%;
    width: 100%;
    height: 100vh;
    padding: 0 2% 40px;
    background-color: #fff;
    transition: all 0.4s ease;
    box-sizing: border-box;

    nav {
      height: calc(100% - 170px); /* header+追従CTAの高さ */
    }
  }

  .gnav__menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    column-gap: calc(8 / 375 * 100vw);
    height: 100%;
    text-align: start;

    > li {
      padding: 20px 4px;
      border-bottom: solid 1px #ccc;
      box-sizing: border-box;
    }

    a {
      display: block;
      color: var(--color-main);
      font-size: 15px;
      font-weight: 700;
      text-wrap: nowrap;

      &:hover {
        opacity: 0.7;
      }
    }
  }

  .menu-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background-color: transparent;

    span {
      width: 100%;
      height: 2px;
      background-color: #333;
      transition: all 0.4s ease;
      cursor: pointer;
    }
  }

  /* ハンバーガーメニューが開いているときの設定 */
  body:has(.active) {
    overflow-y: hidden;
  }

  header:has(.active) {
    .menu-btn {
      span {
        &:first-child {
          rotate: 45deg;
          translate: 0 13px; /* (40px - 2px*2) / 3 + 1px */
        }

        &:nth-child(2) {
          opacity: 0;
        }

        &:last-child {
          rotate: -45deg;
          translate: 0 -13px;
        }
      }
    }

    .gnav {
      left: 0;
      right: auto;
    }
  }
}
/* タブレット用（768-1024px） */
/* @media screen and (min-width: 768px) and (max-width: 1024px) {
  .btn-h img {
    width: 100%;
    max-width: 300px; サイズ調整
    height: auto;
  }
} */

/* 小型PC用（1025-1280px） */
/* @media screen and (min-width: 1025px) and (max-width: 1280px) {
  .btn-h img {
    width: 100%;
    max-width: 350px; サイズ調整
    height: auto;
  }
} */

/* PC用（1281px以上） */
@media screen and (min-width: 640px) {
  .btn-h {
    height: 100%;
  }

  .btn-h img {
    height: 100%;
  }
}

/* フローティングバナー（SP用） */
@media screen and (max-width: 640px) {
  .sp-floating-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    z-index: 1000;
  }

  .sp-floating-banner a {
    display: block;
    width: auto;
  }

  .sp-floating-banner img {
    display: block;
    height: auto;
    width: auto;
    max-height: 80px;
  }
}

@media (min-width: 641px) {
  .sp-floating-banner {
    display: none;
  }
}

/* タブレット用フローティングバナー */
@media screen and (min-width: 641px) and (max-width: 1024px) {
  .pc-floating-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 3px solid #0066cc;
    padding: 5px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .banner-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
  }

  .pc-floating-banner a {
    margin: 0 10px;
  }

  .pc-floating-banner img {
    height: 50px;
    width: auto;
  }

  body {
    padding-bottom: 130px;
  }

  .sp-floating-banner {
    display: none;
  }
}

/* PC用フローティングバナー */
@media screen and (min-width: 1025px) {
  .pc-floating-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 3px solid #02a4a5;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .banner-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
  }

  .pc-floating-banner a {
    margin: 0 10px;
  }

  .pc-floating-banner img {
    height: 80px;
    width: auto;
  }

  body {
    padding-bottom: 130px;
  }

  .sp-floating-banner {
    display: none;
  }
}

/* SP用ボタンエリア */
.btn {
  position: absolute;
  width: 90%;
  bottom: 20px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.cta-area--sp {
  position: relative;
}

.sp-tel,
.sp-mail {
  position: absolute;
  width: 85%;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.sp-tel {
  bottom: 150px;
}

.sp-mail {
  bottom: 60px;
}
/* スマホ用ボタンエリア（360-390px） */
@media screen and (max-width: 390px) {
  .sp-tel {
    bottom: 150px;
  }

  .sp-mail {
    bottom: 60px;
  }
}

/* スマホ用ボタンエリア（391-430px） */
@media screen and (min-width: 391px) and (max-width: 430px) {
  .sp-tel {
    bottom: 170px;
  }

  .sp-mail {
    bottom: 70px;
  }
}

/* スマホ用ボタンエリア（431-540px） */
@media screen and (min-width: 431px) and (max-width: 540px) {
  .sp-tel {
    bottom: 220px;
  }

  .sp-mail {
    bottom: 80px;
  }
}

/* タブレット用ボタンエリア */
@media screen and (min-width: 641px) and (max-width: 1024px) {
  .cta-area--pc {
    position: relative;
    width: 100%;
  }

  .cta-area--pc > img {
    width: 100%;
    height: auto;
  }
  .btn-container-pc {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 1%;
    width: 40%; /* 幅を広げて余裕を持たせる */
    max-width: 500px;
    padding: 0 30px;
  }

  .btn-container-pc a[href^="tel"] img {
    max-width: 512px;
    width: 100%;
    height: auto;
  }

  .btn-container-pc a[href^="#formWrap"] img {
    max-width: 398px;
    width: 100%;
    height: auto;
  }
}

/* PC用ボタンエリア */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
  .cta-area--pc {
    position: relative;
    width: 100%;
  }

  .cta-area--pc > img {
    width: 100%;
    height: auto;
  }
  .btn-container-pc {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 1%;
    width: 40%;
    min-width: 600px;
    padding: 0 30px;
  }

  .btn-container-pc a[href^="tel"] img {
    max-width: 512px;
    width: 100%;
    height: auto;
  }

  .btn-container-pc a[href^="#formWrap"] img {
    max-width: 398px;
    width: 100%;
    height: auto;
  }
}
/* 1920px用 */
@media screen and (min-width: 1441px) {
  .cta-area--pc {
    position: relative;
    width: 100%;
  }

  .cta-area--pc > img {
    width: 100%;
    height: auto;
  }
  .btn-container-pc {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 52%; /* 1920pxベースの比率 */
  }

  .btn-container-pc a[href^="tel"] img {
    max-width: 512px;
    width: 100%;
    height: auto;
  }

  .btn-container-pc a[href^="#formWrap"] img {
    max-width: 398px;
    width: 100%;
    height: auto;
  }
}
