/* ════════════════════════════════════════════════════════
   장학재단 웹사이트 스타일 — 따뜻하고 단정한 톤
   (모바일 우선 / 반응형)
   ════════════════════════════════════════════════════════ */

:root {
  --primary: #1d326e;        /* 브랜드 네이비 — 신뢰/품격 */
  --primary-dark: #142248;   /* 더 진한 네이비 (호버·그라데이션 끝) */
  --primary-soft: #e9edf7;   /* 아주 옅은 네이비 틴트 */
  --accent: #93a0b8;         /* 실버블루 — 포인트(주로 네이비 배경 위) */
  --accent-dark: #6e7a93;
  --accent-soft: #eef0f4;    /* 옅은 실버 틴트 */
  --cream: #f7f6f2;          /* 부드러운 아이보리 배경 */
  --surface: #ffffff;
  --ink: #1e2333;            /* 네이비 기운의 본문 글자 */
  --muted: #6b6f7d;          /* 보조 글자 */
  --line: #e6e4dc;           /* 옅은 구분선 */
  --danger: #b5462f;
  --shadow: 0 10px 30px rgba(20, 30, 60, 0.10);
  --shadow-lg: 0 18px 50px rgba(20, 30, 60, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  /* 자주 쓰는 그라데이션 */
  --grad-navy: linear-gradient(150deg, #294184 0%, #1a2c5e 55%, #131f45 100%);
  --grad-accent: linear-gradient(135deg, #d8dee8, #9aa8be); /* 은은한 실버 */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.35; margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 760px; }

.site-main { min-height: 60vh; }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-navy); color: #fff; box-shadow: 0 6px 16px rgba(20, 30, 60, 0.22); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 10px 22px rgba(20, 30, 60, 0.28); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ── 헤더 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff; /* 완전 불투명 — 스크롤 시 뒤 배경이 비치지 않아 로고가 항상 깨끗 */
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(20, 30, 60, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  /* 헤더 배경을 로고와 같은 흰색으로 맞췄으므로 별도 블렌드 불필요 */
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px;
  box-shadow: var(--shadow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 18px; color: var(--ink); }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.site-nav > a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.site-nav > a.active { background: var(--primary); color: #fff; }
.nav-logout button {
  margin-left: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.nav-logout button:hover { color: var(--danger); border-color: var(--danger); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  border: none; background: transparent;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  height: 2px; width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ── 히어로 ── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(45% 65% at 82% 8%, rgba(214, 165, 70, 0.32), transparent 60%),
    radial-gradient(55% 75% at 10% 12%, rgba(76, 124, 224, 0.45), transparent 62%),
    radial-gradient(60% 80% at 60% 115%, rgba(40, 60, 130, 0.55), transparent 70%),
    linear-gradient(135deg, #21376f 0%, #182a57 48%, #101a3b 100%);
  color: #fff;
  padding: 54px 0 58px;
  text-align: center;
}
/* 히어로 하단 골드 라인 */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--grad-accent);
}
.hero-eyebrow {
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 16px;
}
.hero-title { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; }
.hero-lead { margin: 22px auto 0; max-width: 560px; color: rgba(255, 255, 255, 0.86); font-size: 16px; }
.hero-actions { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ── 섹션 공통 ── */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 { font-size: 24px; position: relative; padding-bottom: 12px; }
.section-head h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: var(--grad-navy);
  border-radius: 2px;
}
.more-link { color: var(--primary); font-weight: 600; font-size: 15px; }
.more-link:hover { color: var(--primary-dark); }

/* ── 공고 목록(홈) ── */
.notices { background: var(--surface); }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { border-top: 1px solid var(--line); }
.notice-list li:last-child { border-bottom: 1px solid var(--line); }
.notice-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 4px;
}
.notice-list a:hover .notice-title { color: var(--primary); }
.notice-title { flex: 1; font-weight: 600; }
.notice-date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}

/* ── CTA ── */
.cta { background: var(--primary-soft); text-align: center; }
.cta-inner h2 { font-size: 24px; color: var(--primary-dark); }
.cta-inner p { color: var(--muted); margin: 12px 0 24px; }

/* ── 환영 + 최근공고 (건물 배경 배너, 2단) ── */
.welcome { padding: 0; }
.welcome-banner {
  position: relative;
  overflow: hidden;
  background-color: #16305a;
}
.welcome-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center 44%;
  background-size: cover;
  background-repeat: no-repeat;
  /* 푸릇하고 신선하게 — 채도·밝기·대비 부스트 */
  filter: saturate(1.5) brightness(1.1) contrast(1.05);
}
.welcome-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* 왼쪽(제목)은 어둡게(가독성) + 오른쪽에 신선한 초록 기운 */
  background:
    radial-gradient(75% 95% at 88% 62%, rgba(96, 172, 116, 0.24), transparent 60%),
    linear-gradient(90deg, rgba(10, 16, 38, 0.74) 0%, rgba(10, 16, 38, 0.42) 40%, rgba(10, 16, 38, 0.06) 100%),
    linear-gradient(180deg, rgba(10, 16, 38, 0.06) 0%, rgba(10, 16, 38, 0.26) 100%);
}
.welcome .container { position: relative; z-index: 2; }
.welcome-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  padding: 52px 0;
}
.welcome-title {
  color: #fff;
  font-size: 22px;
  line-height: 1.42;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}
