/* =========================================
   SP hamburger menu + fixed bottom bar
   ========================================= */

.header_nav_close,
.sp-fixed-bar {
  display: none;
}

@media screen and (max-width: 767px) {
  /* Menu panel must sit above header_wrap (z-index:101) or close btn is unclickable */
  .header_nav.js-menu {
    z-index: 1100 !important;
  }

  .header.is-active .header_wrap {
    pointer-events: none;
  }

  .header.is-active .header_nav,
  .header.is-active .header_nav_close {
    pointer-events: auto;
  }

  .header_nav_wrap {
    display: flex !important;
    flex-direction: column !important;
    padding: 7.2rem 2rem 2.4rem !important;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .header_nav_close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.4rem;
    right: 1.6rem;
    width: 4.8rem;
    height: 4.8rem;
    border: none;
    border-radius: 50%;
    background: #FFB700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 1200;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .header_nav_close img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    min-width: 18px !important;
    pointer-events: none;
  }

  .header.is-active .header_hamburger {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
  }

  .header_nav ul.header_nav_list {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    flex: 1 1 auto;
  }

  .header_nav ul.header_nav_list > li {
    position: relative;
    margin: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid #92C5E2 !important;
    font-size: 1.3rem !important;
    font-weight: 700;
  }

  .header_nav ul.header_nav_list > li:first-of-type,
  .header_nav ul.header_nav_list > li:last-of-type {
    margin-top: 0 !important;
  }

  .header_nav ul.header_nav_list > li:last-of-type {
    border-bottom: 1px solid #92C5E2 !important;
    padding-bottom: 0 !important;
  }

  .header_nav ul.header_nav_list > li::after {
    content: '' !important;
    display: block !important;
    width: 0.4rem !important;
    height: 1rem !important;
    background: url(../img/cmn/ico_link_black.svg) no-repeat center / contain !important;
    position: absolute !important;
    top: 50% !important;
    right: 0.2rem !important;
    left: auto !important;
    transform: translateY(-50%) !important;
  }

  .header_nav ul.header_nav_list > li a {
    display: block !important;
    padding: 2.2rem 0 1.2rem 0 !important;
    color: #3C3C3C !important;
    text-decoration: none;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
  }

  .header_nav_actions {
    width: 100%;
    margin-top: 2.4rem;
    display: grid;
    gap: 1.2rem;
  }

  .sp-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    height: 5.6rem;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none !important;
    box-sizing: border-box;
    line-height: 1;
  }

  .sp-menu-btn img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
    flex: 0 0 auto !important;
    position: static !important;
    transform: none !important;
    background: none !important;
  }

  .sp-menu-btn--register img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
  }

  .sp-menu-btn--login img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
  }

  .sp-menu-btn--consult {
    background: #FFB700 !important;
    color: #3C3C3C !important;
    border: none !important;
  }

  .sp-menu-btn--register {
    background: #fff !important;
    color: #3C3C3C !important;
    border: 2px solid #1880BB !important;
  }

  .sp-menu-btn--login {
    background: #1880BB !important;
    color: #fff !important;
    border: none !important;
  }

  .sp-fixed-bar {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    width: 100%;
    height: 5.6rem;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .sp-fixed-bar.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }

  .sp-fixed-bar__btn {
    flex: 1 1 33.333%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 5.6rem;
    font-size: clamp(11px, 3.2vw, 13px);
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1.2;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .sp-fixed-bar__btn img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
    flex: 0 0 auto !important;
    position: static !important;
    transform: none !important;
  }

  .sp-fixed-bar__btn--register img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
  }

  .sp-fixed-bar__btn--login img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    min-width: 16px !important;
  }

  .sp-fixed-bar__btn--consult {
    background: #FFB700;
    color: #3C3C3C;
  }

  .sp-fixed-bar__btn--register {
    background: #fff;
    color: #3C3C3C;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
  }

  .sp-fixed-bar__btn--login {
    background: #1880BB;
    color: #fff;
  }

  .wrapper {
    padding-bottom: 5.6rem;
  }

  .footer_contact {
    display: none !important;
  }
}

@media screen and (min-width: 768px) {
  .header_nav_close,
  .sp-fixed-bar {
    display: none !important;
  }
}
