/* 공통 레이아웃 - 헤더 */

header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 20px 20px;

}

.header-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  /* 가운데 정렬되는 GNB 기준 컨테이너 */
}


.header-logo img {
  display: block;
  height: 45px;
}

/* GNB - 화면 기준 가운데 정렬 */
.header-gnb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gnb {
  display: flex;
  align-items: center;
  gap: 40px;
}

.gnb>li {
  position: relative;

}

.gnb>li>a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  font-family: 'KOROAD_Bold';
}

.gnb>li.on>a,
.gnb>li:hover>a {
  color: #ff5c3b;
  border-color: #ff5c3b;
}

/* 드롭다운 (2뎁스) */
.gnb-depth2 {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  margin-top: 0;
  padding: 24px 40px;
  border-radius: 24px;
  border: 2px solid #ff5c3b;
  background: linear-gradient(to bottom, #ffffff 0%, #fff7f1 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  display: none;
  /* 기본은 숨김, JS에서 .open 클래스로 제어 */
  text-align: center;
  z-index: 1;
}

/* 드롭다운 상단 삼각형 제거 (디자인 단순화) */
.gnb-depth2::before {
  content: none;
}

.gnb-depth2 li {
  list-style: none;
}

.gnb-depth2 li+li {
  margin-top: 16px;
}

.gnb-depth2 a {
  display: block;
  padding: 0;
  font-size: 15px;
  color: #666666;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.gnb-depth2 li:first-child a {
  font-weight: 600;
  color: #ff5c3b;
}

.gnb-depth2 a:hover {
  color: #ff5c3b;
}

.gnb>li.open>a {
  color: #ff5c3b;
  border-color: #ff5c3b;
}

.gnb>li.open .gnb-depth2 {
  display: block;
}

/* 우측 로그인 버튼 */
.header-util {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-util.mobile-only {
  display: none;
}

.header-util.pc-only {
  display: flex;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 30px;
  border-radius: 50px;
  background: #ff5c3b;
  color: #ffffff;
  font-weight: 600;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  box-shadow: 0 8px 16px rgba(255, 92, 59, 0.35);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'KOROAD_Medium';
}

.btn-login:hover {
  background: #ff3f1a;
}

footer {
  background-color: #fff;
  padding: 50px 0;
}

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

footer .infoBox .mn {
  gap: 0 20px;
  font-family: 'KOROAD_Bold';
}

footer .infoBox .mn li:first-child a {
  color: var(--primary);

}

footer .infoBox .info {
  gap: 0 40px;
  margin: 20px 0;
}

footer .infoBox .info li {
  color: #999;
  position: relative;
}

footer .infoBox .info li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background-color: #ddd;
}

/* TOP 버튼 */
.top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(234, 85, 41, 0.4);
  transition: all 0.3s ease;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'KOROAD_Bold', 'Pretendard', sans-serif;
}

.top-btn:hover {
  background: #d9441a;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(234, 85, 41, 0.5);
}

.top-btn .top-icon {
  width: 20px;
  height: auto;
  display: block;
  margin-bottom: 2px;
  margin-top: -10px;
}

.top-btn .top-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}


/* 햄버거 메뉴 버튼 */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  position: relative;
}

/* 모바일 메뉴 닫기 버튼 (기본 숨김) */
.btn-menu-close {
  display: none;
}

.btn-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.btn-hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.btn-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.btn-hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.btn-results {
  position: fixed;
  top: 30%;
  right: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  padding: 30px 20px;
  background: #fff;
  border: 6px solid var(--primary);
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-results:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(234, 85, 41, 0.3);
}

.btn-results p {
  font-weight: 400;
}

.btn-results h3 {
  font-size: 24px;
  color: var(--primary);
  margin: 0 0 20px 0;
  font-weight: 700;
  font-family: 'KOROAD_Bold', 'Pretendard', sans-serif;
}

