/* 
 * File     : layout.css
 * Author   : PSH (shpark7502@gmail.com)
 */
/* *********************************************** *
 * Root
 * *********************************************** */
:root {
  --header-height: 87px;
  --submenu-height: 48px;
}

/* *********************************************** *
 * Header
 * *********************************************** */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  border-bottom: 1px solid #e9e9e9;
  background-color: #fff;
  z-index: 1010;
  transition: border-color 0.3s, transform 0.3s;
}
#header .logo a {
  display: block;
  width: 130px;
  aspect-ratio: 1/0.3;
  background-image: url(../images/logo.png);
  background-size: 130px auto;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.3s 0.2s ease;
}
#header .navbar {
  height: 100%;
}
#header .navbar > ul {
  display: flex;
  height: 100%;
  gap: 60px;
  align-items: center;
}
#header .navbar > ul > li {
  position: relative;
  display: inline-flex;
  height: 100%;
}
#header .navbar > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: #1b1b1b;
  z-index: 5;
  transition: color 0.3s ease;
}
#header .navbar > ul > li > a.active {
  color: #fff !important;
}
#header .navbar > ul > li > a.active::before {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
  left: 50%;
  width: calc(100% + 36px);
  height: 44px;
  border-radius: 28px;
  background-color: #3d3d3d;
  z-index: -1;
  transform: translate(-50%, -50%);
}
#header .navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  gap: 40px;
  justify-content: center;
  white-space: nowrap;
  z-index: 10;
}
#header .navbar .submenu > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 18px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
  text-align: center;
  height: var(--submenu-height);
  z-index: 5;
}
#header .navbar .submenu > li > a:hover, #header .navbar .submenu > li > a.active {
  font-weight: 700;
  color: #000;
}
#header .navbar .submenu > li > a:hover::before, #header .navbar .submenu > li > a.active::before {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
  left: 50%;
  width: calc(100% + 28px);
  height: 36px;
  border-radius: 28px;
  background-color: #f1f3f5;
  z-index: -1;
  transform: translate(-50%, -50%);
}
#header .sidemenu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}
#header .sidemenu button {
  position: relative;
  width: 36px;
  height: 36px;
  outline: 0;
}
#header .sidemenu__button--member {
  background-image: url(../images/header_member_icon.svg);
  background-size: 28px;
  background-repeat: no-repeat;
  background-position: center;
}
#header .sidemenu__button--sitemap {
  position: relative;
}
#header .sidemenu__button--sitemap em {
  position: absolute;
  display: block;
  left: 4px;
  height: 2px;
  border-radius: 3px;
  background-color: #1b1b1b;
  transition: background-color 0.3s 0.2s ease;
}
#header .sidemenu__button--sitemap em:nth-child(2) {
  top: 8px;
  width: 32px;
}
#header .sidemenu__button--sitemap em:nth-child(3) {
  top: 18px;
  width: 14px;
}
#header .sidemenu__button--sitemap em:nth-child(4) {
  top: 28px;
  width: 24px;
}
#header .sidemenu .member__drawer {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 160px;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
}
#header .sidemenu .member__drawer.show {
  display: block;
}
#header .sidemenu .member__drawer ul {
  padding: 10px 8px;
}
#header .sidemenu .member__drawer a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #3d3d3d;
  padding: 8px 12px;
  border-radius: 8px;
}
#header .sidemenu .member__drawer a:hover {
  color: #000;
  background-color: #f7f8f9;
}
#header .menu__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background-color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  z-index: -1;
}
#header.scroll--up {
  transform: translateY(-150%);
}
#header.scroll--up ~ #gnb-bg {
  transform: translateY(calc((var(--header-height) + 48px) * -1));
}

#gnb-bg {
  position: fixed;
  top: calc(var(--header-height) - 1px);
  left: 0;
  right: 0;
  height: var(--submenu-height);
  border-top: 1px solid #e9e9e9;
  border-bottom: 1px solid #e9e9e9;
  background-color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s;
  z-index: 10;
}
#gnb-bg.active {
  opacity: 1;
}

/* *********************************************** *
 * All menu
 * *********************************************** */
#all-menu {
  display: none;
  position: fixed;
  inset: 0;
  background-color: #f1f3f5;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
#all-menu .allmenu__container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
#all-menu .allmenu__header {
  height: 90px;
  margin-bottom: 32px;
  background-color: #454545;
}
#all-menu .allmenu__header .logo a {
  display: block;
  width: 130px;
  aspect-ratio: 1/0.3;
  background-image: url(../images/logo_white.png);
  background-size: 130px auto;
  background-position: center;
  background-repeat: no-repeat;
}
#all-menu .allmenu__header .close__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: #fff;
}
#all-menu .allmenu__content {
  padding: 48px 16px;
  background-color: #fff;
}
#all-menu .allmenu__content nav > ul > li {
  padding: 0 24px;
}
#all-menu .allmenu__content nav > ul > li > a {
  font-size: 20px;
  font-weight: 700;
  color: #000;
}
#all-menu .allmenu__content nav .submenu {
  margin-top: 20px;
}
#all-menu .allmenu__content nav .submenu li + li {
  margin-top: 12px;
}
#all-menu .allmenu__content nav .submenu li a {
  font-size: 18px;
  font-weight: 500;
  color: #4f4f4f;
}
#all-menu .allmenu__content nav .submenu li a:hover {
  color: #3d3d3d;
  text-decoration: underline;
}

/* *********************************************** *
 * Popup
 * *********************************************** */
#hd_pop {
  position: relative;
  width: 1420px;
  margin: auto;
  height: 0;
  z-index: 1000;
}
#hd_pop h2 {
  position: absolute;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}
#hd_pop .hd_pops {
  position: absolute;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
