/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 101;
  width: 100%;
  height: 78px;
  display: flex;
  justify-content: center;
  background-color: transparent;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  background-color: transparent;
}

.header.scroll-active {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: 100%;
  height: 48px;
  display: flex;
  margin: 0 16px;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  margin-top: 25px;
  z-index: 10;
}

.logo-desktop {
  display: none;
}

.logo-mobile {
  display: block;
  width: auto;
  height: 26.25px;
}

/* Navigation */
.header-nav {
  display: none;
  align-items: center;
  gap: 27px;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 27px;
  list-style: none;
}

.header-nav a {
  font-size: var(--font-h5);
  font-weight: var(--font-weight-bold);
  color: var(--black);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--brand-primary);
}

.header-nav a.active {
  font-weight: var(--font-weight-bold);
  color: var(--brand-primary);
}

/* CTA Button */
.header-cta {
  display: none;
  width: 141px;
  height: 48px;
}

.header-cta .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  gap: 2px;
  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);
}

/* MyPage Avatar */
.header-avatar {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* Mobile Menu Toggle */
.header-mobile-toggle {
  display: flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 25px;
  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: -536px;
  width: 100%;
  height: 476.25px;
  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: 78px;
}

/* 닫기 버튼 스타일 */
.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: 8px 20px 32px 20px;
}

.header-height {
  height: 18.25px;
}

/* 메뉴 리스트 스타일 */
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.mobile-menu-section {
  display: flex;
  align-items: center;
  height: 79px;
  border-top: 1px solid #efefef;
}
.mobile-menu-nav a {
  text-decoration: none;
  font-size: var(--font-b4);
  font-weight: var(--font-weight-bold);
}

/* 로그인/가입하기 버튼 (노란색 CTA) */
.mobile-menu-cta {
  display: flex;
  justify-content: start;
}

.mobile-menu-cta .mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 141px;
  background-color: var(--brand-primary);
  color: black;
  border-radius: 1000px;
  font-size: var(--font-b4);
  font-weight: var(--font-weight-bold);
  gap: 8px;
  margin-top: 50px;
  transition: all 0.3s ease;
}

.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);
}

.mobile-menu-avatar {
  height: 57px;
  width: 57px;
  border-radius: 100%;
  border: 1.7px solid #e3e3e3;
  background-color: white;
  position: relative;
  overflow: hidden;
  margin-top: 50px;
}

.mobile-menu-avatar a img {
  position: absolute;
  top: 10px;
  left: 2.3px;
}

/* ===== Footer ===== */
.footer {
  background-color: #232323;
  color: #fff;
  height: auto;
  min-height: 405px;
  box-sizing: border-box;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 16px 20px 16px;
  margin: 0 auto;
  height: auto;
  min-height: 405px;
}

/* Footer Top */
.footer-top {
  gap: 19px;
  /* height: 254px; */
  display: flex;
  flex-direction: column;
}

.footer-company {
  color: var(--brand-primary);
  font-size: var(--font-h5);
  font-weight: var(--font-weight-bold);
}

.footer-info {
  font-size: var(--font-b15);
  line-height: 140%;
  color: white;
}

.footer-info p {
  margin-bottom: var(--spacing-sm);
}

/* Footer Notice */
.footer-notice {
  display: none;
}

/* Footer Links */
.footer-links {
  display: flex;
  height: 40px;
  gap: 27px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fff;
  font-size: var(--font-b4);
  font-weight: var(--font-weight-bold);
  line-height: 140%;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  height: auto;
}

.footer-copyright {
  display: flex;
  color: #6f6f6f;
  line-height: 120%;
  font-size: var(--font-b4);
  font-weight: var(--font-weight-bold);
  gap: 27px;
}

.copyright-desktop {
  display: none;
}

.copyright-mobile {
  display: block;
}

.footer-bottom-right {
  display: flex;
  align-items: end;
  gap: 40px;
}

.footer-mobile-none {
  display: none;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

/*Tablet (800px 이상)*/

@media (min-width: 800px) {
  .header {
    height: 88px;
    align-items: center;
  }

  .header-inner {
    margin: 0 40px;
  }

  .header-logo {
    margin-top: 0;
  }

  .logo-desktop {
    display: block;
    height: 36px;
  }

  .logo-mobile {
    display: none;
  }

  .header-nav {
    display: flex;
  }

  .header-cta {
    display: flex;
  }

  .header-avatar {
    height: 57px;
    width: 57px;
    border-radius: 100%;
    border: 1.7px solid #e3e3e3;
    background-color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .header-avatar .img {
    position: absolute;
    top: 10px;
  }

  .header-mobile-toggle {
    display: none;
  }

  .mobile-menu-modal,
  .overlay {
    display: none !important;
  }

  /* Footer */
  .footer {
    height: auto;
    min-height: 381px;
  }

  .footer-inner {
    padding: 40px 40px 20px 40px;
    height: auto;
    min-height: 381px;
  }

  .footer-top {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .footer-company {
    height: 28px;
    display: flex;
    align-items: center;
  }

  .footer-notice {
    display: flex;
    color: #797979;
    font-size: var(--font-b5);
    line-height: 150%;
  }

  .footer-bottom {
    height: 40px;
  }

  .footer-mobile-none {
    display: flex;
  }

  .copyright-desktop {
    display: block;
  }

  .copyright-mobile {
    display: none;
  }
}

/*Desktop (1280px 이상)*/

@media (min-width: 1280px) {
  .footer {
    height: auto;
    min-height: 374px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .header-inner {
    max-width: 1200px;
  }

  .footer-inner {
    height: auto;
    width: 100%;
    min-height: 374px;
    max-width: 1200px;
    padding: 40px 0;
    margin: 0 40px;
  }

  .footer-top {
    min-height: 248px;
    justify-content: flex-start;
    gap: 24px;
  }

  .footer-links {
    margin-top: 6px;
  }

  .footer-inner {
    max-width: 1200px;
  }
}
