/* ==========================================================
   정대임 장군 기념 사이트 — 메인 스타일
   원본 시안: Claude Design "메인 페이지.dc.html"
   테마: 쪽빛 남색 (기와 붉은색으로 바꾸려면 --accent: #9E4A3A)
   ========================================================== */

:root {
  --accent: #2E4A76;        /* 쪽빛 남색 (대안: 기와 붉은색 #9E4A3A) */
  --bg: #F5F1E8;            /* 한지 미색 배경 */
  --surface: #FBF8F1;       /* 카드/표면 */
  --navy: #1F2A44;          /* 짙은 남색 (제목) */
  --ink: #2B2B2B;           /* 기본 텍스트 */
  --body-ink: #4A4436;      /* 본문 텍스트 */
  --muted: #6D6353;         /* 보조 텍스트 */
  --border: #E0D8C4;        /* 구분선 */
  --border-strong: #CFC5AC;
  --line: #B8AD92;
  --hanja: #C8BFA6;         /* 한자 장식 */
  --faint: #8A7F68;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.serif { font-family: 'Noto Serif KR', serif; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* ---------- 상단 안내띠 ---------- */
.topbar {
  background: var(--navy);
  color: #E8E2D2;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 10px 20px;
}

/* ---------- 헤더 ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-main {
  font-family: 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
}
.brand-sub {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--muted);
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-size: 18px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 4px;
}
.nav a:hover { background: #F0EADA; color: var(--accent); }
.nav a.outline { border: 1px solid var(--border-strong); }

/* ---------- 히어로 ---------- */
.hero { border-bottom: 1px solid var(--border); }
.hero-grid {
  padding-top: 88px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
  gap: 64px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 20px;
  font-size: 17px;
  letter-spacing: 0.35em;
  color: var(--accent);
  font-weight: 700;
}
.hero-title {
  margin: 0 0 28px;
  font-family: 'Noto Serif KR', serif;
  font-size: 54px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
  text-wrap: pretty;
}
.hero-lead {
  margin: 0 0 40px;
  font-size: 20px;
  line-height: 1.8;
  color: var(--body-ink);
  max-width: 34em;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #F5F1E8;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 4px;
}
.btn-primary:hover { opacity: 0.9; color: #FFFFFF; }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 18px;
  font-weight: 500;
  padding: 16px 32px;
  border-radius: 4px;
}
.btn-ghost:hover { background: #F0EADA; }
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.hero-figure figcaption {
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 공통 섹션 ---------- */
.section { border-bottom: 1px solid var(--border); }
.section-inner { padding-top: 88px; padding-bottom: 88px; }
.section-alt { background: var(--surface); }
.section-title {
  margin: 0 0 12px;
  font-family: 'Noto Serif KR', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--navy);
}
.section-sub { margin: 0 0 48px; font-size: 19px; color: var(--muted); }

/* ---------- 인물 소개 요약 ---------- */
.intro-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 88px 28px;
  text-align: center;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  margin-bottom: 36px;
}
.kicker-line { display: block; width: 72px; height: 1px; background: var(--line); }
.kicker-label {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.intro-quote {
  margin: 0 0 32px;
  font-family: 'Noto Serif KR', serif;
  font-size: 30px;
  line-height: 1.7;
  color: var(--navy);
  font-weight: 500;
  text-wrap: pretty;
}
.intro-text {
  margin: 0 auto 40px;
  font-size: 19px;
  line-height: 1.9;
  color: var(--body-ink);
  max-width: 38em;
  text-wrap: pretty;
}
.link-more {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
}

/* ---------- 주요 섹션 카드 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 26px 26px;
  min-height: 220px;
  border-radius: 4px;
}
.card:hover { border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); color: inherit; }
.card-hanja { font-family: 'Noto Serif KR', serif; font-size: 26px; color: var(--hanja); line-height: 1; }
.card-title { margin-top: 14px; font-family: 'Noto Serif KR', serif; font-size: 24px; font-weight: 600; color: var(--navy); }
.card-desc { margin-top: 10px; font-size: 16.5px; line-height: 1.7; color: #5C5443; flex: 1; }
.card-cta { margin-top: 18px; font-size: 15px; font-weight: 700; color: var(--accent); }

/* ---------- 영상·소식 ---------- */
.news-grid {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 56px;
  align-items: center;
}
.news-grid .section-title { font-size: 34px; margin-bottom: 16px; }
.news-lead { margin: 0 0 28px; font-size: 18px; line-height: 1.8; color: var(--body-ink); text-wrap: pretty; }
.link-plain { font-size: 17px; font-weight: 700; color: var(--accent); }
.news-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 4px;
}
.news-card:hover { border-color: var(--accent); color: inherit; }
.news-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.news-eyebrow { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.news-title { margin: 0 0 6px; font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1.5; }
.news-desc { margin: 0; font-size: 15.5px; color: var(--muted); }

/* ---------- 방문 안내 ---------- */
.places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.place {
  border-top: 3px solid var(--accent);
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.place-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place-body { padding: 26px; }
.place-name {
  margin: 0 0 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 23px;
  font-weight: 600;
  color: var(--navy);
}
.place-desc { margin: 0 0 14px; font-size: 17px; line-height: 1.7; color: var(--body-ink); }
.place-addr { margin: 0; font-family: monospace; font-size: 14.5px; color: var(--faint); }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--navy); color: #C9C2AF; margin-top: auto; }
.footer-grid {
  padding-top: 56px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-title {
  margin: 0 0 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 600;
  color: #F5F1E8;
}
.footer-text { margin: 0; font-size: 16px; line-height: 1.8; }
.footer-label { margin: 0 0 10px; font-size: 15px; letter-spacing: 0.15em; color: #8FA0C2; font-weight: 700; }
.footer-contact { margin: 0; font-size: 17px; line-height: 1.9; }
.footer-contact a { color: #E8E2D2; border-bottom: 1px solid rgba(232, 226, 210, 0.4); }
.footer-contact a:hover { color: #FFFFFF; }
.footer-legal { border-top: 1px solid rgba(245, 241, 232, 0.15); }
.footer-legal p { margin: 0; padding-top: 20px; padding-bottom: 20px; font-size: 14.5px; color: #8B8674; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
  .hero-title { font-size: 38px; }
  .hero-lead { font-size: 18px; }
  .section-inner { padding-top: 64px; padding-bottom: 64px; }
  .intro-inner { padding-top: 64px; padding-bottom: 64px; }
  .intro-quote { font-size: 24px; }
  .news-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
  .nav a { font-size: 16px; padding: 10px 12px; }
  .section-title { font-size: 30px; }
}

@media (max-width: 560px) {
  .news-card { grid-template-columns: 1fr; }
  .news-thumb { aspect-ratio: 16 / 9; }
  .hero-title { font-size: 32px; }
  .brand-main { font-size: 24px; }
}

/* ==========================================================
   서브페이지 공통 (인물·사적, 문의 등)
   ========================================================== */

.nav a.active { background: #F0EADA; color: var(--accent); font-weight: 700; }

/* ---------- 표제 밴드 ---------- */
.page-head { background: var(--navy); }
.page-head-inner { max-width: 860px; margin: 0 auto; padding: 72px 28px 64px; text-align: center; }
.page-eyebrow { margin: 0 0 18px; font-size: 15px; letter-spacing: 0.3em; color: #8FA0C2; font-weight: 700; }
.page-title { margin: 0 0 20px; font-family: 'Noto Serif KR', serif; font-size: 46px; font-weight: 600; color: #F5F1E8; }
.page-sub { margin: 0; font-family: 'Noto Serif KR', serif; font-size: 19px; color: #C9C2AF; }

/* ---------- 서브 메뉴 탭 ---------- */
.subnav { background: var(--surface); border-bottom: 1px solid var(--border); }
.subnav-inner { max-width: 860px; margin: 0 auto; padding: 0 28px; display: flex; gap: 4px; flex-wrap: wrap; }
.subnav a, .subnav span { font-size: 17px; padding: 16px 18px; border-bottom: 3px solid transparent; }
.subnav a:hover { border-bottom-color: var(--border-strong); }
.subnav .active { font-weight: 700; color: var(--accent); border-bottom-color: var(--accent); }
.subnav .todo { color: #A99F8A; cursor: default; }

/* ---------- 본문 아티클 ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 72px 28px 40px; }
.article h2 { margin: 0 0 24px; font-family: 'Noto Serif KR', serif; font-size: 32px; font-weight: 600; color: var(--navy); }
.article p { margin: 0 0 24px; font-size: 19px; line-height: 2; color: #3A3428; text-wrap: pretty; }
.article .gap { margin-bottom: 56px; }
.article-figure { margin: 0 0 56px; }
.article-figure img { border: 1px solid var(--border-strong); }
.article-figure figcaption { margin-top: 12px; font-size: 15.5px; color: var(--muted); }
.figure-center { text-align: center; }
.figure-center img { display: inline-block; max-width: min(100%, 320px); }
.article blockquote { margin: 0 0 56px; padding: 28px 32px; border-left: 3px solid var(--accent); background: var(--surface); }
.article blockquote p { margin: 0 0 12px; font-family: 'Noto Serif KR', serif; font-size: 22px; line-height: 1.8; color: var(--navy); }
.article blockquote cite { font-size: 15.5px; color: var(--muted); font-style: normal; }

/* ---------- 설명 박스 / 넓은 도판 ---------- */
.note-box { margin: 0 0 56px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; }
.note-box .note-title { margin: 0 0 10px; font-family: 'Noto Serif KR', serif; font-size: 19px; font-weight: 600; color: var(--navy); }
.note-box p { margin: 0; font-size: 17px; line-height: 1.9; color: var(--body-ink); }
.article-figure.wide img { width: 100%; }

/* ---------- 인물 정보 표 ---------- */
.info-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border); font-size: 16.5px; }
.info-table th, .info-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.info-table th { width: 132px; font-family: 'Noto Serif KR', serif; font-weight: 600; color: var(--navy); background: #F0EADA; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
.source-note { margin: 0 0 56px; font-size: 14.5px; color: var(--faint); }
.source-note a { color: var(--muted); border-bottom: 1px solid var(--border-strong); }

/* ---------- 관련 자료 갤러리 ---------- */
.related { max-width: 860px; margin: 0 auto; padding: 24px 28px 88px; width: 100%; }
.related-head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.related-head h2 { margin: 0; font-family: 'Noto Serif KR', serif; font-size: 28px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.related-line { display: block; flex: 1; height: 1px; background: #D8CFB8; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.gallery figure { margin: 0; }
.gallery a img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border: 1px solid var(--border-strong); cursor: zoom-in; }
.gallery a:hover img { border-color: var(--accent); }
.gallery figcaption { margin-top: 10px; font-size: 16px; color: var(--body-ink); }
.gallery .hint { margin: 4px 0 0; font-size: 14px; color: var(--faint); }

/* ---------- 이전/다음 ---------- */
.pager { border-top: 1px solid var(--border); background: var(--surface); }
.pager-inner { max-width: 860px; margin: 0 auto; padding: 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pager a { font-size: 17px; font-weight: 500; }
.pager a:hover { color: var(--accent); }
.pager .next { font-weight: 700; color: var(--accent); }
.pager .todo { font-size: 17px; color: #A99F8A; }

/* ---------- 책 뷰어 (플립북 대체) ---------- */
.book-viewer { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 20px; margin: 0 0 56px; }
.bv-stage { text-align: center; outline: none; }
.bv-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bv-stage img { max-width: 100%; max-height: 76vh; border: 1px solid var(--border-strong); cursor: zoom-in; transition: opacity 0.15s; }
.bv-controls { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding-top: 16px; }
.bv-btn { border: 1px solid var(--line); background: var(--bg); color: var(--navy); font-family: inherit; font-size: 16px; font-weight: 500; padding: 10px 18px; border-radius: 4px; cursor: pointer; }
.bv-btn:hover:not(:disabled) { background: #F0EADA; color: var(--accent); }
.bv-btn:disabled { opacity: 0.4; cursor: default; }
.bv-count { font-size: 16px; color: var(--muted); min-width: 84px; text-align: center; }
.bv-jump { display: flex; align-items: center; gap: 6px; }
.bv-jump input { width: 72px; padding: 9px 10px; font-size: 16px; font-family: inherit; border: 1px solid var(--border-strong); border-radius: 4px; background: #FFFFFF; color: var(--ink); text-align: center; }
.bv-hint { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--faint); }
.doc-meta { margin: -12px 0 24px; font-size: 16.5px; color: var(--muted); }

/* ---------- 문의 폼 ---------- */
.form-wrap { max-width: 640px; margin: 0 auto; padding: 64px 28px 88px; }
.form-note { margin: 0 0 36px; font-size: 17px; line-height: 1.8; color: var(--muted); }
.form-field { margin-bottom: 24px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 17px; font-weight: 700; color: var(--navy); }
.form-field .req { color: #9E4A3A; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.form-field input:focus,
.form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-field textarea { min-height: 200px; resize: vertical; }
.form-submit { border: none; cursor: pointer; font-family: inherit; }
.form-submit:disabled { opacity: 0.6; cursor: wait; }
.form-status { display: none; margin-top: 24px; padding: 18px 20px; border-radius: 4px; font-size: 17px; line-height: 1.7; }
.form-status.ok { display: block; background: #EAF0E4; border: 1px solid #9DB58A; color: #3C5230; }
.form-status.err { display: block; background: #F5E3DE; border: 1px solid #C89A8C; color: #7A3B2C; }

@media (max-width: 900px) {
  .page-head-inner { padding: 48px 28px 44px; }
  .page-title { font-size: 34px; }
  .article { padding-top: 48px; }
  .article h2 { font-size: 26px; }
  .article p { font-size: 18px; }
}