#hd_pop .hd_pops_footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  background-color: #f6f6f6;
}
#hd_pop .hd_pops_footer button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #5d5d5d;
  padding: 0 16px;
  gap: 6px;
  height: 100%;
  outline: none;
}
#hd_pop .hd_pops_reject {
  text-decoration: underline;
}
#hd_pop .hd_pops_reject:hover {
  color: #3d3d3d;
}

/* *********************************************** *
 * Footer
 * *********************************************** */
#footer {
  padding-top: 68px;
  padding-bottom: 70px;
  background-color: #f6f6f6;
}
#footer .logo {
  margin-bottom: 15px;
}
#footer .logo img {
  width: 143px;
}
#footer .link__group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 56px;
  gap: 27px;
}
#footer .link__group a {
  font-weight: 700;
  color: #3d3d3d;
}
#footer .link__group em {
  display: block;
  width: 1px;
  height: 18px;
  background-color: #d8d8d8;
}
#footer address,
#footer .copyright__text {
  font-weight: 700;
}
#footer address {
  color: #3d3d3d;
  line-height: 1.9;
  margin-bottom: 46px;
}
#footer address span + span {
  margin-left: 12px;
}
#footer .copyright__text {
  color: #666;
}

/* *********************************************** *
 * Container
 * *********************************************** */
#container {
  padding-top: var(--header-height);
}

/* *********************************************** *
 * Body
 * *********************************************** */
body:not(.main) #container {
  padding-top: 160px;
}

/* *********************************************** *
 * Media queries
 * *********************************************** */
@media (min-width: 768px) {
  #mobile-menu {
    display: none;
  }
}
@media (max-width: 1023px) {
  :root {
    --header-height: 70px;
  }
  #header .logo a {
    width: 110px;
    background-size: 110px auto;
  }
  #header .navbar > ul {
    gap: 24px;
  }
  #header .navbar > ul > li > a {
    font-size: 16px;
  }
  #header .navbar .submenu {
    gap: 24px;
  }
  #header .navbar .submenu > li > a {
    font-size: 15px;
  }
  #header .sidemenu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }
  #header .sidemenu button {
    width: 32px;
    height: 32px;
    outline: 0;
  }
  #header .sidemenu__button--member {
    background-size: 24px;
  }
  #header .sidemenu__button--sitemap {
    position: relative;
  }
  #header .sidemenu__button--sitemap em:nth-child(2) {
    top: 7px;
    width: 28px;
  }
  #header .sidemenu__button--sitemap em:nth-child(3) {
    top: 15px;
    width: 10px;
  }
  #header .sidemenu__button--sitemap em:nth-child(4) {
    top: 23px;
    width: 20px;
  }
  #header .sidemenu .member__drawer {
    width: 140px;
  }
  #footer {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  #footer .logo img {
    width: 130px;
  }
  #footer .link__group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 40px;
  }
  #footer address {
    margin-bottom: 32px;
  }
}
@media (max-width: 767px) {
  #header .navbar {
    display: none;
  }
  #header.scroll--up {
    transform: translateY(-100%);
  }
  #gnb-bg {
    display: none;
  }
  #mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
  }
  #mobile-menu .mobile__menu--backdrop {
    position: absolute;
    inset: 0;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  #mobile-menu .mobile__menu--container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 360px;
    background-color: #fff;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 20;
  }
  #mobile-menu .mobile__menu--header {
    height: 70px;
    margin-bottom: 6px;
    padding: 0 28px;
  }
  #mobile-menu .mobile__menu--header .container {
    border-bottom: 1px solid #eee;
  }
  #mobile-menu .mobile__menu--header .logo a {
    display: block;
    width: 110px;
    aspect-ratio: 1/0.3;
    background-image: url(../images/logo.png);
    background-size: 110px auto;
    background-position: center;
    background-repeat: no-repeat;
  }
  #mobile-menu .mobile__menu--header .close__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    transform: translateX(14px);
  }
  #mobile-menu .mobile__menu--content {
    height: calc(100% - 80px);
    padding: 0 28px;
    overflow: auto;
  }
  #mobile-menu nav {
    padding-bottom: 100px;
  }
  #mobile-menu nav > ul > li {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
  }
  #mobile-menu nav > ul > li > a {
    width: 140px;
    font-size: 15px;
    font-weight: 700;
    color: #000;
  }
  #mobile-menu nav > ul > li .submenu {
    flex: 1 0 0%;
    flex-grow: 1;
  }
  #mobile-menu nav > ul > li .submenu li + li {
    margin-top: 12px;
  }
  #mobile-menu nav > ul > li .submenu li a {
    font-size: 15px;
    color: #4f4f4f;
  }
  #mobile-menu nav > ul > li .submenu li a.active {
    font-weight: 700;
    color: #3f66ff;
  }
  #mobile-menu.menu--open .mobile__menu--backdrop {
    opacity: 1;
  }
  #mobile-menu.menu--open .mobile__menu--container {
    transform: translateX(0);
  }
  #hd_pop {
    width: 100%;
  }
  #hd_pop .hd_pops {
    top: 100px !important;
    left: 50% !important;
    max-width: calc(100% - 40px);
    transform: translateX(-50%);
  }
  #hd_pop .hd_pops_footer {
    height: 48px;
  }
  #hd_pop .hd_pops_footer button {
    font-size: 14px;
  }
  #footer .link__group {
    margin-bottom: 32px;
    gap: 20px;
  }
  #footer .link__group a {
    font-size: 14px;
  }
  #footer .link__group em {
    height: 14px;
  }
  #footer address,
  #footer .copyright__text {
    font-size: 14px;
  }
  #footer address {
    margin-bottom: 24px;
  }
  #footer address span + span {
    margin-left: 6px;
  }
  body:not(.main) #container {
    padding-top: 100px;
  }
}