/* ==========================================================================
   가정교회 사역원 테마 — 공통 스타일
   Figma 시안 기준: 데스크톱 1440px(좌우 80px), 모바일 420px(좌우 24px)
   글자 크기는 rem(16px 기준)으로 적어 "글자 크기 조절"이 전체에 적용되게 합니다.
   ========================================================================== */

/* ---------- 디자인 토큰 ---------- */
:root {
	--c-primary: #214f3d;      /* 주색 · 진한 초록 */
	--c-ink: #202e28;          /* 본문 제목 */
	--c-muted: #56615a;        /* 보조 글자 */
	--c-placeholder: #747d75;  /* 입력 안내 글자 */
	--c-field-line: #a6aea5;   /* 입력란 테두리 */
	--c-line: #d8ddd5;         /* 구분선 */
	--c-bg: #faf8f3;           /* 기본 배경 · 미색 */
	--c-sand: #f0ece3;         /* 모래색 면 */
	--c-sage: #eaf0e9;         /* 연초록 면 */
	--c-white: #ffffff;
	--c-on-primary: #f9faf5;
	--c-on-primary-muted: #d2dfd2;
	--c-kakao: #fee500;

	--font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

	--gutter: 80px;
	--max: 1440px;
	--radius-sm: 8px;
	--radius: 16px;
	--radius-hero: 80px;
}

@media (max-width: 1024px) { :root { --gutter: 40px; } }
@media (max-width: 640px)  { :root { --gutter: 24px; } }

/* 글자 크기 조절: html 기준 크기만 바꿉니다 (assets/js/main.js) */
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-font-scale="1"] { font-size: 112.5%; }
html[data-font-scale="2"] { font-size: 125%; }

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font);
	font-size: 1.0625rem; /* 17px */
	line-height: 1.65;
	word-break: keep-all;
	overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.4; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 2px; }

.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	padding: 12px 20px; background: var(--c-primary); color: var(--c-on-primary); font-weight: 700;
}

.icon { flex-shrink: 0; width: 1em; height: 1em; }

/* ---------- 레이아웃 ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(640px + var(--gutter) * 2); }
.section { padding-block: 80px; }
.section--white { background: var(--c-white); }
.section--sage  { background: var(--c-sage); }
.section--sand  { background: var(--c-sand); }
.stack > * + * { margin-top: var(--stack-gap, 20px); }
@media (max-width: 640px) { .section { padding-block: 56px; } }

/* ---------- 글자 ---------- */
.eyebrow { color: var(--c-primary); font-weight: 700; font-size: 1rem; line-height: 1.5; }
.display { font-size: 3.5625rem; font-weight: 700; line-height: 1.3; }      /* 57 */
.h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.4; }              /* 44 */
.h2 { font-size: 2.375rem; font-weight: 700; line-height: 1.4; }             /* 38 */
.h3 { font-size: 2rem; font-weight: 700; line-height: 1.4; }                 /* 32 */
.h4 { font-size: 1.5rem; font-weight: 700; line-height: 1.5; }               /* 24 */
.h5 { font-size: 1.375rem; font-weight: 700; line-height: 1.5; }             /* 22 */
.lead { font-size: 1.25rem; line-height: 1.75; color: var(--c-muted); }      /* 20 */
.body-lg { font-size: 1.125rem; line-height: 1.7; }                          /* 18 */
.muted { color: var(--c-muted); }
.small { font-size: 0.875rem; }
.caption { font-size: 0.8125rem; color: var(--c-muted); }
@media (max-width: 640px) {
	.display { font-size: 2.375rem; }
	.h1 { font-size: 2rem; }
	.h2 { font-size: 1.875rem; }
	.h3 { font-size: 1.625rem; }
	.lead { font-size: 1.125rem; }
}

