#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;

  border-bottom: 1px solid #166534;
}

#header.on {
  background: var(--white-color);
  border-bottom: 1px solid var(--line-color);
}

#header h1 {
  font-size: 3.2rem;
  font-weight: 800;
  white-space: nowrap;
  user-select: none;
}

/* PC 데스크탑 모드 (기존 크기 유지) */
#header h1 a {
  display: block;
  width: 300px;
  height: 50px;
  background: url(../images/logo_w.png) no-repeat left center/contain;
}

#header.on h1 a {
  background: url(../images/logo.png) no-repeat left center/contain;
}

/* 📱 여기에 모바일 전용 로고 제어 코드를 함께 묶어줍니다 */
@media (max-width: 1024px) {
  #header h1 a {
    height: 38px !important;
    width: 228px !important; /* 300:50 원본 비율을 유지하는 가로폭 */
    background-size: contain !important;
  }
  
  /* 모바일에서 로고가 줄어들 때 상단 바 전체 높이도 알맞게 줄여서 여백 보정 */
  #header .hd_wrap {
    height: 7rem !important; 
  }
  #header.on .hd_wrap {
    height: 7rem !important;
  }
}

#header .hd_wrap {
  display: flex;
  align-items: center;
  height: 12rem;

  transition: height 0.4s;
}

#header.on .hd_wrap {
  height: 9.8rem;
}

#header.on .sitemap svg {
  filter: invert();
}

#header .adm {
  position: relative;
  display: flex;
  gap: 2.4rem;

  margin-left: 12rem;

  color: var(--white-color);
}
#header.on .adm {
  color: var(--body-color);
}

#header .adm a {
  white-space: nowrap;
}

#header .adm svg {
  vertical-align: -2px;
  margin-right: 8px;
}

.adm a .icon {
  width: 1.4rem;
  height: 1.4rem;
  stroke-width: 2;
  stroke: var(--white-color);
}

#header.on .adm svg {
  filter: invert();
}

#header .gnb_container {
  display: flex;
  margin-left: auto;
}

#header .gnb {
  display: flex;
  align-items: center;
  margin-left: auto;
}

#header .gnb > ul {
  display: flex;
  gap: 4rem;
}

#header .gnb > ul > li > a {
  display: block;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 12rem;
  text-transform: uppercase;

  transition: line-height 0.4s;

  color: var(--white-color);

  white-space: nowrap;
}

#header.on .gnb > ul > li > a {
  line-height: 9.8rem;
  color: var(--body-color);
}

#header .gnb > ul > li {
  position: relative;
}

#header .gnb > ul > li ul {
  position: absolute;
  top: auto;
  left: 50%;
  z-index: 3;

  transform: translate(-50%, 0);
  background: var(--white-color);
  border: 1px solid var(--line-color);
  border-top: 2px solid var(--primary-color);

  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  transition: 0.2s;
}

#header .gnb > ul > li:hover ul {
  transform: translate(-50%, -16px);

  opacity: 1;
  visibility: visible;
}

#header .gnb > ul > li:focus-within ul {
  transform: translate(-50%, -16px);

  opacity: 1;
  visibility: visible;
}

#header .gnb > ul > li ul li a {
  display: block;
  padding: 0 4rem 0 2.4rem;
  line-height: 4rem;
  white-space: nowrap;

  min-width: 20rem;

  font-size: 1.4rem;

  white-space: nowrap;
}

#header.on .gnb > ul > li > a {
  line-height: 9.8rem;
  color: var(--body-color);
}

#header .gnb > ul > li ul li a:hover {
  background: var(--lightgray-color);
}

#header .gnb > ul > li ul li ~ li a {
  border-top: 1px solid var(--line-color);
}

.mbtn {
  display: none;
}

