/* ALL ABOUT 양육비 (목록 · 글)
   목록 머리·검색·페이지 번호, 글의 위치 표시·분류 표시·신청 안내·이전/다음 글은 stories.css 를 같이 쓴다. */

/* ---------- 카드 ---------- */
.cl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; margin: 0; padding: 0; list-style: none; }
.mp .cl-grid:focus, .mp .cl-grid:focus-visible { outline: none; }   /* 페이지를 넘기면 초점이 목록으로 온다 */
.cl-card a {
    display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff;
    text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cl-card a:hover { border-color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .06); transform: translateY(-2px); }
.cl-card__thumb { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--cream); }
.cl-card__thumb > img { width: 100%; height: 100%; object-fit: cover; }
/* 대표 이미지가 없는 글 */
.cl-card__ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%;
    font-size: 15px; font-weight: 800; letter-spacing: .01em; color: #9a7a35;
    background: radial-gradient(circle at 50% 35%, #fff 0, var(--cream) 70%);
}
.cl-card__ph img { width: 40px; height: 40px; }
.cl-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 18px 18px; }
/* 여백은 margin 으로: 줄 수 제한(line-clamp)은 안쪽 여백(padding) 자리에 다음 줄을 그려 버린다 */
.cl-card__title {
    font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -0.02em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.cl-card__excerpt {
    margin-top: 8px !important; font-size: 14.5px; line-height: 1.6; color: #5b6069;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.cl-card__date { margin-top: auto; padding-top: 12px; font-size: 13px; color: #8a8f98; }

@media (max-width: 991px) {
    .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .cl-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cl-card__body { padding: 14px 16px 16px; }
    .cl-card__title { font-size: 16.5px; }
}

/* ---------- 글 ---------- */
.cl-post > .mp-container > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.cl-preview { padding: 10px 14px; margin-bottom: 18px !important; border-radius: 10px; background: #fff4e5; color: #8a4b00; font-size: 14px; font-weight: 600; }
.cl-post__head .sd-cat { text-decoration: none; }
.cl-post__meta { margin-top: 12px !important; font-size: 14px; color: var(--muted); }
.cl-post__meta span { margin: 0 4px; }
.cl-post__cover { margin-top: 26px; overflow: hidden; border-radius: 14px; background: var(--cream); }
.cl-post__cover img { width: 100%; height: auto; }
.cl-post__lead { margin-top: 26px !important; padding: 18px 20px; border-radius: 12px; background: var(--cream); font-size: 17px; line-height: 1.75; color: #333; }

/* 본문 (관리자 편집기로 쓴 HTML) */
.cl-content { margin-top: 32px; font-size: 17px; line-height: 1.9; color: #262626; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cl-content > :first-child { margin-top: 0 !important; }
.cl-content p { margin: 0 0 1.15em; }
.cl-content h2 { margin: 2.1em 0 .7em; font-size: 23px; font-weight: 800; line-height: 1.4; letter-spacing: -0.03em; color: var(--ink); }
.cl-content h3 { margin: 1.8em 0 .6em; font-size: 19.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.02em; color: var(--ink); }
.cl-content h4 { margin: 1.6em 0 .5em; font-size: 17.5px; font-weight: 700; color: var(--ink); }
.cl-content ul, .cl-content ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.cl-content li { margin: .35em 0; }
.cl-content li > p { margin: 0; }
.cl-content strong, .cl-content b { font-weight: 700; color: var(--ink); }
.cl-content a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 3px; }
.cl-content blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 4px solid var(--orange); border-radius: 0 10px 10px 0; background: var(--cream); color: #333; }
.cl-content blockquote > :last-child { margin-bottom: 0; }
.cl-content img { max-width: 100%; height: auto; margin: 1.4em auto; border-radius: 10px; }
.cl-content figure { margin: 1.4em 0; }
.cl-content figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); text-align: center; }
.cl-content hr { margin: 2.2em 0; border: 0; border-top: 1px solid var(--line); }
/* 표는 좁은 화면에서 가로로 밀어 본다 */
.cl-content table { display: block; max-width: 100%; overflow-x: auto; margin: 1.4em 0; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.cl-content th, .cl-content td { padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; }
.cl-content th { background: var(--cream); font-weight: 700; }

.cl-post .sd-cta { margin-top: 52px; }

/* 다른 글 */
.cl-more { margin-top: 56px; padding: 44px 0 4px; border-top: 1px solid var(--line); }
.cl-more h2 { margin-bottom: 16px !important; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }

/* 휴대폰: 다른 글은 작은 가로 카드로 (글 끝에 큰 카드 세 장이 길게 이어지지 않게) */
@media (max-width: 599px) {
    .cl-more .cl-grid { gap: 10px; }
    .cl-more .cl-card a { flex-direction: row; }
    .cl-more .cl-card__thumb { flex: 0 0 124px; aspect-ratio: auto; }
    .cl-more .cl-card__ph { gap: 4px; font-size: 10.5px; }
    .cl-more .cl-card__ph img { width: 26px; height: 26px; }
    .cl-more .cl-card__body { justify-content: center; min-height: 86px; padding: 12px 14px; }
    .cl-more .cl-card__title { font-size: 15.5px; }
    .cl-more .cl-card__date { margin-top: 0; padding-top: 6px; }
}

@media (max-width: 767px) {
    .cl-post__lead { padding: 16px; font-size: 16px; }
    .cl-content { margin-top: 26px; font-size: 16.5px; line-height: 1.85; }
    .cl-content h2 { font-size: 21px; }
    .cl-content h3 { font-size: 18.5px; }
    .cl-more { margin-top: 44px; padding-top: 34px; }
}
