/* ─────────────────────────────────────────────────────────────
   KRDS(디지털 정부서비스 UI/UX 가이드라인, '25.8.) 표준형 스타일 기반
   색상·서체·형태·레이아웃 토큰을 준용. 정부 상징·공식 배너는 사용하지 않음.
   ───────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Pretendard GOV";
  src: url("/fonts/PretendardGOVVariable.woff2") format("woff2-variations"),
       url("/fonts/PretendardGOVVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  /* primary */
  --primary-5: #ecf2fe; --primary-10: #d8e5fd; --primary-20: #b1cefb; --primary-50: #256ef4;
  --primary-60: #0b50d0; --primary-70: #083891; --primary-80: #052561;
  /* secondary */
  --secondary-5: #eef2f7; --secondary-10: #d6e0eb; --secondary-50: #346fb2; --secondary-60: #1c589c;
  --secondary-70: #063a74; --secondary-80: #052b57;
  /* gray (blue gray) */
  --gray-0: #ffffff; --gray-5: #f4f5f6; --gray-10: #e6e8ea; --gray-20: #cdd1d5; --gray-30: #b1b8be;
  --gray-40: #8a949e; --gray-50: #6d7882; --gray-60: #58616a; --gray-70: #464c53; --gray-80: #33363d; --gray-90: #1e2124;
  /* system */
  --danger-5: #fdefec; --danger-50: #de3412; --danger-60: #bd2c0f;
  --warning-5: #fff3db; --warning-50: #ffb114; --warning-70: #8a5c00;
  --success-5: #eaf6ec; --success-50: #228738; --success-60: #267337;
  --info-5: #e7f4fe; --info-50: #0b78cb; --info-60: #096ab3;
  /* radius: xsmall 2, small 4, medium 6, large 10, xlarge 12 */
  --r-s: 4px; --r-m: 6px; --r-l: 10px; --r-xl: 12px;
  --font: "Pretendard GOV", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --focus: 0 0 0 2px var(--gray-0), 0 0 0 4px var(--primary-50);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--gray-0); color: var(--gray-90); font: 400 17px/1.5 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--primary-60); text-underline-offset: 3px; }
a:hover { color: var(--primary-70); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }
.muted { color: var(--gray-60); }
.container { width: 100%; max-width: 1248px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* 건너뛰기 링크 */
.skip-link { position: absolute; left: 0; top: -100px; z-index: 100; padding: 12px 20px; background: var(--gray-90); color: #fff; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0; }

/* ── 헤더 ── */
.header { border-bottom: 1px solid var(--gray-20); background: var(--gray-0); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--gray-90); text-decoration: none; }
.logo:hover { color: var(--gray-90); }
.logo-mark { width: 36px; height: 36px; border-radius: var(--r-m); background: var(--secondary-70); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.logo-text { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.header-util { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--gray-70); }
.gnb { border-top: 1px solid var(--gray-10); }
.gnb ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.gnb a { display: block; padding: 14px 8px 12px; color: var(--gray-90); font-size: 19px; font-weight: 700; text-decoration: none; border-bottom: 4px solid transparent; }
.gnb a:hover { color: var(--primary-60); }
.gnb a.active { color: var(--primary-60); border-bottom-color: var(--primary-50); }

/* ── 본문 ── */
.main { padding-top: 24px; padding-bottom: 80px; min-height: 60vh; }
.breadcrumb ol { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 15px; color: var(--gray-70); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-top: 1.5px solid var(--gray-50); border-right: 1.5px solid var(--gray-50); transform: rotate(45deg); }
.breadcrumb a { color: var(--gray-70); text-decoration: underline; }
.breadcrumb li:first-child a::before { content: ""; display: inline-block; width: 14px; height: 13px; margin-right: 4px; vertical-align: -1px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 13'%3E%3Cpath d='M7 0 0 6h2v7h4V9h2v4h4V6h2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 13'%3E%3Cpath d='M7 0 0 6h2v7h4V9h2v4h4V6h2z'/%3E%3C/svg%3E") no-repeat center / contain; }
.breadcrumb [aria-current] { color: var(--gray-90); font-weight: 700; }

.page-title { margin: 0 0 32px; font-size: 40px; line-height: 1.5; font-weight: 700; letter-spacing: -0.02em; }
.section { margin-top: 64px; }
.section-title { margin: 0 0 16px; font-size: 24px; font-weight: 700; }
.section-title .count { color: var(--primary-60); }

/* 목록 머리 */
.list-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 2px solid var(--gray-90); }
.total { margin: 0; font-size: 15px; color: var(--gray-70); }
.total strong { color: var(--primary-60); }

/* 구조화 목록 */
.slist { list-style: none; margin: 0; padding: 0; }
.slist-item { padding: 24px 4px; border-bottom: 1px solid var(--gray-20); }
.slist-title { display: inline-block; font-size: 19px; font-weight: 700; color: var(--gray-90); text-decoration: none; line-height: 1.5; }
.slist-title:hover { color: var(--primary-60); text-decoration: underline; }
.slist-desc { margin: 6px 0 0; color: var(--gray-70); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; color: var(--gray-70); }
.meta-list li { display: inline-flex; gap: 6px; }
.meta-label { color: var(--gray-50); }
.meta-list li + li { position: relative; padding-left: 16px; }
.meta-list li + li::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--gray-30); }

