/* Light 테마(기본) */
:root {
  --bg-main: #f5f5fb;
  --bg-panel: #ffffff;
  --bg-panel-soft: #eef1fb;

  --border-soft: #d1d5e5;

  --accent: #0d9f6a;
  --accent-soft: rgba(13, 159, 106, 0.12);
  --accent-text: #064e3b;

  --text-main: #111827;
  --text-sub: #4b5563;
  --text-muted: #9ca3af;

  --danger: #e02424;

  --radius-lg: 8px;
  --radius-xl: 12px;
}

/* Dark 테마 */
:root[data-theme='dark'] {
  --bg-main: #0b0f17;
  --bg-panel: #121822;
  --bg-panel-soft: #1a2230;

  --border-soft: #273043;

  --accent: #3ed6a6;
  --accent-soft: rgba(62, 214, 166, 0.12);
  --accent-text: #c8ffe9;

  --text-main: #f3f5fa;
  --text-sub: #a8b0c0;
  --text-muted: #738096;

  --danger: #ff6b6b;
}

/* 기본 배경 */

* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', system-ui,
    sans-serif;
  background: radial-gradient(
    circle at top,
    #ffffff 0,
    #f3f4ff 40%,
    #e5e7f5 100%
  );
  color: var(--text-main);
}

[data-theme='dark'] body {
  background: radial-gradient(
    circle at top,
    #1c2330 0,
    #050608 50%,
    #020307 100%
  );
  color: var(--text-main);
}

/* NAVBAR */

.navbar {
  padding: 4px 12px !important;
  height: 90px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(135deg, #ffffff, #e7ebff);
}

[data-theme='dark'] .navbar {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 로고 */
.navbar-brand img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* 다크 모드용 로고 이미지/사이즈 */
:root[data-theme='dark'] .navbar-brand img {
  height: 70px;
  content: url('/assets/images/logo_dark.png');
}

.navbar-nav {
  gap: 1.2rem;
}

.navbar .nav-link {
  color: var(--text-sub) !important;
  padding: 7px 14px !important;
  border-radius: 999px;
  transition: 0.15s;
  font-size: 0.96rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: var(--accent-soft) !important;
  color: var(--accent-text) !important;
}

/* 상단 오른쪽 아이콘 버튼 */
.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: 0.15s;
}

.nav-icon-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(31, 179, 138, 0.4);
}

.nav-icon-btn svg {
  stroke: var(--text-sub);
  transition: 0.15s;
}

.nav-icon-btn:hover svg {
  stroke: var(--accent);
}

/* FOOTER */

.footer-bg {
  background: #f3f4ff;
  color: var(--text-sub);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme='dark'] .footer-bg {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bg .nav-link {
  color: var(--text-sub);
  font-size: 0.9rem;
}

.footer-bg .nav-link:hover {
  color: var(--accent-text) !important;
}

.footer-bg p {
  color: #9ca3b5;
  font-size: 0.88rem;
}

/* 모바일 하단 네비 */

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  background: #ffffff;
  border-top: 1px solid rgba(148, 163, 209, 0.6);
  display: none;
  z-index: 1030;
}

[data-theme='dark'] .mobile-bottom-nav {
  background: rgb(29, 29, 36);
  border-top: 1px solid rgb(107, 116, 145);
}

.mobile-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-nav-item:focus {
  outline: none;
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.mobile-nav-icon svg {
  width: 24px;
  height: 24px;
}

.mobile-nav-label {
  line-height: 1;
  font-size: 11px;
}

/* 선택된 탭 하이라이트 */
.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item.active .mobile-nav-icon svg {
  stroke: var(--accent);
}

/* 모바일에서만 보이게 */
@media (max-width: 1023px) {
  .mobile-bottom-nav {
    display: flex;
    height: 60px;
    border-top: 1px solid rgba(148, 163, 209, 0.4);
    padding-bottom: env(safe-area-inset-bottom);
  }

  body {
    padding-bottom: calc(61px + env(safe-area-inset-bottom));
  }
}
.mobile-nav-item--home .mobile-nav-label {
  display: none !important;
}

.mobile-nav-home-logo {
  width: 60px; /* 약간 작게 잡고 내부 로고 크게 → 더 깔끔 */
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent !important; /* 배경 제거 */
  box-shadow: none !important; /* 그림자 제거 */
}

[data-theme='dark'] .mobile-nav-home-logo {
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav-home-logo img {
  width: 60px;
  height: auto;
  display: block;
}
/* OFFCANVAS 모바일 메뉴 */

#mobileMenu.offcanvas-end {
  width: 60vw;
  max-width: 360px;
}

@media (max-width: 1023px) {
  #mobileMenu .offcanvas-body .nav-item {
    width: 100%;
  }

  #mobileMenu .offcanvas-body .btn,
  #mobileMenu .offcanvas-body button:not(.offcanvas-exit-btn) {
    width: 100%;
  }
}

