/* ======================================================================
   [품 PUM] 헤더 CSS - poomda.kr/2/ 디자인 기반
   ====================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --bg-mint-light: #E4F7F2;
  --bg-mint-soft:  #D5F1E9;
  --bg-page:       #F3FAF7;
  --primary:       #2FB0D5;
  --primary-dark:  #1E8DAE;
  --mint-accent:   #38C1A8;
  --mint-pill:     #C5EFE4;
  --mint-pill-text:#0D6955;
  --text-dark:     #111827;
  --text-sub:      #4B5563;
  --text-muted:    #80929F;
  --border-light:  #D2EBE3;
  --border-card:   #E5EDE9;
  --btn-black:     #111827;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-pill:   9999px;
  --shadow-mobile-nav: 0 10px 30px rgba(0,0,0,0.12);
  --font-family:   'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-dark);
  overflow-x: hidden;
  word-break: keep-all;
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; transition: all 0.25s ease; }
ul, ol { list-style: none; }

/* -------- 헤더 -------- */
.pub-header {
  background: #D5F1E9 !important;
  border-bottom: 1px solid rgba(13,105,85,0.1) !important;
  position: sticky;
  top: 0;
  z-index: 10000;           /* 그누보드 요소들보다 확실히 위 */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 그누보드 기본 헤더 덮어쓰기 — z-index:98 강제 초기화 */
#header,
header {
  background: #D5F1E9 !important;
  position: fixed !important;
  top: 0 !important;
  z-index: 10000 !important;   /* 그누보드 z-index:98 무력화 → backdrop(9998) 위 */
}

#contents_wrap { padding-top: 0 !important; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* -------- 로고 -------- */
.logo-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  z-index: 1001;
  text-decoration: none;
}
.logo-main {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -0.04em;
}
.logo-sub {
  font-size: 14px;
  font-weight: 700;
  color: #245A4E;
  letter-spacing: 0.05em;
}
.sr_logo_img { height: 38px; width: auto; display: block; }

/* -------- 네비게이션 -------- */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 8px;
  position: relative;
  text-decoration: none;
}
.nav-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}
.nav-eng {
  font-size: 11px;
  font-weight: 600;
  color: #38786B;
  letter-spacing: -0.01em;
  margin-top: -2px;
}
.nav-item:hover .nav-title { color: var(--primary-dark); }
.nav-item.active .nav-title { color: var(--primary-dark); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 20px; height: 3px;
  background: var(--btn-black);
  border-radius: 2px;
}

/* -------- 액션 버튼 -------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1001;
}
.btn-pill-mint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  background: var(--mint-pill);
  color: var(--mint-pill-text);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(13,105,85,0.15);
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-pill-mint:hover {
  background: #B2E5D8;
  color: #064E3B;
  transform: translateY(-1px);
}

/* -------- 햄버거 버튼 -------- */
.menu-toggle {
  display: none;
  background: #FFF;
  border: 1px solid var(--border-light);
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 10001;           /* 헤더보다 위 */
  transition: all 0.3s;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2.5px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* -------- 모바일 backdrop -------- */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9998;            /* 헤더(10000) 아래, 메뉴(9999) 아래 */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-backdrop.active { display: block; opacity: 1; }

/* 모바일 계정 행 - 데스크톱에서 숨김 */
.mobile-account-row { display: none; }

/* ===== Tablet (≤768px) ===== */
@media (max-width: 768px) {
  .header-inner { height: 64px; }
  .logo-main { font-size: 22px; }
  .logo-sub  { font-size: 12px; }
  .header-actions .btn-pill-mint { display: none; }
  .menu-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 64px; left: 0;
    width: 100%;
    background: #FFFFFF;
    border-bottom: 2px solid var(--border-light);
    box-shadow: var(--shadow-mobile-nav);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 20px 24px;
    z-index: 9999;            /* backdrop(9998)보다 위 */
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
  }
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-card);
    text-align: left;
  }
  .nav-item:last-child { border-bottom: none; }
  .nav-title { font-size: 16px; }
  .nav-eng   { font-size: 12px; margin-top: 0; }
  .nav-item.active::after { display: none; }
  .nav-item.active { background: var(--bg-mint-light); border-radius: var(--radius-sm); }

  /* 모바일 계정 행 */
  .mobile-account-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 16px 12px 6px;
    margin-top: 4px;
    border-top: 1px solid rgba(13,105,85,0.2);
  }
  .mobile-account-row a {
    display: inline-block;
    font-size: 0.86rem;
    color: var(--mint-pill-text);
    font-weight: 700;
  }
}

/* ===== Phone (≤480px) ===== */
@media (max-width: 480px) {
  .header-inner { padding: 0 14px; }
}
