/* ===== 커뮤니티 목록 (시안 1 인프런형) — 3단 배치 + 흰 목록 판 위 1px 선 구분 행 ===== */

/* 3단: 왼쪽 게시판 168 · 가운데 글 목록 · 오른쪽 사이드 272 */
/* 시안 1처럼 왼쪽(게시판·이력서)과 오른쪽(인기글·바로가기)은 두 줄을 차지하고, 가운데는 행사 홍보 → 글 목록 */
.c-layout { display: grid; grid-template-columns: 168px minmax(0, 1fr) 272px; grid-template-areas: "nav promo side" "nav feed side"; grid-template-rows: auto 1fr; column-gap: 32px; row-gap: var(--s-6); align-items: start; padding-bottom: var(--s-16); }
.c-lnb { grid-area: nav; }
.c-promo { grid-area: promo; min-width: 0; }
.c-feed { grid-area: feed; }
.c-side { grid-area: side; }
.c-layout:not(:has(.c-promo)) { grid-template-areas: "nav feed side"; grid-template-rows: auto; }
.c-promo .promo-band { --promo-per: 4; }
.c-layout > * + * { margin-top: 0; }
.c-feed { min-width: 0; display: flex; flex-direction: column; gap: var(--s-3); }

/* 왼쪽 게시판 목록 — 칩(.chip)을 PC에서는 목록 줄로 보이게, 선택은 베리 굵은 글자 */
.c-lnb { position: sticky; top: calc(var(--header-h, 64px) + 16px); }
.c-lnb .c-board-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.c-lnb .chip { display: flex; width: 100%; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: transparent; color: var(--c-ink); font-size: var(--t-md); font-weight: 500; }
.c-lnb .chip:hover { background: #fff; color: var(--c-ink); }
.c-lnb .chip:active { transform: none; }
.c-lnb .chip[aria-current="page"] { background: transparent; color: var(--c-berry); font-weight: 700; }
.c-lnb .chip[aria-current="page"]:hover { background: #fff; }

/* 가운데: 밑줄 탭 · 검색 · 정렬 */
.c-feed-tabs .tab { text-decoration: none; }
.c-feed-search { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: var(--s-2); }
.c-feed-field { display: flex; align-items: center; gap: var(--s-2); min-height: 46px; padding: 0 14px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: #fff; color: var(--c-muted); }
.c-feed-field:focus-within { border-color: var(--c-berry); box-shadow: 0 0 0 1px var(--c-berry); }
.c-feed-field .c-search-input { min-height: 44px; font-size: var(--t-sm); color: var(--c-ink); }
.c-feed-search-btn { min-height: 46px; border-radius: var(--r-sm); }
.c-sortbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 6px 0 0; }
.c-dots { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0 0 0 4px; }
.c-dot-item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 500; color: var(--c-muted); }
.c-dot-item::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.c-dot-item[aria-current="true"] { color: var(--c-ink); font-weight: 700; }
.c-dot-item[aria-current="true"]::before { width: 4px; height: 4px; background: var(--c-accent); }
.c-total { font-size: var(--t-sm); color: var(--c-muted); }
.c-total .num { color: var(--c-ink); }

/* 오른쪽 사이드: 게시판 바로가기 */
.c-side { position: sticky; top: calc(var(--header-h, 64px) + 16px); display: flex; flex-direction: column; gap: var(--s-3); }
.c-box { padding: 14px 12px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: #fff; }
.c-box-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--c-ink); }
.c-box .chips { list-style: none; margin: 0; padding: 0; gap: 6px; }
/* 오른쪽 지금 인기글: 좁은 칸이라 사진은 빼고 제목을 두 줄까지 */
.c-side .home-popular { border-radius: var(--r-sm); border-color: var(--c-line-2); padding: 6px 12px 2px; }
.c-side .home-sec-title { font-size: 15px; }
.c-side .pop-thumb { display: none; }
.c-side .pop-title { -webkit-line-clamp: 2; }
.c-side .pop-item { align-items: flex-start; }
/* 왼쪽 사역 이력서 카드 */
.c-resume-box { margin-top: var(--s-6); }
.c-resume-box p { margin: 0 0 6px; line-height: 1.55; }
.c-resume-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; font-size: var(--t-sm); font-weight: 700; color: var(--c-berry); }

