/* =========================================================
   전국 IT국비지원 학원 안내 (WEB-INF/koreastudy/koreaStudyList.jsp, 2026-11-11)
   공통 헤더·하단·색 변수는 resources/main/style.css를 그대로 사용
   ========================================================= */
.ks-page { --pl: 80px; --pr: 34px; background: linear-gradient(180deg, #f3f8fe 0, #fff 340px); padding-bottom: 80px; }
.ks-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; }

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

.ks-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.ks-filter, .ks-layout, .ks-field, .ks-search { min-width: 0; }	/* 좁은 화면에서 선택 상자가 화면 밖으로 밀지 않게 */

/* 검색 조건 */
.ks-filter { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(30, 70, 140, .05); }
.ks-selects { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.ks-field { display: grid; gap: 6px; }
.ks-field > span { font-size: 13.5px; font-weight: 700; color: #4b5563; }
.ks-filter select, .ks-filter input { height: 44px; padding: 0 12px; border: 1px solid #cfd8e6; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; color: #1f2937; }
.ks-field select { min-width: 132px; }
.ks-field-wide select { min-width: 200px; }
.ks-filter select:focus, .ks-filter input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17, 102, 240, .12); }
.ks-search { display: flex; gap: 8px; flex: 1 1 360px; max-width: 480px; }
.ks-search select { flex-shrink: 0; width: 100px; }
.ks-search input { flex: 1; min-width: 0; }
.ks-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid #d5dbe4; border-radius: 10px; background: #fff; font: inherit; font-size: 15px; font-weight: 700; color: #1f2937; white-space: nowrap; cursor: pointer; transition: .15s; }
.ks-btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.ks-btn.primary:hover { filter: brightness(1.06); }

/* 목록 + 오른쪽 안내 */
.ks-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.ks-result { min-width: 0; padding: 24px 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(30, 70, 140, .05); }
.ks-result-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding-bottom: 14px; }
.ks-count { font-size: 20px; font-weight: 800; color: var(--title); }
.ks-src { font-size: 13px; color: var(--muted); }

.ks-head, .ks-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 200px 150px; gap: 14px; align-items: center; }
.ks-head { padding: 10px 8px; border-top: 2px solid var(--title); border-bottom: 1px solid var(--line); background: #f7f9fc; font-size: 13.5px; font-weight: 700; color: #4b5563; text-align: center; }
.ks-head span:first-child { text-align: left; }
.ks-page.is-empty .ks-head { display: none; }
.ks-list { list-style: none; margin: 0; padding: 0; }
.ks-row { padding: 16px 8px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: #4b5563; text-align: center; }
.ks-row:hover { background: #f8fbff; }
.ks-main { display: grid; gap: 5px; min-width: 0; text-align: left; }
.ks-title { font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--title); overflow-wrap: anywhere; }
a.ks-title:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.ks-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.ks-org { font-weight: 600; color: var(--blue-ink, #1a4fc6); }
a.ks-org:hover { text-decoration: underline; }
.ks-tel { color: var(--muted); }
.ks-money { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: #6b7280; }
.ks-period b { font-weight: 700; color: #1f2937; }
.ks-type { justify-self: center; padding: 4px 10px; border-radius: 999px; background: var(--blue-tint, #eaf2ff); color: var(--blue-ink, #1a4fc6); font-size: 12.5px; font-weight: 700; line-height: 1.35; }

.ks-empty { padding: 40px 10px; font-size: 15px; color: var(--muted); text-align: center; }
.ks-note { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; font-size: 13.5px; line-height: 1.65; color: #4b5563; }

/* 불러오는 중 */
.ks-loading { display: grid; gap: 10px; padding: 8px 0 16px; }
.ks-loading[hidden] { display: none; }
.ks-loading span { height: 54px; border-radius: 12px; background: linear-gradient(90deg, #eef2f8 0, #f7f9fc 50%, #eef2f8 100%); background-size: 200% 100%; animation: ksShine 1.2s linear infinite; }
.ks-loading p { font-size: 14px; color: var(--muted); text-align: center; }
@keyframes ksShine { to { background-position: -200% 0; } }

/* 페이지 */
.ks-paging { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.ks-pg { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14.5px; color: #374151; }
a.ks-pg:hover { border-color: var(--blue); color: var(--blue); }
.ks-pg.on { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 700; }

/* 오른쪽 안내 */
.ks-side { display: grid; gap: 12px; position: sticky; top: 110px; }
.ks-card { display: grid; gap: 8px; padding: 18px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ks-cta { border-color: #cfe0ff; background: linear-gradient(180deg, #f3f8ff, #fff); }
.ks-eyebrow { font-size: 13px; font-weight: 700; color: var(--blue); }
.ks-cta strong { font-size: 16.5px; line-height: 1.5; color: var(--title); }
.ks-cta .ks-btn { margin-top: 4px; }
.ks-link strong { font-size: 15.5px; color: var(--title); }
.ks-link span { font-size: 13.5px; line-height: 1.55; color: #6b7280; }
.ks-link:hover { border-color: var(--blue); }
.ks-link:hover strong { color: var(--blue); }

@media (max-width: 1240px) { .ks-page { --pl: 32px; --pr: 24px; } }
@media (max-width: 1100px) {
  .ks-page { --pl: 20px; --pr: 20px; }
  .ks-layout { grid-template-columns: minmax(0, 1fr); }
  .ks-side { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .ks-page { --pl: 16px; --pr: 16px; }
  .ks-head, .ks-row { grid-template-columns: minmax(0, 1fr) 90px 180px; }
  .ks-head span:last-child, .ks-row .ks-type { display: none; }
}
@media (max-width: 760px) {
  .ks-page { padding-bottom: 40px; }
  .ks-top { padding: 18px 0 18px; }
  .ks-crumb { font-size: 13.5px; }
  .ks-top h1 { margin-top: 16px; font-size: 26px; }
  .ks-top p { font-size: 14.5px; }
  .ks-filter { padding: 16px; border-radius: 16px; }
  .ks-selects { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; }
  .ks-field select, .ks-field-wide select { min-width: 0; width: 100%; }
  .ks-field-wide { grid-column: 1 / -1; }
  .ks-search { flex-basis: 100%; max-width: none; }
  .ks-search select { width: 88px; }
  .ks-result { padding: 18px 14px; border-radius: 16px; }
  .ks-head { display: none; }
  .ks-row { grid-template-columns: auto 1fr; gap: 6px 10px; padding: 14px 2px; text-align: left; font-size: 13.5px; }
  .ks-main { grid-column: 1 / -1; }
  .ks-title { font-size: 15.5px; }
  .ks-row .ks-type { display: inline-flex; justify-self: start; }
  .ks-addr::before { content: "📍 "; }
  .ks-period { grid-column: 1 / -1; color: #4b5563; }
  .ks-side { grid-template-columns: minmax(0, 1fr); }
}