/* ---------- 링크 · 버튼 ---------- */
.link-arrow {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
	color: var(--c-primary); font-weight: 700; font-size: 1.0625rem; line-height: 1.4;
}
.link-arrow .icon { width: 19px; height: 19px; }
.link-arrow--light { color: var(--c-on-primary); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 16px;
	min-height: 56px; padding: 12px 22px; border-radius: var(--radius-sm);
	border: 1px solid var(--c-primary); background: var(--c-primary); color: var(--c-on-primary);
	font-weight: 700; font-size: 1.0625rem; line-height: 1.3; text-align: center; cursor: pointer;
}
.btn:hover { text-decoration: none; background: #183c2e; }
.btn .icon { width: 20px; height: 20px; }
.btn--outline { background: var(--c-white); color: var(--c-primary); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-sage); }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-line); }
.btn--kakao { background: var(--c-kakao); border-color: var(--c-kakao); color: #191919; }
.btn--kakao:hover { background: #f5dc00; }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }

/* ---------- 카드 · 면 ---------- */
.card { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 32px; }
.card--sage { background: var(--c-sage); border-color: transparent; }
.card--sand { background: var(--c-sand); border-color: transparent; }
.card--primary { background: var(--c-primary); border-color: transparent; color: var(--c-on-primary); }
.card--tight { padding: 24px; border-radius: var(--radius-sm); }
@media (max-width: 640px) { .card { padding: 24px; } }

.divider { height: 1px; background: var(--c-line); border: 0; margin: 0; }
.tag {
	display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px;
	background: var(--c-sage); color: var(--c-primary); font-size: 0.875rem; font-weight: 700; line-height: 1.4;
}
.tag--sand { background: var(--c-sand); }
.tag--line { background: transparent; border: 1px solid var(--c-line); color: var(--c-muted); }

/* ---------- 입력 양식 ---------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field__label { font-weight: 700; font-size: 1.0625rem; color: var(--c-ink); }
.field__label .req { color: #b3261e; margin-left: 4px; }
.field__help { font-size: 0.875rem; color: var(--c-muted); line-height: 1.65; }
.input, .select, .textarea {
	width: 100%; min-height: 56px; padding: 16px; border: 1px solid var(--c-field-line); border-radius: var(--radius-sm);
	background: var(--c-white); color: var(--c-ink); font: inherit; font-size: 1.0625rem; line-height: 1.4;
}
.textarea { min-height: 200px; resize: vertical; line-height: 1.65; }
.input::placeholder, .textarea::placeholder { color: var(--c-placeholder); }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(33, 79, 61, .25); border-color: var(--c-primary); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 72px; }
.input-group__action { position: absolute; right: 16px; color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; }
.check { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 1.0625rem; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-primary); }
.or-divider { display: flex; align-items: center; gap: 16px; color: var(--c-muted); font-size: 0.875rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

/* ---------- 사이트 머리말 ---------- */
.site-header { display: flex; flex-direction: column; }
.util-bar { background: var(--c-sand); }
.util-bar__inner { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.util-bar__brand { font-size: 0.8125rem; color: var(--c-muted); letter-spacing: .02em; }
.util-bar__menu { display: flex; align-items: center; gap: 28px; font-size: 0.9375rem; color: var(--c-muted); }
.util-bar__menu ul { display: flex; gap: 28px; }
.font-scale { display: flex; align-items: center; gap: 12px; }
.font-scale__label { color: var(--c-ink); }
.font-scale button { color: var(--c-primary); line-height: 1; padding: 4px 2px; min-width: 32px; min-height: 32px; }
.font-scale__down { font-size: 1.0625rem; }
.font-scale__up { font-size: 1.25rem; font-weight: 700; }

.main-bar { background: var(--c-white); }
.main-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 104px; }
.brand { display: flex; flex-direction: column; gap: 3px; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand__name { color: var(--c-primary); font-size: 1.75rem; font-weight: 700; white-space: nowrap; }
.brand__en { color: var(--c-muted); font-size: 0.75rem; }
.primary-nav ul { display: flex; gap: 28px; }
.primary-nav a { display: block; padding: 8px 0; font-weight: 700; font-size: 1.0625rem; color: var(--c-ink); white-space: nowrap; border-bottom: 3px solid transparent; }
.primary-nav a:hover { text-decoration: none; color: var(--c-primary); }
.primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .current_page_item > a, .primary-nav .current_page_ancestor > a {
	color: var(--c-primary); border-bottom-color: var(--c-primary);
}
.primary-nav .sub-menu { display: none; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-action { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9375rem; color: var(--c-ink); }
.header-action .icon { width: 24px; height: 24px; }
.header-action--menu { display: none; }

@media (max-width: 1180px) {
	.primary-nav { display: none; }
	.header-action--menu { display: inline-flex; }
}
@media (max-width: 640px) {
	.site-header .util-bar { order: 2; }
	.main-bar__inner { height: 88px; }
	.brand__name { font-size: 1.4375rem; }
	.brand__en { font-size: 0.6875rem; }
	.util-bar__brand, .font-scale__label { display: none; }
	.util-bar__menu { width: 100%; justify-content: space-between; font-size: 0.875rem; }
	.util-bar__menu ul { gap: 4px; }
	.util-bar__menu li + li::before { content: "· "; }
	.header-action { flex-direction: column; gap: 3px; font-size: 0.6875rem; }
}

/* 전체 메뉴(모바일) · 검색 패널 */
.drawer, .search-panel { display: none; }
.drawer.is-open, .search-panel.is-open { display: block; }
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(32, 46, 40, .45); }
.drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); overflow-y: auto;
	background: var(--c-white); padding: 24px var(--gutter) 40px;
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer__close { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--c-primary); }
.drawer__nav > ul > li { border-bottom: 1px solid var(--c-line); }
.drawer__nav > ul > li > a { display: block; padding: 18px 0; font-size: 1.25rem; font-weight: 700; }
.drawer__nav .sub-menu { padding: 0 0 16px 4px; }
.drawer__nav .sub-menu a { display: block; padding: 8px 0; color: var(--c-muted); }
.search-panel { background: var(--c-white); border-top: 1px solid var(--c-line); box-shadow: 0 8px 24px rgba(32, 46, 40, .08); }
.search-panel .container { padding-block: 24px; }
.search-form { display: flex; gap: 12px; }
.search-form .input { flex: 1; }

/* ---------- 페이지 소개 (하위 페이지 공통) ---------- */
.page-intro { padding-block: 48px 32px; }
.page-intro .breadcrumb { font-size: 0.875rem; color: var(--c-muted); line-height: 1.65; margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { margin-inline: 6px; }
.page-intro__body { display: flex; flex-direction: column; gap: 14px; }
.page-intro__eyebrow { color: var(--c-primary); font-size: 0.9375rem; font-weight: 700; }
.page-intro__title { font-size: 2.75rem; font-weight: 700; line-height: 1.4; }
.page-intro__desc { font-size: 1.125rem; color: var(--c-muted); line-height: 1.65; max-width: 760px; }
@media (max-width: 640px) {
	.page-intro { padding-block: 32px 24px; }
	.page-intro .breadcrumb { margin-bottom: 16px; }
	.page-intro__title { font-size: 2rem; }
	.page-intro__desc { font-size: 1.125rem; }
}
.page-body { padding-bottom: 80px; }
@media (max-width: 640px) { .page-body { padding-bottom: 56px; } }

/* ---------- 공통 목록 블록 ---------- */
.board__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 64px; border-bottom: 2px solid var(--c-ink);
}
.board__title { font-size: 1.5rem; font-weight: 700; }
.board__note { display: flex; align-items: center; height: 40px; font-size: 0.8125rem; color: var(--c-muted); }
.board__item { display: flex; align-items: center; gap: 16px; min-height: 86px; padding-block: 22px; border-bottom: 1px solid var(--c-line); }
.board__item-title { flex: 1; font-size: 1.1875rem; font-weight: 500; line-height: 1.65; }
.board__item .icon { width: 18px; height: 18px; color: var(--c-ink); }
.board__item:hover { text-decoration: none; }
.board__item:hover .board__item-title { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.board__empty { display: flex; flex-direction: column; gap: 16px; padding-block: 36px; color: var(--c-muted); font-size: 1.125rem; }
.board__empty .icon { width: 28px; height: 28px; color: var(--c-primary); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-white); font-weight: 700;
}
.pagination .page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.pagination a.page-numbers:hover { text-decoration: none; border-color: var(--c-primary); }

/* ---------- 본문(워드프레스 편집기 콘텐츠) ---------- */
.entry-content { font-size: 1.125rem; line-height: 1.8; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: 1.75rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.375rem; margin-top: 1.6em; }
.entry-content a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul { list-style: disc; padding-left: 1.4em; }
.entry-content ol { list-style: decimal; padding-left: 1.4em; }
.entry-content blockquote { border-left: 4px solid var(--c-primary); padding: 4px 0 4px 20px; color: var(--c-muted); }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--c-line); padding: 12px; text-align: left; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