.btn-results img {
  width: 120px;
  height: auto;
  animation: pigSway 2s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes pigSway {

  0%,
  100% {
    transform: rotate(-3deg);
  }

  50% {
    transform: rotate(3deg);
  }
}




@media (max-width: 960px) {
  .header-inner {
    padding: 12px 16px;
  }

  .gnb {
    gap: 24px;
  }

  .header-logo-text {
    display: none;
  }
}

/* 태블릿/모바일 반응형 (1024px 이하) */
@media screen and (max-width: 1024px) {

  /* 햄버거 메뉴 버튼 표시 */
  .btn-hamburger {
    display: flex;
  }

  /* GNB 숨김 - 모바일에서는 사이드 메뉴로 */
  .header-gnb {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 101;
    padding: 80px 30px 30px;
    overflow-y: auto;
    transform: none !important;
  }

  .header-gnb.active {
    right: 0 !important;
  }

  /* 모바일 메뉴 닫기 버튼 */
  .btn-menu-close {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0;
  }

  .btn-menu-close span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
  }

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

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

  .btn-menu-close:hover span {
    background: var(--primary);
  }

  .gnb {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .gnb>li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .gnb>li>a {
    display: block;
    padding: 20px 0;
    width: 100%;
    border-bottom: none;
    font-size: 18px;
  }

  /* 드롭다운 메뉴 모바일 스타일 */
  .gnb-depth2 {
    position: static;
    transform: none;
    border: none;
    background: #f8f9fa;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    display: none;
    width: 100%;
  }

  .gnb>li.open .gnb-depth2 {
    display: block;
  }

  .gnb-depth2 li {
    border-bottom: 1px solid #eee;
  }

  .gnb-depth2 li:last-child {
    border-bottom: none;
  }

  .gnb-depth2 li+li {
    margin-top: 0;
  }

  .gnb-depth2 a {
    padding: 15px 20px;
    font-size: 16px;
    color: #666;
  }

  .gnb-depth2 li:first-child a {
    color: #666;
    font-weight: 400;
  }

  /* PC 로그인 버튼 숨김 */
  .header-util.pc-only {
    display: none;
  }

  /* 모바일 로그인 버튼 표시 */
  .header-util.mobile-only {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #eee;
    justify-content: center;
  }

  .header-gnb .header-util.mobile-only .btn-login {
    width: 100%;
    max-width: 260px;
  }

  /* 모바일 메뉴 오버레이 */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    pointer-events: none;
  }

  body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* body 스크롤 잠금 */
  body.menu-open {
    overflow: hidden;
  }
}





@media screen and (max-width: 1024px) {
  .top-btn {
    width: 55px;
    height: 55px;
    bottom: 25px;
    right: 25px;
  }

  .top-btn .top-icon {
    width: 18px;
  }

  .top-btn .top-text {
    font-size: 10px;
  }

  footer .inner {
    flex-direction: column;
    gap: 20px;
  }

  footer .infoBox .info {
    flex-direction: column;
    gap: 10px;
    align-items: baseline;
  }

  footer .infoBox .info li:not(:last-child)::after {
    display: none;
  }

}

/*E:1024*/


@media screen and (max-width: 768px) {
  .top-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .top-btn .top-icon {
    width: 16px;
  }

  .top-btn .top-text {
    font-size: 9px;
  }

  .btn-results img {
    width: 50px;
  }

}

/*E:768*/

@media screen and (max-width: 640px) {
  .top-btn {
    width: 45px;
    height: 45px;
  }

  .header-logo img {
    height: 35px;
  }

  .btn-results {
    width: 100px;
    padding: 10px;
    top: 65%;
  }

  .btn-results p {
    display: none;
  }

  .btn-results h3 {
    font-size: 1rem;
  }


}

/*E:640*/

@media screen and (max-width: 480px) {
  .top-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .top-btn .top-icon {
    width: 14px;
  }

  .top-btn .top-text {
    font-size: 9px;
  }
}

/*E:480*/