/* 나눔터 — 가정교회 토론방(forum.php), 토론방 글 보기(single/forum.php), 나눔터 글쓰기(write.php), 원장 칼럼(single/column.php)
   접두어 forum-, post-, write-, col- */

/* ---------- 공통: 선 버튼 · 본문 폭 · 글 도구 ---------- */
.post-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 56px; padding: 12px 24px; border: 1px solid var(--c-field-line); border-radius: var(--radius-sm);
	background: var(--c-white); color: var(--c-primary); font-weight: 700; font-size: 1.0625rem; line-height: 1.5;
	cursor: pointer; white-space: nowrap;
}
.post-btn:hover { text-decoration: none; border-color: var(--c-primary); background: var(--c-sage); }
.post-btn--sm { min-height: 46px; padding: 10px 16px; font-size: 1rem; }
.post-btn.is-active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }

.post-wrap { max-width: 880px; margin-inline: auto; display: flex; flex-direction: column; gap: 40px; padding-top: 8px; }
.post-wrap > .divider { width: 100%; }
.post-back { align-self: flex-start; }

.post-tools, .forum-links, .forum-item__links, .post-nav {
	display: flex; flex-wrap: wrap; gap: 12px 24px;
	color: var(--c-primary); font-weight: 700; font-size: 1rem; line-height: 1.8;
}
.post-tools a, .post-tools button, .forum-links a, .forum-item__links a, .post-nav a, .write-back, .col-more__link {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--c-primary); font-weight: 700;
}
.post-tools .icon, .forum-links .icon, .forum-item__links .icon, .post-nav .icon, .write-back .icon, .col-more__link .icon { width: 18px; height: 18px; }

.post-thumb img { width: 100%; border-radius: var(--radius); }

/* 본문 (시안: 본문 20px · 소제목 26px · 문단 사이 여유) */
.post-content { font-size: 1.25rem; line-height: 1.75; }
.post-content > * + * { margin-top: 20px; }
.post-content h2 { font-size: 1.625rem; margin-top: 32px; }
.post-content h3 { font-size: 1.375rem; margin-top: 28px; }
.post-content blockquote { border-left: 3px solid var(--c-line); padding: 24px; font-size: 1.125rem; }
.post-content figcaption, .post-content .wp-caption-text { font-size: 0.9375rem; color: var(--c-muted); margin-top: 8px; }

/* 안내 상자 (토론방 · 글쓰기 공통) */
.forum-guide { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--c-sage); border-radius: var(--radius-sm); line-height: 1.75; }
.forum-guide__title { font-size: 1.125rem; font-weight: 700; color: var(--c-ink); }
.forum-guide__desc { font-size: 1rem; color: var(--c-muted); }

/* ---------- 가정교회 토론방 (목록) ---------- */
.forum-page { display: flex; flex-direction: column; gap: 40px; }

.forum-tabs__list { display: flex; gap: 36px; border-bottom: 1px solid var(--c-line); }
.forum-tabs__link {
	display: flex; align-items: center; min-height: 44px; padding-block: 16px; margin-bottom: -1px;
	font-size: 1.125rem; color: var(--c-muted); border-bottom: 3px solid transparent; white-space: nowrap; line-height: 1.3;
}
.forum-tabs__link:hover { color: var(--c-primary); text-decoration: none; }
.forum-tabs__link.is-current { color: var(--c-primary); font-weight: 700; border-bottom-color: var(--c-primary); }
.forum-tabs__select { display: none; }

.forum-links .icon-lock { width: 16px; height: 16px; }

.forum-search { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--c-sand); border-radius: var(--radius); }
.forum-search__label { color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; line-height: 1.75; }
.forum-search__row { display: flex; gap: 10px; align-items: center; }
.forum-search__row .input { flex: 1; min-width: 0; min-height: 58px; font-size: 1.125rem; }
.forum-search__btn { padding-inline: 24px; }

.forum-list__head { display: flex; align-items: center; gap: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--c-line); }
.forum-list__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.forum-list__title { font-size: 1.5rem; line-height: 1.75; }
.forum-list__note { font-size: 0.875rem; color: var(--c-muted); }
.forum-list__write { padding-inline: 24px; }

.forum-items { margin-top: 12px; }
.forum-item { display: flex; flex-direction: column; gap: 10px; padding-block: 24px; border-bottom: 1px solid var(--c-line); }
.forum-item__title { font-size: 1.4375rem; line-height: 1.75; }
.forum-item__title a { display: flex; align-items: center; gap: 24px; }
.forum-item__title a > span { flex: 1; min-width: 0; }
.forum-item__title .icon { width: 24px; height: 24px; color: var(--c-primary); }
.forum-item__title a:hover { text-decoration: none; }
.forum-item__title a:hover > span { color: var(--c-primary); text-decoration: underline; text-underline-offset: 4px; }
.forum-item__meta { font-size: 0.9375rem; color: var(--c-muted); line-height: 1.75; }
.forum-sample-note { margin-top: 40px; font-size: 0.875rem; color: var(--c-muted); line-height: 1.75; }
.forum-list .pagination .page-numbers { min-height: 46px; border-color: var(--c-field-line); color: var(--c-primary); }
.forum-list .pagination .page-numbers.current { color: var(--c-white); }

