/* =========================
   공통(토큰 & 유틸)
   ========================= */
:root {
  --drawer-w: 84vw;
  --drawer-max: 360px;
  --header-pad-mobile: 1rem;
  --tap-target: 44px;
}

/* 스크롤 잠금 */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

/* 접근성: 포커스 링 */
:where(a, button).focus-visible,
:where(a, button):focus-visible {
  outline: 2px solid #87ceeb;
  outline-offset: 2px;
}

/* 햄버거 기본은 숨김 (모바일에서만 노출) */
.hamburger {
  display: none;
}

/* 오버레이 기본 숨김 */
.drawer-backdrop[hidden] {
  display: none !important;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 998;
}

/* 모바일 드로어 기본 상태(닫힘) */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: rgba(26, 26, 46, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  height: 100vh;
  flex-direction: column;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}
.mobile-menu-toggle {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-title {
  font-weight: 800;
  font-size: 1.125rem;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #87ceeb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#mobile-show-mobileButton {
  display: none;
}
.drawer-close {
  width: var(--tap-target);
  height: var(--tap-target);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 10px;
}
.drawer-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
}
.mobile-nav-item {
  display: block;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.mobile-nav-item:hover {
  transform: translateX(4px);
  background: linear-gradient(
    135deg,
    rgba(114, 9, 183, 0.85),
    rgba(83, 52, 131, 0.85),
    rgba(135, 206, 235, 0.8)
  );
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(114, 9, 183, 0.35),
    0 0 20px rgba(135, 206, 235, 0.25);
}

/* =========================
   반응형 레이아웃
   ========================= */

/* 태블릿 이하 */
@media (max-width: 1024px) {
  /* 헤더 패딩 축소 */
  .header {
    padding: 0.9rem 0;
  }
  .nav-container {
    padding: 0 var(--header-pad-mobile);
    gap: 0.5rem;
    justify-content: left;
  }

  /* 로고 약간 축소 */
  .logo {
    font-size: 1.8rem;
  }

  /* 데스크톱 메뉴 & 우측 액션은 모바일에서 감춤 */
  .nav-menu,
  .header-actions {
    display: none !important;
  }

  /* 햄버거 버튼 노출 */
  .hamburger {
    display: none;
    width: var(--tap-target);
    height: var(--tap-target);
    align-items: center;
    justify-content: center;
    flex-direction: column; /* ← 세로로 쌓기 */
    gap: 6px; /* 간격 조금 키움 */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    margin-left: auto;
  }
  .hamburger:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .hamburger-line {
    width: 22px;
    height: 2px; /* 가로 막대 유지 */
    background: #fff;
    display: block;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
  }

  /* 히어로/배너/그리드 축소 재배치 */
  .hero-title {
    font-size: 2rem;
  }
  .hero-section {
    padding: 1.5rem 1rem;
  }
  .banner-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    transform: none;
  }
  .banner-item {
    height: 220px;
  }

  #mobile-show-mobileButton {
    display: flex;
    width: 100%;
  }
  #mobile-show-mobileButton > div {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
  }

  .essentials-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }
  .essentials-item {
    height: 150px;
  }
  .nav-item {
    font-size: 1rem;
  }
  .info-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    width: 100%;
  }
  .month-grid,
  .region-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 작은 모바일 */
@media (max-width: 480px) {
  .logo {
    font-size: 1.6rem;
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    word-break: keep-all;
  }

  .month-grid,
  .region-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .month-item,
  .season-item {
    min-height: 48px;
    font-size: 14px;
    padding: 1rem 0.6rem;
  }

  .essentials-section,
  .info-section,
  .site-footer {
    padding: 1rem;
  }
  .banner-container {
    gap: 0.5rem !important;
  }
  .info-panel {
    padding: 1rem;
  }
  .footer-content p {
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
    word-break: keep-all;
  }
  .company-footer-content p {
    font-size: 10px;
  }
}

/* === 모바일 햄버거 드로어 불투명화 Overrides === */
.mobile-drawer {
  background: #1a1a2e !important; /* 불투명 */
  backdrop-filter: none !important;
}

.drawer-header {
  background: #1a1a2e !important; /* 패널과 일체감 */
  border-bottom: 1px solid #2b2f55 !important;
}

.mobile-nav {
  background: #1a1a2e !important; /* 배경 통일 */
}

.mobile-nav-item {
  background: #222642 !important; /* 알파 제거, 불투명 카드 */
  border-color: #2e335a !important;
}
.mobile-nav-item:hover {
  background: linear-gradient(
    135deg,
    #7240b7,
    #533483,
    #5aaad6
  ) !important; /* 불투명 톤 */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}

/* 햄버거 버튼 자체도 불투명 */
.hamburger {
  background: #2a2f4f !important;
  border-color: #3b4170 !important;
}
.hamburger:hover {
  background: #343a6a !important;
}

/* (선택) 배경 어둡힘 레이어를 더 진하게 하고 싶다면 아래 주석 해제
.drawer-backdrop {
  background: rgba(0,0,0,0.85) !important;
  backdrop-filter: none !important;
}
*/

@media (max-width: 1024px) {
  /* 헤더 패딩 축소 */
  .header {
    padding: 0.9rem 0;
  }
  .nav-container {
    padding: 0 var(--header-pad-mobile);
    gap: 0.5rem;
  }

  /* 로고 약간 축소 */
  .logo {
    font-size: 1.8rem;
  }

  /* 데스크톱 메뉴 & 우측 액션은 모바일에서 감춤 */
  .nav-menu,
  .header-actions {
    display: none !important;
  }

  /* 햄버거 버튼 노출 */
  .hamburger {
    display: none;
    width: var(--tap-target);
    height: var(--tap-target);
    align-items: center;
    justify-content: center;
    flex-direction: column; /* ← 세로로 쌓기 */
    gap: 6px; /* 간격 조금 키움 */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    margin-left: auto;
  }
  .hamburger:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .hamburger-line {
    width: 22px;
    height: 2px; /* 가로 막대 유지 */
    background: #fff;
    display: block;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
  }
  .wf-banner-list,
  .festival-banner-container {
    width: 100%;
  }
  .global-wrap,
  .festival-banner-container {
    padding: 0px !important;
  }
  /* 히어로/배너/그리드 축소 재배치 */
  .hero-title {
    font-size: 2rem;
  }
  .hero-section {
    padding: 1.5rem 1rem;
    padding-top: 0px;
  }
  .banner-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    transform: none;
  }
  .banner-item {
    height: 220px;
  }

  .essentials-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }
  .essentials-item {
    height: 150px;
  }

  .info-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    width: 100%;
  }
  .month-grid,
  .region-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 작은 모바일 */
@media (max-width: 480px) {
  .month-name {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70%;
    text-align: center;
  }
}
