/* ============================================================
   2026 대한민국 제주정원문화박람회 — 공통 스타일
   (헤더 · 기본 리셋 · CSS 변수 — 전 페이지 공유)
============================================================ */

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

/* ── CSS 변수 ── */
:root {
  /* 메인 */
  --color-green: #5C6F52;
  --color-olive: #7a8f70;
  --color-gold: #a27b35;
  --color-ink: #1A1A1A;
  --color-paper: #f8f6ef;
  --color-line: #d9ddd6;
  --color-primary: #5C6F52;
  --color-primary-hover: #6b8060;
  --color-primary-dark: #4a5c41;
  --color-accent: #5C6F52;
  --color-muted: #4a4a4f;
  --color-subtle: #8e8e93;
  --color-surface: #f5f1ed;
  --color-surface-alt: #ebe8de;
  --color-surface-line: #eef0ec;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
  --font-serif: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;

  /* 서브페이지 */
  --green: #5C6F52;
  --green2: #6b8060;
  --ink: #1D1D1F;
  --line: #d9ddd5;
  --bg: #f7f6f1;
  --muted: #6e6e73;
}

/* ── 기본 리셋 ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; height: 100%; }

body {
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.4;
  min-width: 320px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 700; }
h5, h6 { font-weight: 600; }

/* 본문 바로가기 */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 10px; }

/* ── 사이트 헤더 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 84px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-line);
}
.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 56px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
}
.site-header .logo {
  display: block;
  width: auto;
  flex-shrink: 0;
}
.site-header .logo img {
  width: auto;
  height: 64px;
  object-fit: contain;
  margin: 10px 0;
}
.site-header nav { flex: 1; }
.site-header .gnb {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 56px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.gnb-item { position: relative; padding: 10px 0; }
.gnb-item > a {
  position: relative;
  display: inline-block;
  transition: color 0.15s;
}
.gnb-item > a:hover { color: var(--color-primary-hover); }
.gnb-item.active > a { color: var(--color-primary-dark); }
.gnb-item.active > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* 드롭다운 */
.gnb-dropdown {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid var(--color-surface-alt);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 170px;
  box-shadow: 0 14px 30px rgba(56, 64, 52, 0.09);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
  z-index: 20;
  list-style: none;
  margin: 0;
}
.gnb-dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -8px;
  height: 8px;
}
.gnb-item:hover .gnb-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.gnb-dropdown a {
  display: block;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary-dark);
  text-align: center;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.gnb-dropdown a:hover { background: var(--color-surface); color: var(--color-primary); }

/* 모바일 햄버거 */
.hamburger {
  display: none;
  margin-left: auto;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hamburger i { display: block; width: 18px; height: 2px; background: #fff; }

/* ── 모바일 메뉴 오픈 상태 ── */
.nav-open .site-header { position: fixed; width: 100%; }
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}
.mobile-nav-inner {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: #fff;
  overflow-y: auto;
  padding: 80px 0 40px;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
}
.nav-open .mobile-nav { display: block; }
.mobile-gnb { list-style: none; margin: 0; padding: 0; }
.mobile-gnb > li > a {
  display: block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-gnb > li > a:hover,
.mobile-gnb > li.active > a { color: var(--green); }
.mobile-gnb .sub-list { list-style: none; margin: 0; padding: 0; background: var(--color-surface); }
.mobile-gnb .sub-list li a {
  display: block;
  padding: 10px 28px 10px 42px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-gnb .sub-list li a:hover { color: var(--green); }
.mobile-nav-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 22px; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}

/* ── 반응형 헤더 ── */
@media (max-width: 1100px) {
  .site-header { height: 80px; }
  .site-header-inner { padding: 0 24px; gap: 0; }
  .site-header .logo { width: 180px; }
  .site-header .logo img { height: 50px; }
  .site-header .gnb { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .site-header { height: 68px; }
  .site-header-inner { padding: 0 16px; gap: 0; }
  .site-header .logo { width: 150px; }
  .site-header .logo img { height: 42px; }
}

#hd_login_msg { display: none !important; }

/* ── 그누보드 게시판 래퍼 ── */
#bo_v, #bo_list {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 24px;
  box-sizing: border-box;
  width: 100% !important;
}
#bo_v header { background: none; border: none; height: auto; }
@media (max-width: 600px) {
  #bo_v, #bo_list { margin: 20px auto; padding: 0 16px; }
}
