/* =========================
HEADER SECTION
========================= */
.header-section {
  font-family: "Black Han Sans", sans-serif;
  width: 100%;
  background: #000;

  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
}

/* =========================
구름 오브제
========================= */
.headercloud-left,
.headercloud-right {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
}

.headercloud-left {
  top: 0px;
  left: 45%;
  width: 240px;
  z-index: 100;
  transform: translateX(-862px);
}

.headercloud-right {
  position: absolute;
  top: 0px;
  left: 55%;
  width: 240px;
  z-index: 100;
  transform: translateX(622px);
}

/* =========================
HEADER
========================= */
.header {
  width: 100%;
  padding: 20px 50px;
  position: relative;
  z-index: 10;
  background: #000;
}

.header-inner {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 90px;
}

/* 햄버거 버튼 */
.menu-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.3s;
}

.menu-btn span {
  display: block;
  width: 28px;
  height: 2.5px;
  background: #fff;
  border-radius: 999px;
  transition: 0.3s ease-in-out;
}
.menu-btn:hover {
  opacity: 0.7;
}

.nav {
  display: flex;
  align-items: center;
}

.left-nav {
  gap: 70px;
}
.right-nav {
  gap: 70px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1;
  transition: color 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  width: 210px;
  display: block;
  object-fit: contain;
}

.user-btn {
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.3s;
}

.user-btn:hover {
  opacity: 0.7;
}

.mobile-menu-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.95);
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 5;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.mobile-menu-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  font-family: "Black Han Sans", sans-serif;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.menu-btn.open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* =========================
우측 하단 고정 CS & TOP 래퍼
========================= */
.customer-service-wrap {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: sans-serif;
  display: flex;
  flex-direction: column; /* 세로 정렬 구조 */
  gap: 15px; /* 버튼 간의 간격 */
}

/* 공통 고정 버튼 디자인 스타일 (TOP & CS 공통) */
.go-top-btn,
.cs-fixed-btn {
  width: 60px;
  height: 60px;
  background: #000;
  color: #fff;
  border: 2px solid #9b73fc;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.go-top-btn i,
.cs-fixed-btn i {
  font-size: 20px;
}

.go-top-btn span,
.cs-fixed-btn span {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* 개별 플로팅 애니메이션 적용 (시차를 줘서 리듬감 형성) */
.go-top-btn {
  animation: floatyTop 2s ease-in-out infinite;
}

.cs-fixed-btn {
  animation: floatyCS 2s ease-in-out infinite;
  animation-delay: 0.3s; /* 약간 늦게 움직이도록 딜레이 적용 */
}

/* 호버 효과 */
.go-top-btn:hover,
.cs-fixed-btn:hover {
  transform: scale(1.1);
  background: #9b73fc;
  border-color: #fff;
  animation-play-state: paused; /* 호버 시 둥실둥실 멈춤 */
}

/* 모달 대화창 (TOP 버튼이 생겼으므로 위치값 bottom 상향 조정) */
.cs-modal-box {
  position: absolute;
  bottom: 165px; /* 두 개의 버튼 위로 완벽하게 안착하도록 수정 */
  right: 0;
  width: 330px;
  min-height: 380px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.cs-modal-box.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* 모달 헤더 */
.cs-modal-header {
  background: #000;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.cs-modal-header h3 {
  font-size: 16px;
  margin: 0;
  font-family: "Black Han Sans", sans-serif;
  letter-spacing: 0.5px;
  flex-grow: 1;
  text-align: center;
}

.cs-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

/* 뒤로가기 버튼 */
.cs-back-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: none;
  transition: 0.2s;
}
.cs-back-btn:hover {
  color: #9b73fc;
}

.cs-modal-body {
  padding: 20px;
  position: relative;
}

/* 패널 스위칭 애니메이션용 구조 */
.cs-main-panel,
.cs-sub-panel {
  display: none;
  width: 100%;
}

.cs-main-panel.active,
.cs-sub-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.cs-greeting {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 20px;
}

.cs-greeting strong {
  color: #9b73fc;
  font-size: 18px;
}

/* 메뉴 리스트 */
.cs-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-menu-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  background: #f5f5f7;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  border-radius: 12px;
  transition: 0.2s;
}

.cs-menu-list li a i {
  color: #9b73fc;
  font-size: 16px;
}

.cs-menu-list li a:hover {
  background: #9b73fc;
  color: #fff;
}
.cs-menu-list li a:hover i {
  color: #fff;
}

/* 서브 패널 상세 스타일 */
.sub-panel-title {
  font-size: 16px;
  margin: 0 0 15px 0;
  color: #000;
  font-weight: bold;
  border-left: 4px solid #9b73fc;
  padding-left: 8px;
}

/* 자주 묻는 질문 아코디언 */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f7;
}

.faq-q {
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #f5f5f7;
  border: none;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
}

.faq-q:hover,
.faq-item.open .faq-q {
  background: #eeeafe;
  color: #9b73fc;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  background: #fff;
  transition: max-height 0.3s ease-out;
}

.faq-a p {
  padding: 12px;
  margin: 0;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  border-top: 1px solid #eeeafe;
}

/* 1:1 및 안내 상자 공통 */
.cs-info-box {
  background: #f5f5f7;
  padding: 18px;
  border-radius: 12px;
  text-align: center;
}

.cs-info-box p {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin-top: 0;
}

.cs-info-box .cs-time {
  font-size: 12px;
  color: #888;
  margin: 10px 0;
}

.cs-action-btn {
  width: 100%;
  padding: 12px;
  background: #9b73fc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 5px;
}

.cs-action-btn:hover {
  background: #7c52df;
}

/* =========================
개별 애니메이션 keyframes 정의
========================= */
@keyframes floatyTop {
  0% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
}

@keyframes floatyCS {
  0% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 반응형 헤더 모바일 구간 */
@media (max-width: 1280px) {
  .header {
    padding: 30px 30px;
  }
  .header-inner {
    gap: 50px;
  }
  .left-nav,
  .right-nav {
    gap: 40px;
  }
  .nav a {
    font-size: 17px;
  }
  .logo img {
    width: 170px;
  }
  .user-btn {
    font-size: 24px;
  }
  .headercloud-left,
  .headercloud-right {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .left-nav,
  .right-nav {
    display: none;
  }
  .header-inner {
    justify-content: space-between;
    gap: 0;
  }
  .header {
    padding: 24px 20px;
  }
  .logo img {
    width: 140px;
  }
  .user-btn {
    font-size: 22px;
  }
  .headercloud-left,
  .headercloud-right {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .customer-service-wrap {
    bottom: 20px;
    right: 20px;
  }
  .cs-modal-box {
    width: 290px;
    min-height: 360px;
    bottom: 155px; /* 모바일 전용 모달 하단 위치 보정 */
  }
}