.empty-state { padding: 64px 16px; text-align: center; color: var(--gray-60); border-bottom: 1px solid var(--gray-20); }
.empty-state p { margin: 0 0 16px; }

/* 페이지네이션 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 40px; flex-wrap: wrap; }
.page-link { min-width: 40px; height: 40px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: var(--r-m); color: var(--gray-90); text-decoration: none; font-size: 17px; }
.page-link:hover { background: var(--gray-5); color: var(--gray-90); }
.page-link.current { background: var(--secondary-70); color: #fff; font-weight: 700; }
.page-link.disabled { color: var(--gray-40); }
.page-link.prev, .page-link.next { padding: 0 14px; }

/* 글 보기 */
.article-head { padding-bottom: 24px; border-bottom: 2px solid var(--gray-90); }
.article-head .page-title { margin-bottom: 8px; }
.article-head .meta-list { margin-top: 0; }
.content { padding: 40px 0; font-size: 19px; line-height: 1.8; border-bottom: 1px solid var(--gray-20); }
.content > :first-child { margin-top: 0; }
.content p { margin: 0 0 1.2em; }
.content h2 { font-size: 28px; line-height: 1.5; margin: 2em 0 .6em; }
.content h3 { font-size: 24px; line-height: 1.5; margin: 1.8em 0 .5em; }
.content h4 { font-size: 21px; line-height: 1.5; margin: 1.6em 0 .5em; }
.content ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.content li { margin: .25em 0; }
.content li::marker { color: var(--gray-50); }
.content strong { font-weight: 700; }
.figure { margin: 32px 0; }
.figure img { display: block; max-width: 100%; height: auto; border-radius: var(--r-l); border: 1px solid var(--gray-10); }
.figure figcaption { margin-top: 8px; font-size: 15px; color: var(--gray-60); }
.file-link { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--gray-20); border-radius: var(--r-s); background: var(--gray-5); color: var(--gray-90); font-size: 15px; text-decoration: none; }
.file-link::before { content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M2 12v2h12v-2' stroke='black' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M2 12v2h12v-2' stroke='black' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat center / contain; }
.file-link:hover { border-color: var(--primary-50); color: var(--primary-60); }
.article-foot { padding-top: 24px; }
.policy h2 { font-size: 21px; margin-top: 1.6em; }

/* 댓글 */
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--gray-90); }
.comment-list li { padding: 20px 4px; border-bottom: 1px solid var(--gray-20); }
.comment-list p { margin: 6px 0 0; }
.comment-meta { display: flex; gap: 12px; align-items: baseline; font-size: 15px; color: var(--gray-60); }
.comment-meta strong { color: var(--gray-90); font-size: 17px; }
.comment-form { display: grid; gap: 16px; padding: 24px; background: var(--gray-5); border-radius: var(--r-l); }
.field-name { max-width: 320px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* 알림 */
.alert { position: relative; margin: 0 0 16px; padding: 14px 16px 14px 44px; border-radius: var(--r-m); font-size: 17px; }
.alert::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; background: currentColor; }
.alert-success { background: var(--success-5); color: var(--success-60); }
.alert-danger { background: var(--danger-5); color: var(--danger-60); }
.alert-warning { background: var(--warning-5); color: var(--warning-70); }
.alert-info { background: var(--info-5); color: var(--info-60); }

/* ── 입력 필드 ── */
.field { display: grid; gap: 8px; }
.field > label, .label { font-size: 17px; font-weight: 700; color: var(--gray-90); }
.optional { font-weight: 400; color: var(--gray-60); font-size: 15px; }
.hint { margin: 0; font-size: 15px; color: var(--gray-60); }
input, textarea, select, button { font: inherit; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--gray-50); border-radius: var(--r-m);
  background: var(--gray-0); color: var(--gray-90); font-size: 17px; line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--gray-50); }