/* ---------- 토론방 글 보기: 댓글 (comments.php 출력) ---------- */
.post-comments #comments { display: flex; flex-direction: column; gap: 20px; }
.post-comments #comments > h2 { font-size: 1.625rem; line-height: 1.75; }
.post-comments .comment-list { display: flex; flex-direction: column; }
.post-comments .comment-list .children { padding-left: 32px; border-left: 2px solid var(--c-line); margin-left: 8px; }
.post-comments .comment-body { padding-block: 20px; border-bottom: 1px solid var(--c-line); }
.post-comments .comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.9375rem; color: var(--c-muted); }
.post-comments .comment-author { display: flex; align-items: center; gap: 10px; }
.post-comments .comment-author .avatar { border-radius: 50%; width: 40px; height: 40px; }
.post-comments .comment-author .fn { color: var(--c-ink); font-weight: 700; font-style: normal; }
.post-comments .comment-author .says { display: none; }
.post-comments .comment-metadata a { color: var(--c-muted); }
.post-comments .comment-content { margin-top: 10px; font-size: 1.0625rem; line-height: 1.75; }
.post-comments .comment-content > * + * { margin-top: 10px; }
.post-comments .reply { margin-top: 6px; }
.post-comments .reply a, .post-comments #cancel-comment-reply-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; }
.post-comments .comment-awaiting-moderation { display: block; margin-top: 6px; font-size: 0.875rem; color: var(--c-muted); }
.post-comments .comments-pagination, .post-comments .comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; color: var(--c-primary); }

.post-comments .comment-respond {
	display: flex; flex-direction: column; gap: 20px; padding: 24px;
	background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
}
.post-comments .comment-reply-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 1.25rem; line-height: 1.75; }
.post-comments .comment-reply-title small { font-size: 0.9375rem; }
.post-comments .comment-form { display: flex; flex-direction: column; gap: 20px; }
.post-comments .comment-form p { margin: 0; }
.post-comments .comment-notes, .post-comments .logged-in-as, .post-comments .must-log-in { font-size: 1.0625rem; color: var(--c-muted); line-height: 1.75; }
.post-comments .logged-in-as a, .post-comments .must-log-in a { color: var(--c-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.post-comments .comment-form label { display: block; margin-bottom: 10px; color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; line-height: 1.75; }
.post-comments .comment-form .field label { margin-bottom: 0; }
.post-comments .comment-form input[type="text"], .post-comments .comment-form input[type="email"], .post-comments .comment-form input[type="url"] {
	width: 100%; min-height: 58px; padding: 16px; border: 1px solid var(--c-field-line); border-radius: var(--radius-sm);
	background: var(--c-white); font: inherit; font-size: 1.0625rem;
}
.post-comments .comment-form .textarea { min-height: 120px; }
.post-comments .comment-form-cookies-consent { display: flex; align-items: center; gap: 10px; }
.post-comments .comment-form-cookies-consent label { margin: 0; color: var(--c-muted); font-weight: 400; }
.post-comments .comment-form-cookies-consent input { width: 22px; height: 22px; accent-color: var(--c-primary); }
.post-comments .form-submit { display: flex; justify-content: flex-end; }
.post-comments .form-submit .btn {
	min-height: 46px; padding: 10px 16px; font-size: 1rem;
	background: var(--c-white); color: var(--c-primary); border-color: var(--c-field-line);
}
.post-comments .form-submit .btn:hover { background: var(--c-sage); border-color: var(--c-primary); }

.post-nav { padding-top: 16px; border-top: 1px solid var(--c-line); }

/* ---------- 나눔터 글쓰기 ---------- */
.write-back { align-self: flex-start; font-size: 1rem; line-height: 1.8; }
.write-form { display: flex; flex-direction: column; gap: 32px; }
.write-field { display: flex; flex-direction: column; gap: 10px; }
.write-field--body { gap: 12px; }
.write-label { color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; line-height: 1.75; }
.write-help { font-size: 1rem; color: var(--c-muted); line-height: 1.75; }
.write-note { font-size: 0.875rem; color: var(--c-muted); line-height: 1.75; }
.write-form .input, .write-form .select { min-height: 58px; }

.write-select { position: relative; display: flex; align-items: center; }
.write-select .select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer; }
.write-select .icon { position: absolute; right: 16px; width: 18px; height: 18px; pointer-events: none; color: var(--c-ink); }

.write-editor { display: flex; flex-direction: column; background: var(--c-white); border: 1px solid var(--c-field-line); border-radius: var(--radius-sm); overflow: hidden; }
.write-editor:focus-within { border-color: var(--c-primary); outline: 3px solid rgba(33, 79, 61, .25); }
.write-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; background: var(--c-sand); }
.write-textarea {
	display: block; width: 100%; min-height: 400px; padding: 24px; border: 0; resize: vertical;
	background: var(--c-white); color: var(--c-ink); font: inherit; font-size: 1.125rem; line-height: 1.75;
}
.write-textarea::placeholder { color: var(--c-muted); }
.write-textarea:focus { outline: 0; }