@media (max-width: 1024px) {
  .mbtn {
    display: flex;
    align-items: center;

    position: fixed;
    /* ⚠️ 기존 3.2rem에서 1.9rem으로 수정하여 위로 올렸습니다. */
    top: 1.9rem; 
    right: 1.6rem;
    z-index: 999;

    width: 32px;
    height: 32px;

    background: var(--lightgray-color);
    border: 1px solid var(--line-color);
    border-radius: 4px;
    /* background: rgba(255, 255, 255, 0.25); */
    font-size: 0;
  }
  /*여기에 추가*/
  /* 1. 메뉴 전체를 감싸는 내부 박스의 배경을 짙은 녹색으로 변경 */
    #header .gnb {
        background: #166534 !important;
        padding-top: 8rem !important; /* 상단 로고/버튼과의 여백 확보 */
    }

    /* 2. 대메뉴(1차 메뉴) 글자색을 화이트로 변경 */
    #header .gnb > ul > li > a {
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important; /* 구분선도 은은한 화이트로 보정 */
    }

    /* 스크롤이 내려간 상태(.on)에서도 대메뉴 글자색 화이트 강제 유지 */
    #header.on .gnb > ul > li > a {
        color: #ffffff !important;
    }

    /* 3. 소메뉴(2차 서브메뉴) 박스 및 글자색 정돈 */
    #header .gnb > ul > li ul {
        background: rgba(0, 0, 0, 0.15) !important; /* 서브메뉴 배경을 살짝 어둡게 해서 입체감 부여 */
    }

    #header .gnb > ul > li ul li a {
        color: rgba(255, 255, 255, 0.85) !important; /* 서브메뉴는 약간 부드러운 화이트 */
        background: transparent !important; /* 기존 회색 배경 제거 */
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; /* 서브메뉴 간 구분선 */
    }

    /* 서브메뉴에 마우스를 올리거나 터치했을 때 효과 */
    #header .gnb > ul > li ul li a:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* 하단에 있는 관리자/로그인 영역이 있다면 함께 화이트로 톤 맞춤 */
    #header .gnb .adm {
        color: #ffffff !important;
        border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

  .mbtn::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 4px;
    right: 4px;

    height: 2px;
    background: var(--body-color);
  }

  .mbtn.on::before {
    display: none;
  }

  .mbtn::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 4px;
    right: 4px;

    height: 2px;
    background: var(--body-color);
  }

  .mbtn.on::after {
    display: none;
  }

  .mbtn span::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 4px;
    right: 4px;

    height: 2px;
    background: var(--body-color);
  }

  .mbtn.on span::before {
    transform: rotate(45deg);
  }

  .mbtn span::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 4px;
    right: 4px;

    height: 2px;
    background: var(--body-color);
  }

  .mbtn.on span::after {
    transform: rotate(-45deg);
  }

  #header .gnb_container {
    position: fixed;
    top: 0;
    left: -100vw;
    z-index: 999;

    width: 100vw;
    height: 200vh;
    background: var(--white-color);

    background: rgba(0, 0, 0, 0.75);
  }

  #header .gnb_container.on {
    left: 0;
  }

  #header .gnb {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 4rem;
    padding: 12rem 2.4rem 0 2.4rem;

    width: calc(100vw - 6.4rem);
    height: auto;
    background: var(--white-color);
  }

  #header .gnb > ul {
    display: flex;
    flex-direction: column;
    gap: 0;

    border-top: 1px solid var(--primary-color);
  }

  #header .gnb > ul > li > a {
    line-height: 5.6rem;
    border-bottom: 1px solid var(--line-color);
    color: var(--body-color);
    font-weight: 500;
    font-size: 1.8rem;
  }

  #header.on .gnb > ul > li > a {
    line-height: 5.6rem;
    color: var(--body-color);
  }

  #header .gnb > ul > li {
    position: relative;
  }

  #header .gnb > ul > li ul {
    position: static;
    top: 12rem;
    left: 50%;
    z-index: 3;

    transform: translate(0, 0);
    background: var(--white-color);
    border: 0 solid var(--lightgray-color);

    opacity: 1;
    visibility: visible;

    transition: none;

    display: none;
  }

  #header .gnb > ul > li:hover ul {
    transform: translate(0, 0);

    opacity: 1;
    visibility: visible;

    display: none;
  }

  #header .gnb > ul > li:focus-within ul {
    transform: translate(0, 0);

    opacity: 1;
    visibility: visible;

    display: none;
  }

  #header .gnb > ul > li ul li a {
    display: block;
    padding: 0 0 0 0.8rem;
    line-height: 4rem;
    white-space: nowrap;

    background: var(--lightgray-color);
  }

  #header .gnb > ul > li ul li ~ li a {
    border-top: 0px solid var(--line-color);
  }

  #header .gnb > ul > li ul li a {
    border-bottom: 1px solid var(--line-color);
  }

  #header .adm {
    order: -1;
    position: relative;
    display: flex;
    gap: 2.4rem;

    margin-left: 0;

    color: var(--body-color);
    padding: 1.6rem 0;
    border-top: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
  }

  #header.on .adm {
    color: var(--body-color);
  }

  #header .adm svg {
    vertical-align: -2px;
    margin-right: 8px;
    filter: invert();
  }
  #header.on .adm svg {
    filter: invert();
  }
}

