/* 레이아웃 CSS */

/* 헤더 기본 스타일 */
#header {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  box-shadow: none;
  padding-top: 10px !important;
  padding-bottom: 15px !important;
  display: flex;
  flex-direction: column;
}

@media all and (min-width: 1025px) {
  .gnb_wrap .inner {
    min-height: auto;
    height: auto;
  }
}

.gnb_wrap {
  border-bottom: 1px solid #000;
}

@media all and (max-width: 1024px) {
  .gnb_wrap {
    display: flex;
    align-items: center;
    min-height: 60px;
  }
}

/* 헤더 레이아웃 PC */
@media all and (min-width: 1025px) {
  .gnb_wrap .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .logo_wrap {
    flex-shrink: 1;
    flex-basis: auto;
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
  }

  .logo_wrap li {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .logo_wrap a {
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  .logo_wrap picture,
  .logo_wrap #logo_img {
    display: block;
    line-height: 0;
    margin: 0;
    padding: 0;
  }

  .logo_wrap img,
  .logo_wrap #fallbackImage,
  .logo_wrap .responsive-image {
    display: block;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    height: 40px;
    width: auto;
    object-fit: contain;
  }

  #cbp-hrmenu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 1;
    max-width: calc(100% - 450px);
  }

  #cbp-hrmenu > ul {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #cbp-hrmenu > ul > li > a {
    font-size: 19.2px !important;
    font-family: "font-B", "Pretendard", sans-serif !important;
    font-weight: 700 !important;
  }

  .sns_wrap {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    margin-left: auto;
    padding-left: 20px;
  }
}

/* 중간 크기 화면에서 메뉴 조정 (로고 크기는 유지) */
@media all and (min-width: 1025px) and (max-width: 1400px) {
  #cbp-hrmenu {
    max-width: calc(100% - 450px);
    flex-shrink: 1;
  }
}

/* 작은 PC 화면에서 메뉴 조정 (로고 크기는 유지) */
@media all and (min-width: 1025px) and (max-width: 1200px) {
  #cbp-hrmenu {
    max-width: calc(100% - 450px);
  }

  #cbp-hrmenu > ul {
    gap: 20px;
  }

  #cbp-hrmenu > ul > li > a {
    font-size: 16px !important;
  }
}

.sns_wrap .sns_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: #000;
  transition: color 0.3s;
}

.sns_wrap .sns_btn:hover {
  color: #666;
}

.sns_wrap .sns_btn svg {
  width: 34px;
  height: 34px;
}

.sns_wrap .sns_btn img {
  width: 34px;
  height: 34px;
}

/* 모바일 스타일 */
@media all and (max-width: 1024px) {
  .gnb_wrap .inner {
    padding-left: 0px !important;
    padding-right: 0px !important;
    display: grid;
    grid-template-columns: 50px 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
    position: relative;
    min-height: 40px;
    width: 100%;
    overflow: visible;
  }

  /* PC 메뉴 숨김 */
  #cbp-hrmenu {
    display: none !important;
  }

  /* PC SNS 버튼 숨김 */
  .sns_wrap.pc {
    display: none !important;
  }

  /* 모바일 레이아웃 - 햄버거 메뉴 */
  .tog_wrap {
    grid-column: 1;
    grid-row: 1;
    width: 50px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    justify-self: start;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
  }

  /* 모바일 레이아웃 - 로고 */
  .logo_wrap {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 80%;
    margin: 0 auto;
    padding: 0;
    z-index: 1;
    list-style: none;
    pointer-events: none;
    align-self: center;
    justify-self: center;
  }

  .logo_wrap li {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    line-height: 0;
    height: 100%;
  }

  .logo_wrap a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    line-height: 0;
  }

  .logo_wrap picture,
  .logo_wrap #logo_img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;
    line-height: 0;
  }

  .logo_wrap img,
  .logo_wrap #fallbackImage,
  .logo_wrap .responsive-image {
    display: block;
    margin: 0;
    padding: 0;
    max-height: 35px !important;
    min-height: 30px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center;
    line-height: 0;
    vertical-align: middle;
  }

  /* 모바일 레이아웃 - SNS 버튼 */
  .sns_wrap.mobile {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    min-width: 100px;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
    justify-self: end;
    margin: 0;
    padding: 0 10px;
    position: relative;
    z-index: 2;
    overflow: visible;
  }

  .sns_wrap.mobile li {
    flex-shrink: 0;
  }

  .sns_wrap.mobile .sns_btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .sns_wrap.mobile .sns_btn img {
    width: 30px;
    height: 30px;
  }
}
