/* 다독다독 읽기 숲 — 읽기 자료 목록과 기사 페이지 */

.dkforest,
.dkforest-article {
	--dkf-ink: #1a1a1a;
	--dkf-sub: #767676;
	--dkf-line: #e3ece6;
	--dkf-green: #2d6a4f;
	--dkf-leaf: #f0f9f3;
	--dkf-red: #e84343;
	box-sizing: border-box;
	color: var(--dkf-ink);
	word-break: keep-all;
	overflow-wrap: anywhere;
}

.dkforest *,
.dkforest-article * {
	box-sizing: border-box;
}

/* ---------- 목록 ---------- */

.dkforest {
	width: 100%;
	max-width: 1148px;
	margin: 0 auto;
	padding: 56px 24px 80px;
}

.dkforest__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 36px;
}

.dkforest .dkforest__title {
	margin: 0;
	padding: 0;
	font-size: 28px;
	font-weight: 900;
	line-height: 1.3;
	color: var(--dkf-ink);
}

.dkforest__subtitle {
	margin-left: 10px;
	font-size: 15px;
	font-weight: 500;
	color: #999;
}

.dkforest .dkforest__link {
	flex: none;
	padding: 7px 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--dkf-red);
	background: transparent;
	text-decoration: none !important;
	border: 1.5px solid var(--dkf-red);
	border-radius: 20px;
	transition: background 0.15s ease, color 0.15s ease;
}

.dkforest .dkforest__link:hover,
.dkforest .dkforest__link:focus-visible {
	color: #fff;
	background: var(--dkf-red);
}

.dkforest__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 28px;
}

.dkforest .dkforest__tab,
.dkforest .dkforest__more button {
	min-height: 44px;
	margin: 0;
	padding: 8px 20px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	/* 테마의 버튼 색이 덮어쓰지 못하게 고정합니다. */
	color: var(--dkf-green) !important;
	background: #fff !important;
	border: 1.5px solid #cfe3d7 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dkforest .dkforest__tab:hover,
.dkforest .dkforest__more button:hover {
	background: var(--dkf-leaf) !important;
	border-color: var(--dkf-green) !important;
}

.dkforest .dkforest__tab[aria-pressed="true"] {
	color: #fff !important;
	background: var(--dkf-green) !important;
	border-color: var(--dkf-green) !important;
}

.dkforest .dkforest__tab:focus-visible,
.dkforest .dkforest__more button:focus-visible,
.dkforest-card__link:focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: 3px;
}

