/* ========================
   header 공통
   ======================== */
#header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: #fff;
  transition: box-shadow .3s;
}

#header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

/* ========================
   header_top : 유틸 메뉴
   (기업소개 | 운전자금사례 | 시설자금사례 / 상담접수하기 / 단순상담신청)
   ======================== */
.header_top {
  border-bottom: 1px solid #eeeeee;
}

.header_top {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 30px;
}

.header_top .right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.util_menu {
  display: flex;
  gap: 0 16px;
}

.util_menu li {
  position: relative;
  padding-right: 16px;
  color: #555555;
  cursor: pointer;
  transition: color .3s;
}

.util_menu li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background-color: #D7D7D7;
}

.util_menu li:hover {
  color: var(--blue);
}

.util_btns {
  display: flex;
  align-items: center;
  gap: 0 20px;
}

.util_btn {
  display: flex;
  align-items: center;
  gap: 0 6px;
  color: #222;
}

.util_btn i {
  font-size: 16px;
}

/* ========================
   header_main : 로고 + 메인메뉴 + 전체보기 버튼
   ======================== */
.header_main {
  border-top: 1px solid #D7D7D7;
}

.header_main .main_center {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
}

.main_menu {
  display: flex;
  gap: 0 50px;
}

.main_menu>li {
  width: max-content;
}

.main_menu>li>a {
  color: #222222;
  transition: color .3s;
}

.main_menu>li>a:hover,
.main_menu>li>a.on {
  color: var(--blue);
}

.menu_box {
  display: flex;
  align-items: center;
}

/* ========================
   main_menu 호버 드롭다운 (메가메뉴)
   ======================== */
/* ========================
   main_menu 호버 드롭다운 (메가메뉴)
   ======================== */
.main_menu>li.has_dropdown {
  position: static;
}

.mega_menu {
  position: fixed;
  top: 160px;
  left: 0;
  width: 100%;
  max-height: calc(100vh - 10%);
  min-height: 400px;
  overflow-y: auto;
  display: flex;
  background-color: #fff;
  border-top: 1px solid #eeeeee;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 900;
}

.main_menu>li.has_dropdown:hover .mega_menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 왼쪽 남색 소개 박스 */
.mega_left {
  flex: 0 0 35%;
  background-color: var(--blue);
  background-image: url(../images/mega_wave.png);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: cover;
  padding: 60px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.mm_title {
  color: #fff;
  margin-bottom: 16px;
}

.mm_desc {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* 중간 현재 카테고리 라벨 */
.mega_current {
  flex: 0 0 20%;
  padding: 60px 30px;
  display: flex;
  align-items: flex-start;
  gap: 0 10px;
  border-right: 1px solid #eeeeee;
  box-sizing: border-box;
}

.mm_current_text {
  color: var(--blue);
}

.mm_current_dash {
  width: 30px;
  height: 2px;
  margin-top: 12px;
  background-color: var(--blue);
  flex-shrink: 0;
}

.mm_current_dot {
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background-color: #F37321;
  flex-shrink: 0;
}

/* 오른쪽 하위 링크 리스트 */
.mega_list {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px 0;
  box-sizing: border-box;
}

.mega_list li {
  color: #222222;
  cursor: pointer;
  transition: color .3s;
  width: max-content;
}

.mega_list li:hover {
  color: var(--blue);
}

.all_menu_btn {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 0 14px;
  padding: 0 20px 0 24px;
  background-color: var(--blue);
  color: #fff;
  border: 0;
  cursor: pointer;
}

.st_icon {
  position: relative;
  width: 20px;
  height: 14px;
  flex-shrink: 0;
}

.st_icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
}

.st_icon span:nth-child(1) {
  top: 0;
}

.st_icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.st_icon span:nth-child(3) {
  bottom: 0;
}

/* ========================
   sitemap 배경
   ======================== */
span.full_bg1 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;

}

span.full_bg1.on {
  opacity: 1;
  visibility: visible;
}

/* ========================
   sitemap 메가메뉴
   ======================== */
.sitemap {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: #fff;
  z-index: 999;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 60px calc(5% + 40px);
  transition: right .4s ease;
}

.sitemap.show {
  right: 0;
}

.sitemap_bg {
  position: absolute;
  top: 0;
  left: 0;
  line-height: 1;
  z-index: -1;
  user-select: none;
}

.sitemap_bg2 {
  position: absolute;
  bottom: -20%;
  right: 0;
  line-height: 1;
  z-index: -1;
  user-select: none;
}

.close_btn {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 40px;
}

.close_btn i {
  color: var(--blue);
  cursor: pointer;
}