.sub_title {
  position: relative;

  background-color: var(--primary-color);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* border-left: 4px solid var(--point-color); */
  /* border-top: 4px solid var(--point-color); */
  text-transform: uppercase;

  color: var(--white-color);
  /* border-radius: 4rem 0 0 0; */
  overflow: hidden;

  min-height: 48rem;
}

.sub_title::before {
  content: "";
  position: absolute;
  inset: 0 0 0 0;
  z-index: 2;
  background: linear-gradient(rgba(0, 0, 0, 0.4) 40%, transparent);
  backdrop-filter: blur(16px);

  animation: blur 0.4s both;
}

@keyframes blur {
  0% {
    backdrop-filter: blur(16px);
  }
  100% {
    backdrop-filter: blur(0);
  }
}

.sub_title::after {
  content: "";
  position: absolute;
  inset: 0 0 0 0;
  z-index: 3;
  background: url(../images/pt-bg01.png);
}

.sub_title .title {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, calc(-50% + 4rem));
  margin: 0 0;
  width: calc(100% - 3.2rem);
  text-align: right;
  margin-bottom: 0;
}

.sub_title .title h2 {
  font-size: 8rem;
  font-weight: 800;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
.sub_title .title p {
  margin-top: 1.6rem;
  font-size: 1.8rem;
  font-weight: 300;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .sub_title .title h2 {
    font-size: 4.8rem;
  }
}

.sub_nav {
  position: relative;
  z-index: 5;
  margin-bottom: 8rem;

  background: var(--white-color);
  border-bottom: 1px solid var(--line-color);

  line-height: 6.4rem;
}

.sub_nav .inner {
  display: flex;
  justify-content: space-between;
}

.sub_nav .lnb ul {
  display: flex;
  justify-content: flex-end;
  gap: 0;
}

.sub_nav .lnb ul a {
  display: block;
  background: var(--white-color);

  white-space: nowrap;

  padding: 0 4rem;
}

.sub_nav .lnb ul li ~ li {
  border-left: 1px solid var(--line-color);
}

.sub_nav .lnb ul li.on a {
  border-top: 4px solid #166534;
  margin-top: -4px;
}

.sub_nav .navigation {
  font-size: 1.4rem;
}

.sub_nav .lnb > a {
  display: none;
}

@media (max-width: 1200px) {
  .sub_nav .navigation {
    display: none;
  }
}

@media (max-width: 768px) {
  .sub_nav {
    position: relative;
    margin: 0 1.6rem;
    margin-top: -4rem;
    margin-bottom: 8rem;

    background: var(--white-color);
    border: 1px solid var(--line-color);
    border-top: 4px solid var(--primary-color);
    line-height: 6.4rem;
  }
  .sub_nav .inner {
    display: block;
    margin: 0 0;
  }

  .sub_nav .lnb ul {
    display: none;
  }

  .sub_nav .lnb > a {
    position: relative;
    display: block;
    padding: 0 1.6rem;

    font-size: 2.2rem;
  }

  .sub_nav .lnb > a::after {
    content: "";
    position: absolute;
    top: 50%;

    transform: translate(0, -50%);
    right: 1.6rem;
    width: 24px;
    height: 24px;

    background: url(../lib/icon/chevron-down.svg) no-repeat center center/22px;
    opacity: 0.5;
  }

  .sub_nav .lnb > a.on::after {
    background: url(../lib/icon/chevron-up.svg) no-repeat center center/22px;
  }

  .sub_nav .lnb ul li ~ li {
    border-left: 0px solid var(--line-color);
  }
  .sub_nav .lnb ul li {
    border-top: 1px solid var(--line-color);
  }

  .sub_nav .lnb ul a {
    display: block;
    /* background: var(--white-color); */
    background: var(--background-color);
    white-space: nowrap;

    padding: 0 0;
    padding: 0 1.6rem;
  }

  .sub_nav .lnb ul li.on a {
    border-top: 0px solid var(--point-color);
    margin-top: 0px;
  }
}

.sub_content {
  margin-top: 8rem;
  margin-bottom: 12rem;
}

.sub_content .page_title {
  margin-bottom: 2.4rem;
}

.sub_content .page_title h3 {
  position: relative;
  padding: 1.6rem 0;
  /* border-bottom: 1px solid var(--line-color); */
  white-space: nowrap;
}

.sub_content .page_title h3::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;

  width: 12rem;
  height: 1px;

  background: var(--primary-color);
}

