/* =========================
   Header
========================= */
.header {
  position: sticky;
  top: 0;
  background-color: var(--primary-white);
  padding: 20px 0 24px;
  z-index: 10;
}

@media (max-width: 1190px) {
  .header {
    padding: 16px 0;
  }
}

body.admin-bar .header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .header {
    top: 0;
  }
}

/* =========================
   Header top
========================= */
.header-top {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding: 0 var(--content-gutter);
}

@media (max-width: 540px) {
  .header-top {
    font-size: 11px;
  }
}

/* =========================
   Header main
========================= */
.header-main {
  padding: 0 var(--content-gutter);
}

.header-main-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

/* logo */
.img-logo {
  height: 48px;
}

@media (max-width: 540px) {
  .img-logo {
    height: 34px;
  }
}

/* =========================
   Hamburger button
========================= */
.btn-menu-wapper {
  width: 30px;
  height: 40px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 1190px) {
  .btn-menu-wapper {
    display: flex;
  }
}

.btn-menu-wapper span {
  display: block;
  width: 30px;
  height: 1px;
  background: #000;
  margin: 2px 0;
  transition: transform 0.3s ease;
}

.btn-menu-wapper.is-open span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}
.btn-menu-wapper.is-open span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

/* =========================
   PC menu
========================= */
.menu-pc {
  display: flex;
  align-items: center;
  gap: 40px;
}

@media (max-width: 1190px) {
  .menu-pc {
    display: none;
  }
}

/* =========================
   Navigation common
========================= */
.header {
  .nav .menu-list {
    display: flex;
    gap: 0 40px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav a {
    display: inline-block;
    padding: 12px 0;
    font-weight: 500;
    text-decoration: none;
    color: #000;
  }
}

/* =========================
   PC submenu (hover)
========================= */
@media (min-width: 1191px) {
  .menu-item-has-children {
    position: relative;
  }

  .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;

    a {
      width: 100%;
    }
  }

  .menu-item-has-children:hover > .sub-menu {
    display: block;
  }
}

/* =========================
   menu-sp : PC에서는 완전 제거
========================= */
@media (min-width: 1191px) {
  .menu-sp {
    position: fixed;
    inset: 0;
    transform: translateY(-100%);
    pointer-events: none;
    opacity: 0;
  }
}

/* =========================
   SP menu (slide down)
========================= */
@media (max-width: 1190px) {
  .menu-sp {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;

    display: flex;
    flex-direction: column;

    transform: translateY(-100%);
    transition: transform 0.4s ease;
  }

  .menu-sp.is-open {
    transform: translateY(0);

    .menu-btn-wrapper {
      padding: 16px;
      .btn-contact {
      }
    }
  }
}

/* =========================
   SP menu header
========================= */
.menu-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--content-gutter);
  border-bottom: 1px solid #eee;
}

/* close button */
.btn-menu-close {
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
}

.btn-menu-close span {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #000;
}

.btn-menu-close span:nth-child(1) {
  transform: rotate(45deg);
}
.btn-menu-close span:nth-child(2) {
  transform: rotate(-45deg);
}

/* =========================
   SP navigation
========================= */
@media (max-width: 1190px) {
  .menu-sp .nav {
    padding: 10px var(--content-gutter);
    overflow-y: auto;
  }

  .menu-sp .menu-list {
    flex-direction: column;
    gap: 0;
  }

  .menu-sp .menu-item {
    border-bottom: 1px solid #f0f0f0;
  }

  .menu-sp a {
    width: 100%;
    padding: 16px 0;
  }
}

/* =========================
   SP submenu (accordion)
========================= */
@media (max-width: 1190px) {
  .menu-item-has-children {
    position: relative;
  }

  .sub-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    padding-left: 20px;
    background: #f9f9f9;
    transition: max-height 0.3s ease;
  }

  .sub-menu.is-active {
    max-height: 500px;
  }

  .submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 46px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================
   Contact button
========================= */
.btn-contact {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: var(--primary-white);
  /* background: linear-gradient(180.89deg, #58a85e 0.71%, #46864b 59.14%); */
  background-color: #005b47;
  font-size: 15px;
  height: 46px;
  width: 139px;
  border-radius: 40px;
}

.btn-contact:hover {
  opacity: 0.8;
}

.header .menu-pc .nav .menu-list > .current-menu-item > a,
.header .menu-pc .nav .menu-list > .current-menu-parent > a {
  color: #005b47 !important;
  text-decoration: underline #005b47;
  text-underline-offset: 4px;
}