.dkforest .dkforest__grid {
	display: grid;
	grid-template-columns: repeat(var(--dkf-cols, 3), minmax(0, 1fr));
	gap: 36px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dkforest .dkforest-card {
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.dkforest .dkforest-card[hidden] {
	display: none;
}

.dkforest .dkforest-card__link {
	display: block;
	color: inherit;
	text-decoration: none !important;
	box-shadow: none;
	border-radius: 16px;
}

.dkforest-card__photo {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #dcefe3;
	border-radius: 16px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dkforest-card__link:hover .dkforest-card__photo,
.dkforest-card__link:focus-visible .dkforest-card__photo {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(26, 74, 46, 0.18);
}

.dkforest-card__photo .dkforest-card__img {
	display: block;
	/* 테마가 그림에 직접 크기를 넣어도 사진 칸을 꽉 채우도록 고정합니다. */
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
}

.dkforest-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 56px;
	background: linear-gradient(135deg, #a8edcc, #3db05e);
}

.dkforest-card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin: 14px 2px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--dkf-ink);
}

.dkforest-card__link:hover .dkforest-card__title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 단계 표시: 색과 함께 글자(LV1…)로도 구분됩니다. */
.dkforest-lv {
	display: inline-block;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 900;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: #fff;
	background: #2f8f55;
	border-radius: 999px;
}

.dkforest-card__photo .dkforest-lv {
	position: absolute;
	top: 12px;
	left: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.dkforest-lv--2 { background: #1f7a8c; }
.dkforest-lv--3 { background: #2f6fd0; }
.dkforest-lv--4 { background: #c2571a; }
.dkforest-lv--5 { background: #c0392b; }

.dkforest .dkforest__empty,
.dkforest .dkforest__none {
	margin: 0;
	padding: 40px 0;
	text-align: center;
	font-size: 15px;
	color: #aaa;
}

.dkforest .dkforest__none[hidden],
.dkforest .dkforest__more[hidden] {
	display: none;
}

.dkforest .dkforest__more {
	margin: 40px 0 0;
	text-align: center;
}

/* ---------- 홈 화면 섹션 모양 ([dadok_reading_forest layout="home"]) ---------- */

.dkforest.dkforest--home {
	max-width: none;
	margin: 0;
	padding: 72px 24px;
	background: var(--dkf-leaf);
}

.dkforest--home .dkforest__inner {
	max-width: 1100px;
	margin: 0 auto;
}

.dkforest--home .dkforest__grid {
	gap: 20px;
}

@media (max-width: 1024px) {
	.dkforest:not(.dkforest--home) .dkforest__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.dkforest {
		padding: 36px 16px 56px;
	}

	.dkforest.dkforest--home {
		padding: 48px 16px;
	}

	.dkforest__head {
		margin-bottom: 24px;
	}

	.dkforest .dkforest__title {
		font-size: 22px;
	}

	.dkforest__subtitle {
		display: block;
		margin: 4px 0 0;
		font-size: 13px;
	}

	.dkforest .dkforest__link {
		padding: 6px 12px;
		font-size: 13px;
	}

	.dkforest .dkforest__grid,
	.dkforest:not(.dkforest--home) .dkforest__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}

/* ---------- 기사 페이지 ---------- */

#primary.dkforest-primary {
	width: 100% !important;
	max-width: 100%;
	float: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.dkforest-article {
	width: 100%;
	max-width: 808px;
	margin: 0 auto;
	padding: 48px 24px 88px;
}

/* 머리글이 본문 위에 겹치는 설정(투명 머리글)일 때 가려지지 않게 */
.ast-theme-transparent-header .dkforest-article {
	padding-top: 148px;
}

.dkforest-article .dkforest-article__back {
	margin: 0 0 28px;
	font-size: 15px;
}

.dkforest-article .dkforest-article__back a {
	color: var(--dkf-sub);
	text-decoration: none;
}

.dkforest-article .dkforest-article__back a:hover {
	color: var(--dkf-green);
	text-decoration: underline;
}

.dkforest-article__head {
	margin: 0 0 28px;
	padding: 0 0 24px;
	border-bottom: 3px solid var(--dkf-ink);
}

.dkforest-article .dkforest-article__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-size: 15px;
	color: var(--dkf-sub);
}

.dkforest-article .dkforest-article__title {
	margin: 0;
	padding: 0;
	font-size: 38px;
	font-weight: 900;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--dkf-ink);
}

.dkforest-article .dkforest-article__writer {
	margin: 14px 0 0;
	font-size: 16px;
	color: var(--dkf-sub);
}

.dkforest-article .dkforest-article__photo {
	margin: 0 0 32px;
	padding: 0;
}

.dkforest-article__photo .dkforest-article__img {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	border-radius: 16px;
}

.dkforest-article__photo figcaption {
	margin: 10px 4px 0;
	font-size: 14px;
	line-height: 1.6;
	text-align: left;
	color: var(--dkf-sub);
}

.dkforest-article__body {
	font-size: 19px;
	line-height: 1.95;
}

.dkforest-article__body p {
	margin: 0 0 1.3em;
}

/* 사이트 공통 글자 크기(16px) 대신 기사 본문 크기를 따르게 합니다. */
.dkforest-article__body p,
.dkforest-article__body li,
.dkforest-box li,
.dkforest-box dt,
.dkforest-box dd {
	font-size: inherit;
	line-height: inherit;
}

.dkforest-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.dkforest-article__body img.alignnone,
.dkforest-article__body img.aligncenter,
.dkforest-article__body .wp-caption.alignnone,
.dkforest-article__body .wp-caption.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.dkforest-article__body .wp-caption {
	max-width: 100%;
	margin: 0 0 1.3em;
}

.dkforest-article__body .wp-caption-text {
	margin: 8px 4px 0;
	font-size: 14px;
	line-height: 1.6;
	text-align: left;
	color: var(--dkf-sub);
}

.dkforest-box {
	margin: 40px 0 0;
	padding: 24px 28px;
	background: var(--dkf-leaf);
	border-radius: 16px;
}

.dkforest-box--think {
	margin-top: 20px;
	background: #fff4d6;
}

.dkforest-box--write {
	margin-top: 20px;
	background: #eaf3ff;
}

.dkforest-article .dkforest-box p {
	margin: 0 0 0.6em;
	padding: 0;
	font-size: 17px;
	line-height: 1.75;
}

.dkforest-article .dkforest-box p:last-child {
	margin-bottom: 0;
}

.dkforest-article .dkforest-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.dkforest-article .dkforest-tags li {
	margin: 0;
	padding: 5px 14px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--dkf-green);
	background: var(--dkf-leaf);
	border-radius: 999px;
	list-style: none;
}

.dkforest-article .dkforest-box__title {
	margin: 0 0 14px;
	padding: 0;
	/* 사이트 공통 제목 크기(32px)가 덮어쓰지 못하게 고정합니다. */
	font-size: 20px !important;
	font-weight: 700;
	line-height: 1.4;
	color: var(--dkf-ink);
}

.dkforest-box dl,
.dkforest-box ol {
	margin: 0;
	padding: 0;
	font-size: 17px;
	line-height: 1.75;
}

.dkforest-box dl > div {
	display: grid;
	grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
	gap: 14px;
	padding: 4px 0;
}

.dkforest-box dt {
	margin: 0;
	padding: 0;
	font-weight: 700;
	color: var(--dkf-green);
}

.dkforest-box dd {
	margin: 0;
	padding: 0;
}

.dkforest-box ol {
	padding-left: 1.4em;
}

.dkforest-box li {
	margin: 0;
	padding: 4px 0;
}

.dkforest.dkforest--others {
	max-width: none;
	margin: 64px 0 0;
	padding: 32px 0 0;
	border-top: 1px solid var(--dkf-line);
}

.dkforest-article .dkforest-article__more {
	margin: 0 0 20px;
	padding: 0;
	font-size: 22px !important;
	font-weight: 700;
	line-height: 1.3;
	color: var(--dkf-ink);
}

.dkforest--others .dkforest__grid {
	gap: 20px;
}

.dkforest--others .dkforest-card__title {
	font-size: 16px;
}

@media (max-width: 782px) {
	.dkforest-article {
		padding: 28px 16px 64px;
	}

	.ast-theme-transparent-header .dkforest-article {
		padding-top: 112px;
	}

	.dkforest-article .dkforest-article__title {
		font-size: 28px;
	}

	.dkforest-article__body {
		font-size: 18px;
	}

	.dkforest-box {
		padding: 20px;
	}

	.dkforest-box dl > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		padding: 6px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dkforest-card__photo,
	.dkforest .dkforest__tab,
	.dkforest .dkforest__link {
		transition: none;
	}
}