.st_wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.st_row {
  display: flex;
  align-items: flex-start;
  gap: 0 60px;

  border-bottom: 1px solid #000000;
}

.st_row:first-child {
  border-top: 1px solid #000000;
  padding-top: 0;
}

.st_row:last-child {
  border-bottom: none;
}

.st_cate {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 30px 0 0 24px;
  box-sizing: border-box;
}

.cate_dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--blue);
  flex-shrink: 0;
}

.st_cate p {
  color: #222222;
  line-height: 1.3;
  cursor: pointer;
  transition: color .3s;
}

.st_cate p:hover {
  color: var(--blue);
}

.st_groups {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.st_group {
  display: flex;
  align-items: flex-start;
  border: 1px solid #D7D7D7;
  border-left: none;
  border-right: none;
  background-color: #F6FAFF;


}

.st_group:first-child {
  border-top: none;
}

.group_tit {
  width: 220px;
  padding: 25px;
  flex-shrink: 0;
  color: var(--blue);
  box-sizing: border-box;
}

.group_links {
  background-color: #fff;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.group_links li {
  color: #666666;
  cursor: pointer;
  transition: color .3s;
  margin-left: 20px;
  padding: 25px 0;
  box-sizing: border-box;
}

.group_links li::before {
  content: '·';
  margin-right: 6px;
  color: #222;
}

.group_links li:hover {
  color: var(--blue);
}

/* ========================================================
   반응형 - 태블릿 (768px ~ 1024px)
======================================================== */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    .header_top {
        height: auto;
        padding: 16px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px 0;
    }

    .header_top .right {
        flex-direction: row;
        align-items: center;
        gap: 0 20px;
        flex-wrap: wrap;
    }

    .main_menu {
        display: none !important;
    }

    .header_main .main_center {
        height: 70px;
    }

    .all_menu_btn {
        height: 48px;
        padding: 0 16px 0 20px;
    }

    /* 사이트맵 */
    .sitemap {
        padding: 40px 30px;
    }

    .st_row {
        flex-direction: column;
        gap: 0;
    }

    .st_cate {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 20px 0;
    }

    .group_tit {
        width: 160px;
        padding: 20px;
    }

    .group_links {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ========================================================
   반응형 - 모바일 (~767px)
   ※ main_menu/mega_menu는 숨기고, 이미 있는 .sitemap(전체보기)을
     모바일 네비게이션으로 그대로 활용 (호버 메뉴는 모바일에서 의미 없음)
======================================================== */
@media screen and (max-width: 767px) {

    /* ---- header_top : 유틸메뉴+버튼 세로 스택 ---- */
    .header_top {
        height: auto;
        padding: 12px 0;
        flex-direction: column;
        align-items: center;
        gap: 10px 0;
    }

    .header_top .right {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 8px 0;
    }

    .util_menu {
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .util_btns {
        width: 100%;
        justify-content: center;
        gap: 0 16px;
    }

    /* ---- header_main : 로고 + 전체보기 버튼만 남김 (메인메뉴는 숨김) ---- */
    .header_main .main_center {
        height: 60px;
        overflow-x: auto;
        gap: 15px;
    }

    .logo img {
        max-height: 32px;
        width: auto;
    }

    .main_menu {
        gap: 15px;
    }

    .mega_menu {
        display: none !important;
    }

    .all_menu_btn {
        height: 40px;
        padding: 0 14px 0 16px;
        gap: 0 8px;
    }

    .st_icon {
        width: 16px;
        height: 12px;
    }

    /* ---- sitemap : 전체보기 오버레이를 모바일 전체 네비게이션으로 ---- */
    .sitemap {
        padding: 30px 20px;
    }

    .close_btn {
        margin-bottom: 24px;
    }

    .st_wrap {
        gap: 0;
    }

    /* 카테고리(운전자금/시설자금 등)와 그룹 리스트 세로 스택 */
    .st_row {
        flex-direction: column;
        gap: 0;
    }

    .st_cate {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0 8px;
        padding: 16px 0;
    }

    .st_groups {
        width: 100%;
    }

    .st_group {
        flex-direction: column;
        align-items: flex-start;
    }

    .group_tit {
        width: 100%;
        padding: 14px 16px;
    }

    /* 하위 링크는 3열 그리드 → 1열로, 모바일에서 자연스럽게 세로 나열 */
    .group_links {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .group_links li {
        padding: 12px 16px;
        margin-left: 0;
    }

    /* 배경 장식 이미지는 좁은 화면에서 텍스트를 방해하니 숨김 */
    .sitemap_bg,
    .sitemap_bg2 {
        display: none;
    }
}