.welcome-rule {
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 18px;
  background: var(--grad-accent);
  border-radius: 2px;
}
/* 방문자 수 (환영 문구 아래) */
.visit-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}
.visit-stats > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.visit-stats dt { font-size: 12.5px; color: rgba(255, 255, 255, 0.8); font-weight: 500; }
.visit-stats dd { margin: 0; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.notice-card {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
}
.notice-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.notice-card-head h3 { font-size: 18px; color: var(--primary-dark); margin: 0; }
.notice-card .notice-list li:last-child { border-bottom: none; }
.notice-card .empty { padding: 22px 0; }

@media (min-width: 820px) {
  .welcome-split { grid-template-columns: 1.05fr 0.95fr; gap: 52px; padding: 92px 0; }
  .welcome-title { font-size: 28px; }
}

/* ── 서브 페이지 히어로 ── */
.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(50% 90% at 85% 0%, rgba(214, 165, 70, 0.28), transparent 60%),
    radial-gradient(55% 100% at 8% 10%, rgba(76, 124, 224, 0.40), transparent 62%),
    linear-gradient(135deg, #21376f 0%, #182a57 55%, #111c40 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.page-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--grad-accent);
}
.page-eyebrow { letter-spacing: 0.2em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 12px; }
.page-hero h1 { font-size: 30px; font-weight: 800; }
.page-sub { color: rgba(255, 255, 255, 0.82); margin-top: 10px; }

/* ── 본문(prose) ── */
.prose h2 {
  font-size: 22px;
  color: var(--primary-dark);
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-soft);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; color: #3c3833; }
.check-list { list-style: none; padding: 0; margin: 0 0 16px; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 10px; color: #3c3833; }
.check-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--primary);
  font-weight: 800;
}
blockquote {
  margin: 0 0 18px;
  padding: 20px 24px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-dark);
}
.vision-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.vision-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.vision-item strong { color: var(--accent-dark); font-size: 17px; display: block; margin-bottom: 6px; }
.vision-item p { margin: 0; color: var(--muted); font-size: 15px; }
.page-cta { margin-top: 44px; text-align: center; }