input:hover, textarea:hover, select:hover { border-color: var(--gray-70); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-50); box-shadow: 0 0 0 1px var(--primary-50); }
textarea { resize: vertical; }
input[type=radio], input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--primary-50); flex: none; }

/* ── 버튼 (medium 48 / small 40 / xsmall 32) ── */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-m); font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary, button.btn-primary { background: var(--primary-50); color: #fff; }
.btn-primary:hover { background: var(--primary-60); color: #fff; }
.btn-secondary { background: var(--secondary-5); border-color: var(--secondary-70); color: var(--secondary-70); }
.btn-secondary:hover { background: var(--secondary-10); color: var(--secondary-80); }
.btn-tertiary { background: var(--gray-0); border-color: var(--gray-60); color: var(--gray-90); }
.btn-tertiary:hover { background: var(--gray-5); color: var(--gray-90); }
.btn-danger { background: var(--gray-0); border-color: var(--danger-50); color: var(--danger-60); }
.btn-danger:hover { background: var(--danger-5); }
.btn-text { background: none; border: 0; padding: 0 8px; color: var(--gray-70); font-weight: 400; text-decoration: underline; min-height: 40px; }
.btn-text:hover { color: var(--gray-90); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-xs { min-height: 32px; padding: 0 12px; font-size: 15px; font-weight: 400; }
.btn:disabled, button:disabled { opacity: .45; cursor: not-allowed; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-group.end { justify-content: flex-end; }

/* ── 푸터 ── */
.footer { background: var(--gray-5); border-top: 1px solid var(--gray-20); padding: 40px 0 48px; color: var(--gray-70); font-size: 15px; }
.footer-logo { margin: 0 0 16px; font-size: 19px; font-weight: 700; color: var(--gray-90); }
.footer-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 20px; }
.footer-links a { color: var(--gray-90); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin: 0; color: var(--gray-60); }

/* 사진 내려받기 */
.figure figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; color: var(--gray-70); text-decoration: underline; white-space: nowrap; }
.dl::before { content: ""; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M2 12v2h12v-2' stroke='black' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0L4.5 6.5M8 10l3.5-3.5M2 12v2h12v-2' stroke='black' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat center / contain; }
.dl:hover { color: var(--primary-60); }

/* 사진첩 목록 (카드) */
.album-cards { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.album-card { display: block; border: 1px solid var(--gray-20); border-radius: var(--r-l); overflow: hidden; color: var(--gray-90); text-decoration: none; background: var(--gray-0); }
.album-card:hover { border-color: var(--primary-50); color: var(--gray-90); }
.album-card:hover strong { color: var(--primary-60); text-decoration: underline; }
.album-cover { display: block; aspect-ratio: 4 / 3; background: var(--gray-5); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-empty { height: 100%; display: grid; place-items: center; color: var(--gray-50); font-size: 15px; }
.album-card-body { display: grid; gap: 4px; padding: 16px; }
.album-card-body strong { font-size: 19px; line-height: 1.5; }
.album-card-meta { font-size: 15px; color: var(--gray-60); }

/* 사진첩 상세 (격자) */
.album-intro { padding-bottom: 8px; border-bottom: 0; }
.album-body { padding: 32px 0 40px; border-bottom: 1px solid var(--gray-20); }
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.album-item { display: grid; gap: 6px; }
.album-view { display: block; aspect-ratio: 1 / 1; border-radius: var(--r-m); overflow: hidden; background: var(--gray-5); }
.album-view img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.album-view:hover img { transform: scale(1.03); }
.album-cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.album-alt { font-size: 15px; color: var(--gray-70); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-cap .dl { font-size: 13px; }

/* ── 반응형 (small: 768px 미만) ── */
@media (max-width: 767px) {
  body { font-size: 17px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .header-inner { min-height: 64px; }
  .logo-text { font-size: 19px; }
  .logo-mark { width: 32px; height: 32px; font-size: 16px; }
  .gnb a { font-size: 17px; padding: 12px 6px 10px; }
  .page-title { font-size: 28px; margin-bottom: 24px; }
  .content { font-size: 17px; padding: 28px 0; }
  .content h2 { font-size: 22px; } .content h3 { font-size: 19px; } .content h4 { font-size: 17px; }
  .slist-item { padding: 20px 2px; }
  .comment-form { padding: 16px; }
  .btn-group.end .btn { flex: 1; }
  .album-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .album-card-body { padding: 10px 12px; }
  .album-card-body strong { font-size: 17px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .album-alt { display: none; }
}