/* 메뉴 항목 스타일 */
#mobileMenu .nav-link {
  color: var(--text-sub) !important;
  padding: 10px 0;
  border-radius: 8px;
  transition: 0.15s;
}

#mobileMenu .nav-link:hover,
#mobileMenu .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-text) !important;
}

[data-theme='dark'] #mobileMenu #mobileLoginButton {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

[data-theme='dark'] #mobileMenu #mobileLoginButton:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme='dark'] #mobileMenu.offcanvas {
  background: rgba(29, 31, 35, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] #mobileMenu .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme='dark'] #mobileMenu .offcanvas-title {
  color: var(--text-main);
  font-weight: 600;
}

[data-theme='dark'] #mobileMenu .btn-close {
  filter: invert(80%);
  opacity: 0.8;
}

[data-theme='dark'] #mobileMenu .btn-close:hover {
  opacity: 1;
}

[data-theme='dark'] #mobileMenu .offcanvas-exit-btn {
  color: var(--text-muted);
  opacity: 0.85;
}

[data-theme='dark'] #mobileMenu .offcanvas-exit-btn:hover {
  color: var(--accent);
  opacity: 1;
}

/* 구분선 & 나가기*/
.offcanvas-exit-divider {
  width: 100%;
  height: 1px;
  margin: 14px 0;
  background: rgba(148, 163, 209, 0.4);
}

[data-theme='dark'] .offcanvas-exit-divider {
  background: rgba(148, 163, 209, 0.25);
}

.offcanvas-menu-list > .offcanvas-exit-divider {
  margin-top: 10px;
  margin-bottom: 12px;
}

/* 나가기 */
.offcanvas-exit-wrapper {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 14px);

  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.offcanvas-exit-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;

  background: none;
  border: none;
  padding: 6px 8px;

  color: var(--text-muted);
  font-size: 15px;

  cursor: pointer;
  transition: 0.15s;
}

.offcanvas-exit-btn:hover {
  color: var(--accent);
}

.exit-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

:root[data-theme='dark'] #mobileMenu .exit-img {
  content: url('/assets/images/exit_dark.png');
}

.exit-text {
  font-size: 15px;
}
.navbar.navbar-expand-lg .navbar-toggler {
  display: flex !important; /* 또는 inline-flex */
  align-items: center;
  justify-content: center;
}
#mobileMenu .offcanvas-body {
  text-align: center;
}

#mobileMenu .offcanvas-body .nav-link {
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}
/* 푸터 링크: 고객지원 / 개인정보처리방침 / 이용약관 */
.footer-link-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end; /* PC 기본: 오른쪽 정렬 */
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-link-item,
.footer-link-sep {
  display: inline-flex;
  align-items: center;
}

.footer-link {
  font-size: 0.88rem;
  color: #9ca3b5;
  text-decoration: none;
}

.footer-link:hover {
  color: #767c86;
}

/* 구분선 | 스타일 */
.footer-link-sep {
  font-size: 0.95rem;
  color: #b7bccbaf;
  padding: 0 6px;
}

/* PC 기본 레이아웃 (1024px 이상) */
.footer-copy-col {
  text-align: left; /* © 왼쪽 */
}

.footer-links-col {
  display: flex;
  justify-content: flex-end; /* 링크 오른쪽 */
}

/* 모바일 + 태블릿 (0 ~ 1023px) */
@media (max-width: 1023px) {
  /* 로고 숨김 */
  .footer-logo {
    display: none !important;
  }
  .footer-logo-col {
    margin-bottom: 0 !important;
  }

  /* © 중앙 정렬 */
  .footer-copy-col {
    text-align: center !important;
    margin-bottom: 4px !important;
  }

  /* 링크 줄 중앙 정렬 */
  .footer-links-col {
    justify-content: center !important;
  }

  /* 링크 리스트 자체도 중앙 정렬(혹시 모를 덮어쓰기 방지) */
  .footer-link-list {
    justify-content: center !important;
  }
}
