/* 공통 스타일 */
:root {
  --bg: #f6f4ef;
  --text: #1f1f1f;
  --accent: #8b4513;
  --accent-2: #355070;
  --card: #ffffff;
  --border: #d8d2c4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans KR", "Pretendard", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* 네비게이션 */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-group {
  position: relative;
}

.nav-group summary {
  list-style: none;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-group[open] summary,
.nav-group summary:hover {
  background: var(--accent);
  color: #fff;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  z-index: 20;
}

.dropdown a {
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent);
  color: #fff;
}

.hero {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.12), rgba(53, 80, 112, 0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 24px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.compact-card {
  padding: 10px 12px;
}

.card h3 {
  margin-bottom: 8px;
  color: var(--accent-2);
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.timeline-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.timeline-item .year {
  font-weight: 700;
  color: var(--accent);
}

.section-title {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 20px;
  color: var(--accent-2);
}

form {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

button,
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  text-align: center;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.video-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
}

.names-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.name-btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.name-btn:hover,
.name-btn.active {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.thumb-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.thumb-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.thumb-card img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.footer {
  text-align: center;
  padding: 24px 0 12px;
  color: #666;
  font-size: 14px;
}

/* 동영상 썸네일 그리드 (가로 4개) */
.video-thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .video-thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .video-thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .video-thumbnail-grid {
    grid-template-columns: 1fr;
  }
}

.video-thumbnail-item {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 16 / 9;
}

.video-thumbnail-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.video-thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-thumbnail-item:hover .video-thumbnail-overlay {
  opacity: 1;
}

.play-icon {
  color: #fff;
  font-size: 48px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* 동영상 재생 모달 */
.video-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal-content {
  position: relative;
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.video-modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: var(--text);
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  z-index: 1001;
  transition: color 0.2s ease;
}

.video-modal-close:hover {
  color: var(--accent);
}