/* ── 재단 소개: 인사말(사진 + 글) ── */
.greet-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 44px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--primary-soft);
}
.greet-photo { text-align: center; }
.greet-photo img {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  margin: 0 auto;
}
.greet-photo-ph {
  max-width: 280px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border: 2px dashed #cfd6e6;
  border-radius: var(--radius);
  background: var(--primary-soft);
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--muted);
}
.greet-photo-ph span { font-size: 44px; }
.greet-photo-ph small { font-size: 13px; }
.greet-caption { margin: 12px 0 0; font-weight: 700; color: var(--primary-dark); font-size: 15px; }
.block-title {
  font-size: 22px;
  color: var(--primary-dark);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-soft);
}
.greet-body { color: #3c3833; line-height: 1.9; }
.greet-body p { margin: 0 0 14px; }
.greet-body p:last-child { margin-bottom: 0; }
.container.narrow > .prose + .prose { margin-top: 46px; }

@media (min-width: 720px) {
  .greet-block { grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
}

/* ── 재단 소개: 설립 취지서 (상장 스타일 — 흰 종이 + 금박 모서리 + 궁서체) ── */
:root {
  --font-gungseo: '궁서', 'Gungsuh', 'GungsuhChe', 'Nanum Myeongjo', 'Batang', '바탕', serif;
  --gold: #c9a22e;
  --gold-dark: #9a7a1c;
}
.charter {
  position: relative;
  background: #fff;
  padding: 64px 60px 68px;
  margin-top: 8px;
  box-shadow: 0 2px 4px rgba(20, 30, 60, 0.06), 0 18px 40px rgba(20, 30, 60, 0.14);
  border: 1px solid #e9e4d4;
}
/* 안쪽 가는 금선 틀 (모서리 장식과 이어짐) */
.charter::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px rgba(201, 162, 46, 0.45);
  pointer-events: none;
}
.charter-corner {
  position: absolute;
  width: 128px;
  height: 128px;
  background: url('/images/gold-corner.svg') no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}
.charter-corner.tl { top: 8px; left: 8px; }
.charter-corner.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.charter-corner.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.charter-corner.br { bottom: 8px; right: 8px; transform: scale(-1, -1); }

.charter-inner { position: relative; z-index: 1; }
.charter-title {
  font-family: var(--font-gungseo);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* 자간 때문에 치우치는 중앙 보정 */
  text-align: center;
  color: #2a2418;
  margin: 0 0 10px;
}
.charter-rule {
  width: 150px;
  height: 10px;
  margin: 0 auto 34px;
  background:
    radial-gradient(circle at center, var(--gold) 0 2.5px, transparent 3px) center / 10px 10px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent) center / 100% 1.5px no-repeat;
}
.charter-body {
  font-family: var(--font-gungseo);
  font-size: 16px;
  line-height: 2;
  color: #2a2418;
  text-align: left;
  word-break: keep-all;
}
.charter-body p { margin: 0 0 18px; text-indent: 1em; }
.charter-body p:last-child { margin-bottom: 0; }
/* 하단 날짜·서명(우정렬) */
.charter-body p.ql-align-right { text-indent: 0; margin: 0 0 4px; }
.charter-body p:not(.ql-align-right) + p.ql-align-right { margin-top: 40px; }
.charter-body h2,
.charter-body h3 { font-family: var(--font-gungseo); color: #2a2418; }
.charter-body ul,
.charter-body ol { margin: 0 0 18px; padding-left: 1.6em; }
.charter-body li { margin: 4px 0; }
.charter + .prose { margin-top: 56px; }

@media (max-width: 719px) {
  .charter { padding: 50px 28px 54px; }
  .charter::before { inset: 10px; }
  .charter-corner { width: 84px; height: 84px; }
  .charter-corner.tl, .charter-corner.tr { top: 5px; }
  .charter-corner.bl, .charter-corner.br { bottom: 5px; }
  .charter-corner.tl, .charter-corner.bl { left: 5px; }
  .charter-corner.tr, .charter-corner.br { right: 5px; }
  .charter-title { font-size: 21px; letter-spacing: 0.25em; text-indent: 0.25em; }
  .charter-rule { margin-bottom: 24px; }
  .charter-body { font-size: 15px; line-height: 1.95; }
}

/* ── 재단 소개: 연혁(타임라인) ── */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 11px 0 11px 22px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 17px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.timeline-year {
  flex-shrink: 0;
  width: 50px;
  font-weight: 800;
  color: var(--primary);
  font-size: 15px;
}
.timeline-desc { color: #3c3833; font-size: 15px; line-height: 1.6; white-space: pre-line; }

/* ── 위치안내 ── */
.location-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.map-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.map-frame {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 320px;
  border: 0;
}
/* 이름표 핀 지도 — z-index 로 지도 레이어가 상단 메뉴 위로 올라오지 않게 가둔다 */
.map-pin { z-index: 0; }
.map-pin-label.leaflet-tooltip {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(20, 30, 60, 0.28);
}
.map-pin-label.leaflet-tooltip-top::before { border-top-color: var(--primary); }
.map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-top: 1px solid var(--line);
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  height: 100%;
}
.info-card h2 { font-size: 21px; color: var(--primary-dark); margin-bottom: 18px; }
.info-list { margin: 0; }
.info-list > div {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.info-list > div:first-child { border-top: none; padding-top: 0; }
.info-list dt { width: 76px; flex-shrink: 0; font-weight: 700; color: var(--primary); }
.info-list dd { margin: 0; color: #3c3833; }
.info-list a { color: var(--primary); text-decoration: underline; }

/* ── 게시판 목록 ── */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff8ec;
  border: 1px solid #f0dcb8;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 22px;
}
.admin-tag { font-weight: 700; color: var(--accent-dark); font-size: 14px; }

.board-write { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.board-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--primary); }
.board-list li { border-bottom: 1px solid var(--line); }
.board-list li.is-pinned { background: #fffdf8; }
.board-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 8px;
}
.board-item-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-item-title { font-weight: 600; font-size: 16px; }
.board-list a:hover .board-item-title { color: var(--primary); }
.board-item-date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ── 자주 묻는 질문 (아코디언) ── */
.faq-list { border-top: 2px solid var(--primary); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 6px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-qmain { flex: 1; }
.qmark {
  color: var(--primary);
  font-weight: 800;
  margin-right: 10px;
}
.faq-q::after {
  content: '';
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq-item[open] > .faq-q { color: var(--primary); }
.faq-item[open] > .faq-q::after { transform: rotate(-135deg); border-color: var(--primary); }
.faq-a {
  display: flex;
  gap: 12px;
  padding: 4px 6px 24px;
}
.amark { color: var(--accent-dark); font-weight: 800; flex-shrink: 0; }
.faq-abody { flex: 1; color: #3c3833; line-height: 1.9; }
.faq-admin {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ── 게시글 상세 ── */
.post-head { padding-bottom: 22px; border-bottom: 2px solid var(--primary-soft); margin-bottom: 26px; }
.post-title { font-size: 26px; margin: 10px 0 12px; }
.post-meta { color: var(--muted); font-size: 14px; margin: 0; }
.post-body {
  font-size: 16px;
  color: #34302b;
  line-height: 1.9;
  min-height: 120px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* ── 게시글 본문(마크다운) ── */
.post-body.md p { margin: 0 0 14px; }
.post-body.md ul,
.post-body.md ol { margin: 0 0 14px; padding-left: 22px; }
.post-body.md li { margin: 4px 0; }
.post-body.md h1,
.post-body.md h2,
.post-body.md h3 { color: var(--primary-dark); margin: 22px 0 10px; line-height: 1.4; }
.post-body.md h1 { font-size: 22px; }
.post-body.md h2 { font-size: 20px; }
.post-body.md h3 { font-size: 18px; }
.post-body.md a { color: var(--primary); text-decoration: underline; }
.post-body.md img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
.post-body.md blockquote {
  margin: 0 0 14px; padding: 10px 16px;
  border-left: 3px solid var(--primary-soft); background: #f7f7f4; color: #555;
}
.post-body.md hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
/* 표: 모바일에서 가로 스크롤로 형태 유지 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.post-body.md table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px; /* 좁은 화면에서 뭉개지지 않도록 최소폭 유지 → 가로 스크롤 */
  font-size: 15px;
}
.post-body.md th,
.post-body.md td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
}
.post-body.md th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.post-body.md tr:nth-child(even) td { background: #faf9f6; }

/* ── 리치 에디터 정렬/들여쓰기 클래스(Quill) ── */
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }
.ql-indent-1 { padding-left: 3em; }
.ql-indent-2 { padding-left: 6em; }
.ql-indent-3 { padding-left: 9em; }
.ql-indent-4 { padding-left: 12em; }

/* ── 리치 콘텐츠 렌더(재단소개 인사말·설립취지 본문) ── */
.md-rich { color: inherit; }
.md-rich p { margin: 0 0 14px; }
.md-rich p:last-child { margin-bottom: 0; }
.md-rich ul,
.md-rich ol { margin: 0 0 14px; padding-left: 24px; }
.md-rich li { margin: 5px 0; }
.md-rich h2,
.md-rich h3 { color: var(--primary-dark); margin: 22px 0 10px; line-height: 1.4; }
.md-rich a { color: var(--primary); text-decoration: underline; }
.md-rich blockquote {
  margin: 0 0 14px; padding: 8px 16px;
  border-left: 3px solid var(--primary-soft); background: #f7f7f4; color: #555;
}

/* ── 리치 에디터 입력창(관리자) ── */
.quill-host {
  background: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.quill-host .ql-editor {
  min-height: 220px;
  font-size: 16px;
  line-height: 1.8;
  font-family: inherit;
}
.quill-host .ql-editor.ql-blank::before { font-style: normal; color: #9a9a9a; }
.ql-toolbar.ql-snow,
.ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow { border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: #fbfbf9; }
.post-admin {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}
.post-nav { margin-top: 30px; }

/* ── 여러 줄 텍스트(줄바꿈 유지) ── */
.pre-line { white-space: pre-line; }
.prose .pre-line { margin: 0 0 16px; color: #3c3833; }

/* ── 관리자: 페이지 편집 플로팅 버튼 ── */
.edit-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(20, 30, 60, 0.30);
  transition: transform 0.15s, background 0.15s;
}
.edit-fab:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ── 관리자: 내용 편집 화면 ── */
.content-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.content-tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}
.content-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.content-group {
  font-size: 15px;
  color: var(--accent-dark);
  margin: 26px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.form-success {
  background: #e8f3ec;
  border: 1px solid #bfe0cb;
  color: var(--primary-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 18px;
}
.img-field-preview { margin-bottom: 10px; }
.img-field-preview img {
  max-width: 170px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: block;
}
.img-remove {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.img-remove input { width: auto; margin: 0; }

/* ── 첨부파일 (게시글 상세) ── */
.clip { font-size: 13px; opacity: 0.75; }
.attach-box {
  margin-top: 28px;
  background: var(--primary-soft);
  border: 1px solid #d4e1d6;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.attach-title { font-size: 15px; color: var(--primary-dark); margin: 0 0 12px; }
.attach-title span {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.attach-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.attach-item:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(20, 30, 60, 0.10); }
.attach-item::before { content: '📄'; font-size: 18px; }
.attach-name { flex: 1; font-weight: 600; font-size: 15px; word-break: break-all; }
.attach-size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.attach-dl {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 글 작성/수정 — 첨부파일 영역 */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field-hint { color: var(--muted); font-size: 13px; }
input[type='file'] {
  font-family: inherit;
  font-size: 14px;
  padding: 10px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  width: 100%;
}
.attach-edit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attach-remove {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 500;
  cursor: pointer;
}
.attach-remove input { width: auto; margin: 0; }
.attach-remove-hint { color: var(--danger); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ── 폼 (로그인 / 글쓰기) ── */
.auth-card {
  max-width: 420px;
  margin: 20px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-card h1 { font-size: 24px; color: var(--primary-dark); }
.auth-sub { color: var(--muted); font-size: 15px; margin: 10px 0 24px; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.auth-back { margin-top: 20px; font-size: 14px; }
.auth-back a { color: var(--muted); }

.form-heading { font-size: 24px; color: var(--primary-dark); margin-bottom: 22px; }
.post-form { display: flex; flex-direction: column; gap: 20px; }

label { font-weight: 600; font-size: 15px; color: var(--ink); display: block; }
input[type='text'],
input[type='password'],
input[type='number'],
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 50, 110, 0.15);
}
textarea { resize: vertical; line-height: 1.7; }
label.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  color: #3c3833;
}
label.checkbox input { width: auto; margin: 0; }
.form-actions { display: flex; gap: 10px; }
.form-error {
  background: #fdecea;
  border: 1px solid #f3c6bd;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ── 안내/404 ── */
.notfound { text-align: center; padding: 60px 0; }
.notfound-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.notfound h1 { font-size: 24px; color: var(--primary-dark); }
.notfound p { color: var(--muted); margin: 12px 0 28px; }

/* ── 푸터 ── */
.site-footer {
  background: linear-gradient(160deg, #1a2c5e 0%, #121d42 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 48px 0 32px;
  margin-top: 40px;
  border-top: 3px solid transparent;
  border-image: var(--grad-accent) 1;
}
.footer-inner { text-align: right; }
.footer-line { margin: 0 0 4px; font-size: 14px; color: rgba(255, 255, 255, 0.82); }
.footer-copy { margin: 12px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.footer-admin { margin: 8px 0 0; font-size: 13px; }
.footer-admin .admin-link { color: rgba(255, 255, 255, 0.55); text-decoration: underline; }

/* ── 문의하기 (비밀글 게시판) ── */
.contact-intro {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px 14px 18px;
  margin-bottom: 22px;
  box-shadow: 0 2px 10px rgba(20, 30, 60, 0.05);
}
.contact-intro-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 14px;
}
.contact-intro-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}
.contact-intro-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #4a4f5c;
  font-size: 14.5px;
  line-height: 1.6;
}
.contact-intro-list li { position: relative; padding-left: 13px; }
.contact-intro-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-dark);
}
.contact-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.contact-count { color: var(--muted); font-size: 14px; }
.contact-count strong { color: var(--primary); }

.inquiry-list a { gap: 14px; }
.inquiry-no { color: var(--muted); font-size: 14px; min-width: 28px; text-align: center; }
.inquiry-list .board-item-main { flex: 1; }
.lock { font-size: 13px; opacity: 0.7; }
.inquiry-status {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.inquiry-status.done { background: #e4f1e8; color: #2a6a43; }
.inquiry-status.wait { background: #f3f1ea; color: #857b63; }
.inquiry-list li.is-answered .board-item-title { color: var(--ink); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.page-link {
  min-width: 36px;
  padding: 7px 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--muted);
}
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
a.page-link:hover { border-color: var(--primary); color: var(--primary); }

.form-notice {
  background: #fdf8ea;
  border: 1px solid #efe0b3;
  color: #6f5a1f;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
}

/* 비밀번호 확인 */
.lock-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.locked-title { color: var(--ink); font-size: 16px; display: inline-block; margin-bottom: 6px; }

/* 상세 */
.inquiry-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge-lock { background: var(--accent-soft); color: var(--accent-dark); }
.inquiry .post-body { white-space: pre-line; }
.post-admin-note { color: var(--muted); font-size: 13px; margin-left: auto; }

/* 답글 */
.replies { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.reply { display: flex; gap: 10px; align-items: flex-start; }
.reply-arrow { color: var(--accent-dark); font-size: 22px; line-height: 1; padding-top: 18px; flex-shrink: 0; }
.reply-card {
  flex: 1;
  background: #fff;
  border: 1px solid #d6dcec;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: 0 6px 18px rgba(20, 30, 60, 0.06);
  min-width: 0;
}
.reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.reply-label {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
}
.reply-title { font-size: 17px; color: var(--primary-dark); margin: 0; flex: 1; }
.reply-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.reply-body { color: #3c3833; line-height: 1.85; }
.reply-admin { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.reply-pending {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin: 0;
}
.reply-form-box {
  background: #fbfbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.reply-form-box .admin-bar { margin-bottom: 14px; }
.reply-of { color: var(--muted); font-size: 14px; margin: -10px 0 20px; }
.reply-of a { color: var(--primary); text-decoration: underline; }

@media (max-width: 600px) {
  .inquiry-list a { flex-wrap: wrap; gap: 8px 10px; }
  .inquiry-no { display: none; }
  .inquiry-list .board-item-main { flex-basis: 100%; }
  .inquiry-status { font-size: 11px; }
  .contact-intro { padding: 12px 14px 12px 14px; margin-bottom: 18px; }
  .contact-intro-head { font-size: 13.5px; margin-bottom: 6px; }
  .contact-intro-list { font-size: 13.5px; gap: 4px; }
  .reply-card { padding: 16px; }
  .reply-arrow { display: none; }
  .reply-title { font-size: 15.5px; }
  .post-admin-note { flex-basis: 100%; margin-left: 0; }
}

/* ════════════════════════════════════════════════════════
   반응형 — 태블릿 / 데스크톱
   ════════════════════════════════════════════════════════ */
@media (min-width: 720px) {
  .vision-grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .hero-title { font-size: 42px; }
  .hero { padding: 74px 0 80px; }
  .page-hero h1 { font-size: 36px; }
}

/* 모바일·좁은 태블릿 — 햄버거 메뉴 (메뉴 6개가 한 줄에 들어가지 않는 폭) */
@media (max-width: 799px) {
  .nav-toggle { display: flex; }
  .brand-logo { height: 34px; }
  .site-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 16px 20px;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  body.nav-open .site-nav { transform: translateY(0); }
  .site-nav > a { padding: 14px 12px; border-radius: var(--radius-sm); }
  .nav-logout { margin-top: 8px; }
  .nav-logout button { width: 100%; margin: 0; padding: 13px; }

  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-actions .btn { width: 100%; }
  .form-actions { flex-direction: column; }
}

/* 모바일(작은 화면) — 글자 크기를 화면에 맞게 축소 */
@media (max-width: 600px) {
  body { font-size: 15px; }

  .hero { padding: 44px 0 48px; }
  .hero-eyebrow { font-size: 11px; }
  .hero-title { font-size: 26px; }
  .hero-lead { font-size: 15px; }

  .page-hero { padding: 44px 0; }
  .page-hero h1 { font-size: 24px; }
  .page-eyebrow { font-size: 11px; }
  .page-sub { font-size: 14px; }

  .welcome-card { padding: 30px 22px; }
  .welcome-title { font-size: 18px; }
  .welcome-body { font-size: 15px; line-height: 1.85; }

  .section { padding: 48px 0; }
  .section-head h2 { font-size: 20px; }

  .prose h2 { font-size: 19px; }
  blockquote { font-size: 16px; }

  .post-title { font-size: 21px; }
  .post-body { font-size: 15px; }

  .board-item-title { font-size: 15px; }
  .notice-title { font-size: 15px; }
  .board-item-date, .notice-date { font-size: 13px; }

  .info-list dt, .info-list dd { font-size: 14px; }

  .form-heading { font-size: 21px; }
  .auth-card { padding: 32px 24px; }
  .auth-card h1 { font-size: 21px; }
  .notfound h1 { font-size: 20px; }

  .btn { font-size: 14px; padding: 12px 20px; }
  .btn-sm { font-size: 13px; padding: 9px 14px; }

  /* 홈 '최근 공고' — 모바일에서 더 컴팩트하게 */
  .welcome-split { padding: 32px 0; gap: 18px; }
  .welcome-title { font-size: 17px; }
  .welcome-rule { margin-top: 12px; width: 44px; }
  .visit-stats { margin-top: 16px; gap: 6px; }
  .visit-stats > div { padding: 5px 11px; }
  .visit-stats dt { font-size: 11.5px; }
  .visit-stats dd { font-size: 13.5px; }
  .notice-card { padding: 15px 16px; border-radius: var(--radius-sm); }
  .notice-card-head h3 { font-size: 16px; }
  .notice-card-head .more-link { font-size: 13px; }
  .notice-card .notice-list a { padding: 12px 2px; gap: 8px; }
  .notice-card .notice-title { font-size: 14px; }
  .notice-card .notice-date { font-size: 12px; }
  .notice-card .badge { font-size: 11px; padding: 1px 7px; }

  /* 푸터 — 모바일에서 작게 + 긴 글자 안 잘리게 줄바꿈 보강 */
  .site-footer { padding: 32px 0 24px; }
  .footer-line { font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
  .footer-copy { font-size: 11.5px; overflow-wrap: anywhere; }
  .footer-admin { font-size: 12px; }

  /* 표 — 모바일에서 셀 줄바꿈 허용해 좁은 표는 스크롤 없이 화면에 맞춤 */
  .post-body.md table { min-width: 0; font-size: 14px; }
  .post-body.md th,
  .post-body.md td { white-space: normal; padding: 7px 9px; word-break: keep-all; }
}
