:root {
  --primary-color: #111827;
  --secondary-color: #1f2937;
  --accent-color: #2563eb;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: #fff;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. 네비게이션 헤더 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}
.nav-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand-logo { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-weight: 500; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-color); }
.btn-inquiry-nav {
  background: var(--primary-color);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
}

/* 모바일 햄버거 토글 */
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* 2. 16:9 비디오 히어로 */
.hero-video-section {
  position: relative;
  width: 100%;
  min-height: 400px;
  max-height: 580px;
  height: 56.25vw;
  overflow: hidden;
  background: #000;
}
.hero-video-section video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-overlay h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero-overlay p { font-size: clamp(1rem, 2vw, 1.25rem); color: #e5e7eb; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; }

/* 버튼 공통 */
.btn-primary {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-secondary {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* 3. 해설/도감 카드 그리드 (반응형 1 -> 2 -> 3단) */
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.section-title p { color: var(--text-muted); }

.glossary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .glossary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .glossary-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 8px;
  background: #eff6ff;
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 10px;
}
.card-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card-body p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; flex-grow: 1; }
.read-more { font-weight: 600; color: var(--accent-color); font-size: 14px; }

/* 탭 바 */
.glossary-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.tab-item {
  padding: 10px 18px;
  white-space: nowrap;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  background: var(--bg-light);
}
.tab-item.active { background: var(--primary-color); color: #fff; }

/* 4. 게시판 스타일 */
.board-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.board-table th, .board-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.board-table th { background: var(--bg-light); font-weight: 600; }
.secret-icon { color: #f59e0b; margin-right: 4px; font-weight: bold; }

/* 폼 컨트롤 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 15px;
}

/* 푸터 */
.footer { background: var(--primary-color); color: #9ca3af; padding: 48px 0; margin-top: 60px; font-size: 14px; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.footer h3 { color: #fff; margin-bottom: 10px; }

/* 모바일 분기 */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links.active { display: flex; }
  .board-table .col-hide-mobile { display: none; }
}