/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 101;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: center;
  /* transition: background-color 0.3s ease, backdrop-filter 0.3s ease; */
  background-color: white;
}

.header.scroll-active {
  background-color: white;
  /* background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px); */
}

.header-inner {
  width: 100%;
  /* height: 48px; */
  display: flex;
  margin: 0 20px;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  height: 100%;
  z-index: 10;
}

/* Navigation */
.header-nav {
  display: none;
  gap: 20px;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.header-nav a {
  font-size: var(--font-b2);
  font-weight: var(--font-weight-semibold);
  color: var(--black);
  transition: color var(--transition-fast);
}

/* CTA Button */
.header-cta {
  display: none;
  width: 195px;
  height: 44px;
}

.header-cta .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  background-color: var(--brand-primary);
  color: black;
  border-radius: 1000px;
  font-size: var(--font-b4);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  transition: all 0.3s ease;
  height: 100%;
}

.header-cta .btn:hover {
  background-color: var(--brand-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.header-cta .btn:active {
  transform: translateY(0);
}

/* Mobile Menu Toggle */
.header-mobile-toggle {
  display: flex;
  width: 24px;
  height: 100%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 10;
}

.header-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--black);
  position: relative;
  transition: all var(--transition-base);
}

.header-mobile-toggle span::before,
.header-mobile-toggle span::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--black);
  left: 0;
  transition: all var(--transition-base);
}

.header-mobile-toggle span::before {
  top: -6px;
}

.header-mobile-toggle span::after {
  bottom: -6px;
}

.header.modal-open-active {
  background-color: white;
  /* 모달이 열린 상태에서는 스크롤 액티브와 무관하게 흰색 배경을 강제합니다. */
}

/* Mobile Menu Toggle Active (X로 변경) */
.header-mobile-toggle.active span {
  background-color: transparent;
}

.header-mobile-toggle.active span::before {
  top: 0;
  transform: rotate(45deg);
}

.header-mobile-toggle.active span::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* =====모바일 메뉴 모달 (Side Modal)===== */
/* Dim 처리 오버레이 */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* 모달 본체 */
/* mobile-menu-modal CSS 수정 */
.mobile-menu-modal {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  top: -560px;
  width: 100%;
  height: 543px;
  background: white;
  z-index: 101;
  transition: top 0.5s ease;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* 모달이 활성화될 때 */
.mobile-menu-modal.active {
  top: 60px;
}

/* 닫기 버튼 스타일 */
.menu-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #333;
  line-height: 1;
}

/* Modal 내부 레이아웃 */
.mobile-menu-modal .mobile-menu-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 20px;
}

.header-height {
  height: 18.25px;
}

/* 메뉴 리스트 스타일 */
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu-section {
  display: flex;
  align-items: center;
  height: 82px;
  border-bottom: 1px solid #dbe0ec;
}

.mobile-menu-section.column {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  height: 192px;
}

.mobile-sub-menu-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100px;
  padding: 20px 0;
  font-size: var(--font-b3);
  font-weight: var(--font-weight-semibold);
  gap: 10px;
}

.mobile-sub-menu-section a {
  height: 25px;
  line-height: 1.41;
}

.mobile-menu-nav span {
  text-decoration: none;
  font-size: var(--font-b1);
  font-weight: var(--font-weight-bold);
  line-height: 1.41;
}

/* 로그인/가입하기 버튼 (노란색 CTA) */
.mobile-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-cta .mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 61px;
  width: 100%;
  background-color: var(--brand-primary);
  color: black;
  border-radius: 1000px;
  font-size: var(--font-b3);
  font-weight: var(--font-weight-semibold);
  gap: 4px;
  transition: all 0.3s ease;
  margin-top: 24px;
}

.mobile-menu-cta .mobile-menu-btn:hover {
  background-color: var(--brand-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.mobile-menu-cta .mobile-menu-btn:active {
  transform: translateY(0);
}

/* ===== Footer ===== */
.footer {
  display: flex;
  justify-content: center;
  background-color: black;
  color: #fff;
  height: auto;
  min-height: 228px;
  box-sizing: border-box;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  height: auto;
  min-height: 228px;
  gap: 30px;
}

.footer-info {
  text-align: center;
  font-size: var(--font-11);
  width: 331px;
  letter-spacing: 0;
}

.footer-copyright {
  color: #6f6f6f;
  font-size: var(--font-11);
}

.dropdown-menu {
  display: none;
}

/*Tablet (800px 이상)*/

@media (min-width: 800px) {
  .header {
    align-items: center;
  }

  .header-nav {
    display: flex;
  }

  .header-nav ul li {
    position: relative;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 22px 15px;
    width: 94px;
    box-shadow: 0px 10px 10.2px -2px #0000001a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-10px);
    z-index: 10;
    margin-top: 10px;
    display: none;
  }

  .dropdown-menu a {
    display: block;
    color: black;
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    text-decoration: none;
    font-size: var(--font-b3);
    transition: color 0.2s ease;
    border-radius: 8px;
    text-align: center;
  }

  .dropdown-menu a:first-child {
    margin-bottom: 22px;
  }

  .dropdown-menu a:hover {
    color: #5f5f5f;
  }

  /* 열렸을 때 */
  .has-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    display: block;
  }

  /* 클릭 가능하도록 커서 변경 */
  .dropdown-trigger {
    cursor: pointer;
  }

  .header-cta {
    display: flex;
  }

  .header-mobile-toggle {
    display: none;
  }

  .mobile-menu-modal,
  .overlay {
    display: none !important;
  }

  .footer-info {
    font-size: var(--font-15);
    width: 448px;
    line-height: 1.4;
    letter-spacing: -0.075px;
  }

  .footer-copyright {
    color: #6f6f6f;
    font-size: var(--font-15);
  }
}

/*Desktop (1280px 이상)*/

@media (min-width: 1280px) {
  .header-inner {
    max-width: 1240px;
  }

  .footer-inner {
    max-width: 1240px;
  }
}