.sub_content .page_title h3 strong {
  font-size: 4rem;
  font-weight: 700;
}

@media (max-width: 1440px) {
}

.sub_content .content p {
  font-size: 1.7rem;
  line-height: 2.4rem;
  opacity: 0.9;
}

.sub_content .content .sub_title_desc {
  line-height: 1.5;
  margin-bottom: 5.6rem;
}

#footer {
  padding: 4rem 0 5.6rem 0;
  background: #166534;
  color: var(--lightgray-color);
  /* border-top: 1px solid var(--line-color); */

  font-size: 1.5rem;
  line-height: 2.4rem;
}

#footer .lnk {
  margin-bottom: 5.6rem;
  padding: 5.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#footer .lnk > ul {
  display: flex;
  gap: 8rem;
}

#footer .lnk > ul > li > a {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.6rem;
}

#footer .lnk > ul ul a {
  display: block;
  line-height: 1.5;
}

#footer .customer_list {
  display: flex;
  gap: 1.6rem;

  margin-bottom: 1.6rem;
}

@media (max-width: 768px) {
  #footer .lnk {
    display: none;
  }

  #footer .customer_list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }
}

#footer .inner {
  display: flex;
  flex-direction: column;
  /* justify-content: center;
  align-items: center; */
  gap: 8px;
}

#footer .info {
  display: flex;
  gap: 2.4rem;
}

#footer .info li {
  position: relative;
  /* text-align: center; */
  white-space: nowrap;
}

#footer .info li ~ li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -12px;

  transform: translate(0, -50%);

  width: 1px;
  height: 0.5em;

  background: #ccc;
}

@media (max-width: 768px) {
  #footer .info {
    flex-direction: column;
    gap: 0;
  }

  #footer .info li ~ li::before {
    display: none;
  }
}

.to_top {
  position: fixed;
  left: 50%;
  bottom: 18rem;
  z-index: 998;

  transform: translate(-50%, 0);

  max-width: calc(1610px + 160px);
  width: 100%;

  opacity: 0;
  visibility: hidden;

  transition: 0.5s;
}

.to_top button {
  position: absolute;
  right: 0;
  width: 4rem;
  height: 4rem;

  background: #166534;

  border-radius: 50%;
}

.to_top button svg {
  margin-top: 2px;
}

.to_top .icon {
  width: 2rem;
  height: 2rem;
  stroke-width: 2;
  stroke: #ffff;
}

.to_top.on {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .to_top {
    position: fixed;
    left: auto;
    right: -1.6rem;
    bottom: 14rem;

    width: auto;
  }

  .to_top.on {
    right: 1.6rem;
  }
}