.write-attach { margin: 0; padding: 0; border: 0; min-width: 0; }
.write-attach__title { padding: 0; margin-bottom: 16px; font-size: 1.375rem; font-weight: 700; line-height: 1.75; color: var(--c-ink); }
.write-attach__box { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; background: var(--c-sand); border-radius: var(--radius-sm); }
.write-attach__box > p:first-child { font-size: 1.0625rem; line-height: 1.75; }
.write-attach__input:focus-visible + label { outline: 3px solid var(--c-primary); outline-offset: 2px; }

.write-save-help { display: flex; flex-direction: column; gap: 8px; }
.write-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.write-submit { padding-inline: 24px; }

/* ---------- 원장 칼럼 읽기와 듣기 ---------- */
.col-listen { display: flex; flex-direction: column; gap: 20px; padding: 28px; background: var(--c-sage); border-radius: var(--radius); }
.col-listen__title { display: flex; align-items: center; gap: 12px; font-size: 1.4375rem; line-height: 1.75; }
.col-listen__title .icon { width: 26px; height: 26px; color: var(--c-primary); }
.col-listen__audio { display: block; width: 100%; height: 56px; }
.col-speed { display: flex; flex-direction: column; gap: 10px; }
.col-speed[hidden] { display: none; }
.col-speed__label { color: var(--c-primary); font-weight: 700; font-size: 0.9375rem; line-height: 1.75; }
.col-speed__btns { display: flex; flex-wrap: wrap; gap: 8px; }

.col-more { display: flex; flex-direction: column; gap: 20px; }
.col-more__title { font-size: 1.625rem; line-height: 1.75; }
.col-more__item { display: flex; flex-direction: column; gap: 8px; padding-block: 16px; border-bottom: 1px solid var(--c-line); }
.col-more__meta { font-size: 0.9375rem; color: var(--c-muted); line-height: 1.75; }
.col-more__item-title { font-size: 1.4375rem; line-height: 1.75; }
.col-more__item-title a:hover { color: var(--c-primary); }
.col-more__link { align-self: flex-start; font-size: 1rem; line-height: 1.8; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
	.forum-item__title { font-size: 1.3125rem; }
}
@media (max-width: 640px) {
	.post-wrap, .forum-page, .write-form { gap: 32px; }
	.post-content > * + * { margin-top: 20px; }

	/* 분야 메뉴 → "현재 메뉴 · 메뉴 변경" 펼침 */
	.forum-page { gap: 32px; }
	.forum-tabs__list { display: none; }
	.forum-tabs__select { display: block; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
	.forum-tabs__select summary {
		display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 16px;
		list-style: none; cursor: pointer;
	}
	.forum-tabs__select summary::-webkit-details-marker { display: none; }
	.forum-tabs__current { color: var(--c-primary); font-weight: 700; font-size: 1.0625rem; }
	.forum-tabs__change { display: inline-flex; align-items: center; gap: 4px; color: var(--c-muted); font-size: 0.9375rem; }
	.forum-tabs__select[open] .forum-tabs__change .icon { transform: rotate(180deg); }
	.forum-tabs__select ul { border-top: 1px solid var(--c-line); padding: 4px 0; }
	.forum-tabs__select li a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: 1.0625rem; }
	.forum-tabs__select li a[aria-current] { color: var(--c-primary); font-weight: 700; }

	.forum-search { padding: 20px; }
	.forum-search__row .input { font-size: 1rem; }
	.forum-item__title { font-size: 1.25rem; }
	.forum-item__title .icon { display: none; }
	.forum-sample-note { margin-top: 32px; }

	.write-actions > * { flex: 1 1 0; padding-inline: 12px; }

	/* 칼럼: 본문을 가리지 않도록 듣기 도구를 글 아래로 */
	.col-page__tools { order: 1; }
	.col-page__divider { order: 2; }
	.col-page__content { order: 3; }
	.col-page .post-nav-links { order: 4; }
	.col-more { order: 5; }
	.col-listen { order: 6; padding: 20px; }
	.col-page__back { order: 7; }
}

/* 인쇄: 본문만 */
@media print {
	.site-header, .site-footer, .post-tools, .post-nav, .post-back, .post-comments, .col-listen, .col-more, .forum-tabs { display: none !important; }
	.post-wrap { max-width: none; }
}