/* ---------- 바닥글 ---------- */
.site-footer { background: var(--c-sage); padding-block: 56px 32px; }
.site-footer__top { display: flex; gap: 80px; }
.site-footer__org { width: 600px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.site-footer__brand .brand__name { font-size: 1.5625rem; }
.site-footer__brand .brand__en { font-size: 0.875rem; }
.site-footer__contact { display: flex; flex-direction: column; gap: 10px; font-size: 0.9375rem; color: var(--c-muted); }
.site-footer__contact .label { margin-right: 8px; }
.footer-nav { flex: 1; }
.footer-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-flow: column; grid-template-rows: repeat(3, 48px); column-gap: 24px; }
.footer-nav a { display: flex; align-items: center; height: 48px; color: var(--c-primary); font-weight: 700; font-size: 1rem; }
.site-footer__bottom {
	display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
	margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-line);
}
.policy-nav ul { display: flex; gap: 28px; font-size: 0.875rem; color: var(--c-muted); }
.policy-nav li:first-child a { color: var(--c-ink); font-weight: 700; }
.copyright { font-size: 0.75rem; color: var(--c-muted); }
@media (max-width: 1024px) {
	.site-footer__top { flex-direction: column; gap: 32px; }
}
@media (max-width: 640px) {
	.site-footer { padding-top: 40px; }
	.site-footer__top { gap: 32px; }
	.site-footer__bottom { flex-direction: column; margin-top: 32px; }
	.policy-nav ul { gap: 20px; }
}

/* ---------- 간소한 머리말·바닥글 (header-focus.php / footer-focus.php) ---------- */
.focus-back { color: var(--c-primary); font-weight: 700; font-size: 1.0625rem; line-height: 1.6; min-height: 44px; display: inline-flex; align-items: center; }
.focus-back__short { display: none; }
.site-footer--focus { background: var(--c-bg); border-top: 1px solid var(--c-line); padding-block: 40px; }
.site-footer--focus .container { display: flex; flex-direction: column; gap: 24px; }
.site-footer--focus .policy-nav li:first-child a { color: var(--c-muted); font-weight: 400; }
@media (max-width: 640px) {
	.focus-back__long { display: none; }
	.focus-back__short { display: inline; }
}