/* 목록 판: 흰 바탕 + 행 사이 1px 선 */
.cl-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); }
.cl-item { position: relative; display: flex; align-items: flex-start; gap: var(--s-4); padding: 18px 16px; transition: background var(--m-fast); }
.cl-item + .cl-item { border-top: 1px solid var(--c-line); }
.cl-item:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0; }
.cl-item:last-child { border-radius: 0 0 var(--r-sm) var(--r-sm); }
.cl-item:hover { background: var(--c-surface-2); }
.cl-item .c-stretch::after { border-radius: 0; }
.cl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cl-title { font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-excerpt { font-size: var(--t-sm); line-height: 1.55; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: 6px; }
.cl-meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px; min-width: 0; font-size: var(--t-xs); color: var(--c-muted); }
.cl-meta .board-tag { margin-right: 2px; }
.cl-author { color: var(--c-ink); font-weight: 700; }
a.cl-author { color: var(--c-ink); }
/* 작은 글자 인라인 링크라 누르는 영역을 위아래로 넓혀 44px 이상 확보 */
a.cl-author::after { content: ""; position: absolute; inset: -13px -6px; }
a.cl-author:hover { color: var(--c-berry); text-decoration: underline; }
.cl-stats { flex: none; display: flex; gap: var(--s-3); font-size: var(--t-xs); color: var(--c-muted); }
.cl-stats .meta-i .ico { width: 14px; height: 14px; }
/* 사진 줄(25번 답글): 요약 아래 큰 사진 최대 3장. 글 링크(c-stretch)로 눌림이 지나가게 pointer-events: none. 1장이면 넓게(16:10), 2·3장이면 정사각 칸을 나란히. 더 있으면 마지막 장에 +n */
.cl-photos { pointer-events: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); max-width: 520px; margin-top: var(--s-2); }
.cl-photos[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 360px; }
.cl-photos[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; }
.cl-photo { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-sm); overflow: hidden; background: var(--c-milk); border: 1px solid var(--c-line); }
.cl-photos[data-count="1"] .cl-photo { aspect-ratio: 16 / 10; }
.cl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-photo-more { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--c-ink) 64%, transparent); color: var(--c-bg); font-size: var(--t-xl); font-weight: 700; }
.c-feed .load-more { margin-top: var(--s-2); }

@media (max-width: 1180px) {
  .c-layout { grid-template-columns: 152px minmax(0, 1fr) 232px; column-gap: 24px; }
}
@media (max-width: 1024px) {
  .c-layout, .c-layout:not(:has(.c-promo)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "side" "promo" "feed"; grid-template-rows: none; row-gap: var(--s-3); }
  .c-layout:not(:has(.c-promo)) { grid-template-areas: "nav" "side" "feed"; }
  .c-resume-box { display: none; }
  .c-promo .promo-band { --promo-per: 1.8; }
  .c-lnb { position: static; margin: 0 calc(var(--gutter) * -1); }
  .c-lnb .c-board-chips { flex-direction: row; gap: 6px; overflow-x: auto; padding: 2px var(--gutter) 4px; }
  .c-lnb .c-board-chips li { flex: none; }
  .c-lnb .chip { width: auto; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: #fff; box-shadow: inset 0 0 0 1px var(--c-line-2); font-size: var(--t-sm); white-space: nowrap; }
  .c-lnb .chip:hover { background: var(--c-surface-2); }
  .c-lnb .chip[aria-current="page"], .c-lnb .chip[aria-current="page"]:hover { background: var(--c-plum-2); color: #fff; box-shadow: none; }
  /* 좁은 화면: 인기글만 남기고 게시판 바로가기는 위 칩과 겹쳐 숨긴다 */
  .c-side { position: static; }
  .c-side .c-box { display: none; }
}
@media (max-width: 720px) {
  .c-feed-search { grid-template-columns: minmax(0, 1fr) 64px; }
  .c-feed-field, .c-feed-search-btn { min-height: 44px; }
  .c-feed-search-btn { padding: 0 8px; }
  .cl-list { margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; border-radius: 0; }
  .cl-item { padding: 16px var(--gutter); gap: var(--s-3); }
  .cl-item:first-child, .cl-item:last-child { border-radius: 0; }
  .cl-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .cl-foot { align-items: flex-end; }
  /* 모바일: 사진 줄을 글 폭 가득 */
  .cl-photos, .cl-photos[data-count="1"], .cl-photos[data-count="2"] { max-width: none; }
}
