/* =========================================================
   코딩두잇 게시판 목록 (WEB-INF/board/boardList.jsp)
   고객문의(gubun=q)는 상단 "고객지원" 화면, 커뮤니티(a)·코딩뉴스(c) 등도 같은 모양
   공통 헤더·하단·색상 변수는 resources/main/style.css를 그대로 사용
   ========================================================= */
.board-page { --pl: 80px; --pr: 34px; --navy: #121a2f; background: linear-gradient(180deg, #f3f8fe 0, #fff 420px); padding-bottom: 80px; }
.board-page .wrap { padding-left: var(--pl); padding-right: var(--pr); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 제목 ---------- */
.b-top { padding: 28px 0 26px; }
.crumb { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #4b5563; }
.crumb a { display: grid; place-items: center; color: #1f2937; }
.crumb a:hover { color: var(--blue); }
.b-top h1 { margin-top: 26px; font-size: 38px; font-weight: 800; letter-spacing: -1.2px; color: var(--navy); }
.b-top p { margin-top: 10px; font-size: 17px; color: #4b5563; }

/* ---------- 고객지원 안내 ---------- */
.b-guide { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-bottom: 26px; }
.b-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b-steps li { display: flex; gap: 12px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 14px rgba(30, 70, 140, .06); }
.b-steps b { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); font-size: 15px; font-weight: 800; }
.b-steps strong { display: block; font-size: 16px; font-weight: 800; color: var(--navy); }
.b-steps p { margin-top: 4px; font-size: 14px; line-height: 1.55; color: #4b5563; }
.b-steps em { font-style: normal; font-weight: 700; color: var(--blue); }
.b-contact { padding: 18px 20px; border-radius: 18px; background: linear-gradient(120deg, #eaf2ff, #f5f9ff); }
.b-contact strong { font-size: 16px; font-weight: 800; color: var(--navy); }
.b-contact p { margin-top: 8px; font-size: 14.5px; line-height: 1.8; color: #374151; }
.b-contact a { font-weight: 700; color: var(--blue-ink); }

/* ---------- 검색 ---------- */
.b-board { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 20px 24px 24px; box-shadow: 0 4px 16px rgba(30, 70, 140, .06); }
.b-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.b-count { font-size: 15px; color: #4b5563; }
.b-count b { font-weight: 800; color: var(--blue); }
.b-tools select, .b-search input { height: 44px; border: 1.5px solid #d5dbe4; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); outline: 0; transition: .15s; }
.b-tools select { padding: 0 34px 0 12px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; }
.b-search { display: flex; gap: 8px; flex: 0 1 460px; min-width: 0; }
.b-search input { flex: 1; min-width: 0; padding: 0 14px; }
.b-tools select:focus, .b-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(17, 102, 240, .12); }

/* ---------- 버튼 ---------- */
.b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font: inherit; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: .15s; }
.b-btn:hover { background: var(--blue-d); }
.b-btn:focus-visible, .b-subject:focus-visible, .b-page:focus-visible { outline: 3px solid rgba(17, 102, 240, .35); outline-offset: 2px; }

/* ---------- 목록 ---------- */
.b-head, .b-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 150px 70px 110px; align-items: center; gap: 12px; }
.b-list.has-cate .b-row, form:has(.has-cate) .b-head { grid-template-columns: 72px 100px minmax(0, 1fr) 150px 70px 110px; }
.b-head { margin-top: 18px; padding: 12px 8px; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; color: #4b5563; text-align: center; }
.b-head span:nth-last-child(4) { text-align: left; }
.b-list { list-style: none; }
.b-row { padding: 14px 8px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: #4b5563; text-align: center; }
.b-row:hover { background: #f8fbff; }
.b-row.is-reply { background: #fbfcfe; }
.b-no { color: #9aa4b5; }
.b-cate { display: inline-flex; justify-self: center; padding: 3px 9px; border-radius: 6px; background: var(--blue-tint); color: var(--blue); font-size: 13px; font-weight: 700; }
.b-subject { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 0 0 calc(var(--lv, 0) * 22px); border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.is-reply .b-subject::before { content: "ㄴ"; flex-shrink: 0; color: #9aa4b5; }
.b-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 600; }
.b-subject:hover .b-title { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.b-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: #e8f7ee; color: #0f8a4b; font-size: 12.5px; font-weight: 700; }
.b-lock { flex-shrink: 0; color: #9aa4b5; }
.b-cmt { flex-shrink: 0; font-size: 13.5px; font-weight: 700; color: var(--blue); }
.b-writer { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-writer img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.b-lbl { display: none; }
.b-empty { margin-top: 18px; padding: 48px 16px; border: 1px dashed #cfdcf0; border-radius: 14px; background: #fbfdff; text-align: center; font-size: 15px; color: #4b5563; }
.b-act { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------- 페이지 ---------- */
.b-paging { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.b-page { min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid #d5dbe4; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: #374151; cursor: pointer; }
.b-page:hover { border-color: var(--blue); color: var(--blue); }
.b-page.on { border-color: var(--blue); background: var(--blue); color: #fff; }

/* 안내 창 */
.b-dialog { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(17, 24, 39, .45); }
.b-dialog[hidden] { display: none; }
.b-dialog-box { width: min(100%, 360px); padding: 26px 22px 20px; border-radius: 18px; background: #fff; box-shadow: 0 20px 50px rgba(17, 24, 39, .25); text-align: center; }
.b-dialog-box p { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--navy); }
.b-dialog-box .b-btn { width: 100%; margin-top: 18px; }

/* ---------- 학습정보안내(gubun=c): 분류 탭·목록 옆 안내 (2026-11-11) ---------- */
.b-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.b-tabs a { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border: 1px solid #d5dbe4; border-radius: 999px; background: #fff; font-size: 15px; font-weight: 700; color: #374151; transition: .15s; }
.b-tabs a:hover { border-color: var(--blue); color: var(--blue); }
.b-tabs a.on { border-color: var(--blue); background: var(--blue); color: #fff; }
.b-tabs a:focus-visible, .info-cta a:focus-visible { outline: 3px solid rgba(17, 102, 240, .35); outline-offset: 2px; }
.b-cate.is-guide { background: #e8f7ee; color: #0f8a4b; }
/* 학습정보안내 맨 윗줄 고정 글(IT국비지원 학원 안내) (2026-11-11) */
.b-row.is-pin { background: #f3f8ff; }
.b-row.is-pin:hover { background: #eaf2ff; }
.b-pin { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 700; }
.b-cate.is-pin { background: #fff4e5; color: #b45309; }
a.b-subject { text-decoration: none; }
.is-pin .b-title { color: var(--blue-ink, #1a4fc6); }
.bv-head .b-cate { margin-bottom: 10px; }
.b-info-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }

.info-cta { display: grid; gap: 12px; }
.b-info-layout .info-cta { position: sticky; top: 110px; }
.ic-card { display: block; padding: 18px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 14px rgba(30, 70, 140, .06); }
.ic-join { border: 0; background: linear-gradient(135deg, #1166f0, #3b82f6); color: #fff; }
.ic-eyebrow { font-size: 13px; font-weight: 700; color: #cfe0ff; }
.ic-join strong { display: block; margin-top: 6px; font-size: 18px; font-weight: 800; line-height: 1.4; letter-spacing: -.3px; }
.ic-join > p:not(.ic-eyebrow) { margin-top: 8px; font-size: 14px; line-height: 1.6; color: #e6efff; }
.ic-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ic-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 16px; border-radius: 11px; background: #fff; color: var(--blue); font-size: 15px; font-weight: 800; white-space: nowrap; transition: .15s; }
.ic-btn:hover { background: #eaf2ff; }
.ic-btn.ghost { border: 1px solid rgba(255, 255, 255, .7); background: transparent; color: #fff; }
.ic-btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.ic-link { display: flex; align-items: center; gap: 12px; color: var(--ink); transition: .15s; }
.ic-link:hover { border-color: var(--blue); }
.ic-ico { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); }
.ic-txt { flex: 1; min-width: 0; }
.ic-txt strong { display: block; font-size: 16px; font-weight: 800; color: var(--navy); }
.ic-txt span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: #4b5563; }
.ic-arrow { flex-shrink: 0; font-size: 22px; font-weight: 700; color: #9aa4b5; }
.ic-link:hover .ic-arrow, .ic-link:hover strong { color: var(--blue); }
/* 글 보기 화면: 글 아래에 가로로 */
.bv-act + .info-cta { grid-template-columns: 1.3fr 1fr 1fr; margin-top: 28px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1240px) {
  .board-page { --pl: 32px; --pr: 24px; }
  /* 목록 옆 안내는 목록 아래로 (목록 제목 칸이 좁아지지 않게) */
  .b-info-layout { grid-template-columns: minmax(0, 1fr); }
  .b-info-layout .info-cta { position: static; grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (max-width: 1100px) {
  .board-page { --pl: 20px; --pr: 20px; } .b-guide { grid-template-columns: 1fr; }
  /* 글 보기 안내는 2줄로 */
  .bv-act + .info-cta { grid-template-columns: 1fr 1fr; }
  .bv-act + .info-cta .ic-join { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .b-info-layout .info-cta { grid-template-columns: 1fr 1fr; }
  .b-info-layout .info-cta .ic-join { grid-column: 1 / -1; }
}
/* 태블릿: 분류 칸이 있는 목록은 작성자 칸을 숨겨 제목 칸 확보 */
@media (min-width: 761px) and (max-width: 960px) {
  .b-list.has-cate .b-row, form:has(.has-cate) .b-head { grid-template-columns: 56px 90px minmax(0, 1fr) 56px 96px; }
  .b-list.has-cate .b-writer, form:has(.has-cate) .b-head span:nth-child(4) { display: none; }
}
@media (max-width: 960px) { .board-page { --pl: 16px; --pr: 16px; } }
/* 휴대폰·작은 태블릿: 표 대신 카드형 줄 */
@media (max-width: 760px) {
  .board-page { padding-bottom: 48px; }
  .b-top { padding: 18px 0 20px; }
  .crumb { font-size: 13.5px; }
  .b-top h1 { margin-top: 16px; font-size: 26px; }
  .b-top p { font-size: 14.5px; }
  .b-steps { grid-template-columns: 1fr; gap: 8px; }
  .b-steps li { padding: 14px; }
  .b-board { padding: 16px; border-radius: 18px; }
  .b-search { flex-basis: 100%; }
  .b-head { display: none; }
  .b-row, .b-list.has-cate .b-row { grid-template-columns: auto auto 1fr; gap: 6px 10px; padding: 14px 4px; text-align: left; font-size: 13px; }
  .b-row .b-no { display: none; }
  .b-cate { grid-column: 1 / -1; justify-self: start; }
  .b-subject { grid-column: 1 / -1; }
  .b-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .b-writer { justify-content: flex-start; }
  .b-lbl { display: inline; }
  .b-date { justify-self: end; color: #9aa4b5; }
  .b-act .b-btn { width: 100%; height: 50px; font-size: 16px; }
  .b-tabs { gap: 6px; }
  .b-tabs a { height: 36px; padding: 0 14px; font-size: 14px; }
  .b-info-layout .info-cta, .bv-act + .info-cta { grid-template-columns: 1fr; gap: 10px; }
  .ic-join strong { font-size: 17px; }
}
