/* pipeline-content.css
 * ─────────────────────────────────────────────────────────────────────────────
 * projects/wordpress 발행 파이프라인(wp-publishing)이 본문에 넣는 마크업의
 * "렌더링 계약". 운영 사이트의 Customizer > 추가 CSS(GeneratePress 테마에 붙어
 * 있던 1891자)를 자식 테마로 이관한 것. 원본은 _legacy/additional-css.css.
 *
 * 파이프라인이 의존하는 클래스/구조 (건드리면 기존 글이 깨짐):
 *   .button-box > a.click-button      광고/제휴 클릭 버튼 (버튼 id 이름: click-button)
 *   p strong                          형광펜 하이라이트
 *   .entry-content h2                 본문 H2 박스 스타일 (구 .site-content h2 — 사이드바 위젯 제목까지
 *                                     먹지 않도록 본문 영역으로 스코프 좁힘)
 *   .main-content                     본문 강조 박스
 *   .entry-content .alignwide/.alignfull
 *
 * STEP 3(design.md 확정)에서 새 디자인 토큰으로 다시 칠하되, 위 셀렉터는 유지한다.
 * ───────────────────────────────────────────────────────────────────────────── */

.entry-content p {
	line-height: 1.7;
	margin-bottom: 1.2em;
	color: #333;
	font-size: 16px;
}

/* 본문 링크는 밑줄로 구분 (WCAG: 색만으로 구분 금지) */
.entry-content a:not(.click-button) {
	color: #1f57bd;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.entry-content a:not(.click-button):hover { color: #16357a; }

/* ── 본문 연결 버튼 (파이프라인 계약: .button-box > a.click-button) ────────
 * 정보 출처(공공기관·공식 페이지)로 이어주는 버튼. "행동 압박형 광고 CTA"
 * 인상을 피하려 초대형 글씨(26px)·바닥 큰 그림자·중앙 정렬을 걷어냈다.
 * 채운 버튼은 유지 — 클릭률 때문. 애드센스 슬롯과 색·모양이 겹치지 않게 둘 것. */
.button-box {
	display: block;
	margin: 1.6em 0;
}

.click-button,
.entry-content a.click-button,
.entry-content button.click-button {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	background-color: var(--isd-accent);
	border: none;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	padding: 12px 22px;
	border-radius: var(--isd-radius);
	transition: background-color 0.18s ease;
	cursor: pointer;
	text-decoration: none;
	color: #ffffff;
	box-shadow: 0 1px 2px rgba(20, 30, 55, 0.14);
}

.click-button::after {
	content: "\2192"; /* → 외부/이동 신호 */
	font-weight: 400;
}

.click-button:hover,
.entry-content a.click-button:hover,
.entry-content button.click-button:hover {
	background-color: var(--isd-accent-ink);
	color: #ffffff;
}

@media only screen and (max-width: 600px) {
	.click-button {
		display: flex;
		justify-content: center;
		padding: 12px 18px;
	}
}

/* ── 본문 하이라이트 / 제목 / 강조 박스 ────────────────────────────────── */
.entry-content p strong {
	text-decoration: none;
	display: inline;
	box-shadow: inset 0 -10px #e1f618e6;
	color: #3a3d46;
}

.entry-content h2 {
	background: #d9e5ff;
	color: #000000;
	font-weight: bold;
	font-size: 30px;
	margin: 1.6em 0 1em 0;
	padding: 15px 20px;
	border-radius: 25px 25px 25px 0;
	box-shadow: 1px 3px 3px 0 #469789;
}

.entry-content h3 {
	font-size: 20px;
	font-weight: bold;
	margin-top: 30px;
}

.main-content {
	padding: 15px 20px;
	background-color: #f6f8ea;
	border-radius: 20px 0 20px 0;
	border: 2px solid #959d86;
	line-height: 1.8;
	margin-bottom: 40px;
}

.entry-content .alignwide,
body:not(.no-sidebar) .entry-content .alignfull {
	margin-left: -10px;
	width: calc(100% + 80px);
	max-width: calc(100% + 22px);
}

/* ── 본문 미디어 오버플로우 방지 (모바일 가로 스크롤 차단) ─────────────
 * 클래식 에디터가 캡션 <figure> 에 인라인 style="width:491px" 을 넣고,
 * 외부에서 붙여넣은 표에 미정의 유틸 클래스가 섞여 들어와 좁은 화면에서
 * 본문 폭을 밀어낸다. 아래로 전부 컨테이너 폭 안에 가둔다. */
.entry-content img,
.entry-content figure,
.entry-content .wp-caption,
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
	max-width: 100%;
}
.entry-content img { height: auto; }
.entry-content .wp-caption img { width: 100%; }

/* 표: 폭이 넘치면 표 자체만 가로 스크롤 (본문/페이지는 스크롤 안 함) */
.entry-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── 애드센스 (파이프라인이 <!-- wp:html --> 로 삽입) ───────────────── */
.entry-content ins.adsbygoogle {
	display: block;
	margin: 12px auto;
	text-align: center;
	overflow: hidden;
}
/* 광고가 안 채워지면 자리를 남기지 않는다. AdSense 가 unfilled 슬롯에
 * 인라인 style="display:block;height:280px" 을 남기므로 !important 로 눌러야
 * 빈 자리가 접힌다. */
.entry-content ins.adsbygoogle[data-ad-status="unfilled"] {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
}
/* wpautop 이 만든 빈 문단 제거 */
.entry-content p:empty { display: none; }
