/* 2026 리뉴얼. 원본 시안: snbpt.mycafe24.com/gumsi2/assets/css/subpage.css (2026-12-02, C16) */
/* 서브페이지 공통 골격과 운영기관 안내 */
.page-sub .sub-main { padding: 0; }
.sub-location { border-block: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.sub-location ol { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 15px 0; color: var(--color-text-muted); font-size: var(--note-text-size); }
.sub-location li + li::before { content: "›"; margin-right: 10px; color: var(--color-text-muted); }
.sub-location [aria-current] { color: var(--color-heading); font-weight: 600; }
.sub-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 44px 80px; }
/* 좌측 메뉴: 독립된 대분류 제목과 하위 메뉴 패널 */
.sub-sidebar { align-self: start; }
.page-home.page-sub main .sub-sidebar h2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 38px 16px;
  margin: 0;
  border: 1px solid var(--color-primary);
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-surface);
  text-align: center;
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: -1px;
}
/* 기존 로고 이미지의 왼쪽 심볼만 잘라 배경 장식으로 사용합니다. */
.page-home.page-sub main .sub-sidebar h2::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: -9px;
  width: 104px;
  height: 99px;
  background: url("../images/head-logo.png") left center / 440px 99px no-repeat;
  filter: brightness(0) invert(1);
  opacity: .14;
  pointer-events: none;
}
.sub-sidebar nav {
  position: relative;
  display: block;
  margin-top: 16px;
  padding: 8px 16px;
  border: 1px solid var(--color-surface-selected);
  border-radius: 10px;
  background: var(--color-surface);
}
.sub-sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 18px 8px;
  color: var(--color-heading);
  font-size: var(--body-text-size);
  font-weight: 500;
  line-height: 1.65;
  word-break: keep-all;
}
.sub-sidebar a + a { border-top: 1px solid var(--color-surface-selected); }
.sub-sidebar a[aria-current="page"] { color: var(--color-primary); font-weight: 700; }
.sub-sidebar a > span:first-child { min-width: 0; }
.sub-sidebar a > span[aria-hidden] {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin-right: 3px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  font-size: 0;
}
.sub-sidebar a[aria-current="page"] > span[aria-hidden] { visibility: hidden; }
.sub-sidebar a:hover { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
.sub-sidebar a:focus-visible { outline-offset: 3px; border-radius: 3px; }
.page-sub .sub-page-heading { display: block; width: auto; min-height: 0; height: auto; max-width: none; padding: 0 0 28px; margin: 0 0 28px; border-bottom: 2px solid var(--color-heading); background: none; position: static; }
.sub-page-heading > p:first-child { font-size: var(--note-text-size); color: var(--color-primary); font-weight: 700; margin-bottom: 8px; }
.sub-page-heading h1 { font-size: var(--page-title-size); letter-spacing: -1px; line-height: 1.4; margin: 0 0 12px; }
.sub-page-heading > p:last-child { color: var(--color-text-muted); font-size: var(--body-text-size); line-height: 1.7; }
.provider-guide { display: flex; align-items: flex-start; gap: 18px; padding: 24px; background: var(--color-surface-emphasis); border: 1px solid var(--color-surface-selected); border-radius: 12px; margin-bottom: 28px; }
.provider-guide img { flex-shrink: 0; }
.page-home.page-sub main .provider-guide h2 { font-size: var(--body-text-size); letter-spacing: -.5px; margin-bottom: 8px; }
.provider-guide p { font-size: calc(14px * var(--content-font-scale, 1)); line-height: 1.8; color: var(--color-text-muted); }
.page-sub :is(#institution-search, #study-filter).provider-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 16px; padding: 24px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: 12px; }
.provider-search label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-weight: 600; font-size: 15px; }
.provider-search :is(input, select) { width: 100%; min-width: 0; height: 48px; border: 1px solid var(--color-border); border-radius: 6px; background-color: var(--color-surface); padding: 0 12px; color: var(--color-heading); font-weight: 400; }
.provider-search-actions { grid-column: auto; display: flex; gap: 8px; justify-content: center; }
.provider-search-actions button, .provider-reset { min-height: 46px; padding: 10px 18px; border-radius: 6px; font-weight: 600; }
.provider-reset { border: 1px solid var(--color-border); background: var(--color-surface); }
.provider-search-actions .provider-reset { min-height: 52px; }
.provider-search .primary { display: inline-flex; align-items: center; gap: 10px; }
.provider-results-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 32px 0 16px; }
.page-home.page-sub main .provider-results-heading h2 { font-size: 21px; letter-spacing: -.5px; }
.provider-results-heading h2 span { margin-left: 10px; color: var(--color-primary); font-size: 16px; font-weight: 600; }
.provider-results-heading p { color: var(--color-text-muted); font-size: 13px; }
/* 열 순서를 유지하는 기관 목록 */
.page-sub .provider-table-wrap { overflow-x: auto; border-top: 2px solid var(--color-heading); }
.provider-table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; font-size: var(--body-text-size); line-height: 1.7; }
.provider-col-number { width: 88px; }
.provider-col-course { width: 180px; }
.provider-col-name { width: 29%; }
.provider-table th { background: var(--color-surface-emphasis); color: var(--color-heading); font-weight: 700; }
.provider-table :is(th, td) { padding: 22px 16px; border-bottom: 1px solid var(--color-surface-selected); text-align: center; overflow-wrap: anywhere; }
.provider-name { color: var(--color-heading); font-weight: 700; }
.provider-address { color: var(--color-text-muted); }
/* 두 줄 주소 영역을 모든 행에 확보해 행 높이를 일정하게 유지합니다. */
.provider-address-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  height: 3.4em;
  line-height: 1.7;
  align-content: center;
}
.provider-table tbody tr { height: calc(3.4em + 44px); }

.provider-row:hover,
.provider-row:focus-within,
.provider-row:target { background: var(--color-surface-emphasis); }
.provider-row:hover .provider-name,
.provider-row:focus-within .provider-name { color: var(--color-primary); }
.provider-summary { text-align: center; font-size: 14px; color: var(--color-text-muted); margin-top: 24px; }
.provider-empty { text-align: center; padding: 56px 20px; border-block: 1px solid var(--color-border); }
.provider-empty h3 { font-size: 20px; }
.provider-empty p { color: var(--color-text-muted); margin: 12px 0 24px; }
.page-sub [hidden] { display: none !important; }
@media (min-width: 701px) and (max-width: 1250px) {
 .page-sub :is(#institution-search, #study-filter).provider-search { grid-template-columns: 1fr 1fr; }
 .page-sub #institution-search > label:last-of-type { grid-column: 1; }
 .provider-search-actions { justify-content: flex-end; }
}
@media (max-width: 1024px) {
 .sub-layout { grid-template-columns: minmax(0,1fr); gap: 28px; }
 .sub-sidebar { display: none; }
}
@media (max-width: 700px) {
 .sub-layout { padding-block: 28px 48px; }
 .sub-location ol { gap: 6px; }
 .provider-guide { padding: 20px; gap: 12px; }
 .provider-guide br { display: none; }
 .page-sub :is(#institution-search, #study-filter).provider-search { grid-template-columns: 1fr 1fr; padding: 20px; gap: 14px; }
 .provider-search#institution-search > label:last-of-type { grid-column: 1 / -1; }
 .provider-search-actions { grid-column: 1 / -1; justify-content: flex-end; }
 .provider-results-heading h2 span { font-size: 14px; }
}

.page-sub :is(#institution-search, #study-filter) .provider-search-actions .primary { grid-column: auto; width: auto; min-width: 86px; min-height: 52px; flex: none; }
.page-sub .provider-reset { white-space: nowrap; }

.page-sub main nav {
  position: static;
  inset: auto;
  z-index: auto;
  box-shadow: none;
}
.page-sub .sub-location nav { display: block; padding: 0; background: transparent; }
.sub-content { min-width: 0; }

/* 운영기관 상세 안내 */
.provider-row[data-href] { cursor: pointer; }
.provider-name a { text-decoration: underline; text-underline-offset: 4px; }
.provider-detail-page { min-width: 0; font-size: var(--body-text-size); line-height: 1.8; }
.detail-section + .detail-section { margin-top: 40px; }
.page-home.page-sub main .detail-section h2 { margin: 0 0 16px; font-size: var(--section-title-size); letter-spacing: -.5px; color: var(--color-heading); }
.page-home.page-sub main .detail-info { font-size: var(--body-text-size); display: block; margin: 0; border-top: 2px solid var(--color-heading); line-height: 1.8; color: inherit; }
.detail-info > div { display: grid; grid-template-columns: 140px minmax(0,1fr); border-bottom: 1px solid var(--color-surface-selected); }
.detail-info dt { padding: 18px 20px; background: var(--color-surface-emphasis); color: var(--color-heading); font-weight: 700; }
.detail-info dd { padding: 18px 24px; margin: 0; overflow-wrap: anywhere; }
.detail-info a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
.detail-course-wrap { overflow-x: auto; border-top: 2px solid var(--color-heading); }
.detail-course-table { border-collapse: collapse; width: 100%; min-width: 520px; font: inherit; }
.detail-course-table :is(th,td) { padding: 18px 20px; border-bottom: 1px solid var(--color-surface-selected); text-align: left; }
.detail-course-table thead th { background: var(--color-surface-emphasis); color: var(--color-heading); }
.detail-course-table th:first-child { width: 120px; text-align: center; }
.detail-course-table th:last-child { width: 140px; }
.detail-course-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.provider-detail-page .tag { display: inline-block; white-space: nowrap; }
.page-home main .detail-course-badge { padding: 5px 12px; border-radius: 6px; font-size: var(--body-text-size); font-weight: 600; line-height: 1.5; }
.page-home main .detail-course-badge--elementary { background: var(--color-surface-emphasis); color: var(--color-primary); }
.page-home main .detail-course-badge--middle { background: var(--color-surface-emphasis); color: var(--color-primary); }
.page-home main .detail-course-badge--high { background: var(--color-surface-selected); color: var(--color-heading); }
.detail-years { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.detail-years li { padding: 8px 18px; border: 1px solid var(--color-surface-selected); border-radius: 6px; background: var(--color-surface-emphasis); color: var(--color-primary); font-weight: 600; }
.detail-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.detail-gallery figure { margin: 0; min-width: 0; }
.detail-photo { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--color-surface-selected); border-radius: 8px; overflow: hidden; background: var(--color-surface-emphasis); }
.detail-photo img { display: block; width: 100%; height: 260px; object-fit: cover; }
.detail-section[aria-labelledby="letters-title"] .detail-photo img { object-fit: contain; }
.detail-photo:hover { border-color: var(--color-primary); }
.detail-actions { display: flex; justify-content: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--color-surface-selected); }
.detail-actions a { display: inline-flex; align-items: center; justify-content: center; min-width: 140px; }
.page-sub .detail-image-dialog { width: calc(100vw - 48px); max-width: 1600px; height: calc(100dvh - 48px); max-height: none; padding: 20px; border: 0; border-radius: 12px; overflow: hidden; }
.detail-image-dialog[open] { display: flex; flex-direction: column; }
.detail-image-dialog::backdrop { background: rgb(var(--color-shadow-rgb) / 0.85); }
.detail-image-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: flex-end; gap: 20px; margin-bottom: 16px; }
.page-home .detail-image-heading h2 { font-size: 20px; }
.detail-image-tools { display: flex; gap: 8px; flex-shrink: 0; }
.detail-image-stage { flex: 1; min-height: 0; overflow: auto; background: var(--color-text); border-radius: 6px; text-align: center; }
.detail-image-stage img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-image-stage.is-original img { width: auto; height: auto; max-width: none; max-height: none; margin: auto; }
@media (max-width: 700px) {
 .detail-info > div { grid-template-columns: 94px minmax(0,1fr); }
 .detail-info :is(dt,dd) { padding: 14px 12px; }
 .detail-gallery { grid-template-columns: minmax(0,1fr); }
 .detail-section + .detail-section { margin-top: 32px; }
 .page-sub .detail-image-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); padding: 12px; }
 .detail-image-heading { align-items: flex-start; gap: 10px; flex-direction: column; }
 .detail-image-tools { width: 100%; justify-content: flex-end; }
}

/* 별도 통합검색 페이지 */
.search-page { padding-block: 44px 80px; }
.page-sub .search-page-form { display: block; padding: 28px; border: 1px solid var(--color-surface-selected); border-radius: 12px; background: var(--color-surface-emphasis); }
.search-page-form > label { display: block; margin-bottom: 10px; font-weight: 700; font-size: var(--body-text-size); }
.search-page-input { display: flex; gap: 12px; }
.page-home main .search-page-input input { width: 100%; min-width: 0; min-height: 56px; padding: 12px 18px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; font-size: var(--body-text-size); }
.search-page-input .primary { flex-shrink: 0; min-width: 112px; min-height: 56px; padding: 12px 20px; gap: 10px; border-radius: 6px; font-size: 18px; }
.search-page-form > p { margin-top: 12px; color: var(--color-text-muted); font-size: var(--note-text-size); }
.search-page-results { margin-top: 36px; }
.search-results-heading { padding-bottom: 20px; border-bottom: 2px solid var(--color-heading); }
.page-home.page-sub main .search-results-heading h2 { font-size: var(--section-title-size); }
.search-results-heading p { margin-top: 10px; font-size: var(--body-text-size); color: var(--color-heading); }
.integrated-results { list-style: none; padding: 0; margin: 0; }
.integrated-results li { padding: 24px 8px; border-bottom: 1px solid var(--color-surface-selected); }
.search-result-type { display: inline-block; padding: 4px 10px; margin-bottom: 10px; background: var(--color-surface-emphasis); color: var(--color-primary); border-radius: 4px; font-size: var(--note-text-size); font-weight: 600; }
.integrated-results h3 a { color: var(--color-heading); text-decoration: underline; text-underline-offset: 4px; }
.integrated-results h3 a:hover { color: var(--color-primary); }
.integrated-results p { margin-top: 10px; color: var(--color-text-muted); font-size: var(--body-text-size); line-height: 1.8; overflow-wrap: anywhere; }
.search-page-empty { padding: 56px 20px; text-align: center; border-bottom: 1px solid var(--color-surface-selected); }
.search-page-empty img { margin-bottom: 16px; opacity: .6; }
.search-page-empty p { margin-top: 12px; color: var(--color-text-muted); font-size: var(--body-text-size); }
.page-home a.header-search { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 700px) {
 .search-page { padding-block: 28px 48px; }
 .page-sub .search-page-form { padding: 20px; }
 .search-page-input { flex-wrap: wrap; }
 .search-page-input .primary { width: 100%; }
}

/* 모바일에서 고정 너비와 본문 내비게이션의 겹침을 방지합니다. */
@media (max-width: 700px) {
 .sub-location ol { padding-block: 12px; line-height: 1.7; }
 .sub-layout { gap: 24px; }
 .page-sub .sub-page-heading { margin-bottom: 24px; padding-bottom: 20px; }
 .sub-page-heading h1 { word-break: keep-all; overflow-wrap: anywhere; }
 .provider-guide { display: block; }
 .provider-guide > img { margin-bottom: 12px; }

 .detail-course-table { min-width: 0; table-layout: fixed; }
 .detail-course-table :is(th,td) { padding: 14px 10px; overflow-wrap: anywhere; }
 .detail-course-table th:first-child { width: 88px; }
 .detail-course-table th:last-child { width: 76px; }
 .detail-photo img { height: auto; aspect-ratio: 4 / 3; }
 .detail-image-tools { flex-wrap: wrap; }
}
@media (max-width: 480px) {
 .page-sub :is(#institution-search, #study-filter).provider-search { grid-template-columns: minmax(0, 1fr); padding: 18px; }
 .provider-search-actions { display: grid; grid-template-columns: 1fr 1fr; }
 .page-sub :is(#institution-search, #study-filter) .provider-search-actions .primary { width: 100%; min-width: 0; }
 .sub-sidebar a { padding: 14px 12px; font-size: var(--body-text-size); }
 .detail-info > div { grid-template-columns: minmax(0,1fr); }
 .detail-info dt { padding: 10px 14px; }
 .detail-info dd { padding: 12px 14px 16px; }
 .detail-years { gap: 8px; }
 .detail-years li { padding: 6px 12px; }
 .provider-summary { line-height: 1.8; }
}

@media (max-width: 1024px) {
 /* 표의 의미 구조는 유지하고 행을 화면 너비에 맞는 목록으로 재배치합니다. */
 .page-sub .provider-table-wrap { overflow: visible; border-top: 2px solid var(--color-heading); }
 .provider-table { display: block; min-width: 0; width: 100%; }
 .provider-table colgroup { display: none; }
 .provider-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .provider-table tbody { display: block; }
 .provider-table tbody .provider-row { display: grid; grid-template-columns: 1fr; height: auto; padding: 20px 16px; border-bottom: 1px solid var(--color-surface-selected); }
 .provider-table td { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border: 0; min-width: 0; text-align: left; }
 .provider-table td::before { flex: 0 0 max(76px, 4.75em); white-space: nowrap; color: var(--color-text-muted); font-size: 16px; font-weight: 500; }
 .provider-table .provider-number { font-size: 15px; color: var(--color-text-muted); padding-top: 0; }
 .provider-table .provider-number::before { content: "번호"; }
 .provider-table .provider-course::before { content: "교육과정"; }
 .provider-table .provider-name::before { content: "기관명"; }
 .provider-table .provider-address::before { content: "주소"; }
 .provider-table .provider-name a { min-width: 0; overflow-wrap: anywhere; }
 .provider-address-text { display: block; min-width: 0; height: auto; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; }

}
.page-providers {
  --provider-text: var(--body-text-size);
  --provider-note: var(--note-text-size);
}

.page-home.page-providers .gnb-trigger,
.page-providers .sub-sidebar a,
.page-providers .sub-page-heading > p:last-child,
.page-providers .provider-guide p,
.page-providers .provider-search :is(label, input, select, button),
.page-providers .provider-table {
  font-size: var(--provider-text);
}

.page-providers .sub-location ol,
.page-providers .sub-page-heading > p:first-child,
.page-providers .provider-results-heading :is(p, h2 span),
.page-providers .provider-summary,
.page-providers .provider-table td::before,
.page-providers .provider-table .provider-number {
  font-size: var(--provider-note);
}

.page-home.page-providers main .sub-page-heading h1 {
  font-size: var(--page-title-size);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.page-home.page-providers main :is(.provider-guide, .provider-results-heading) h2 {
  color: var(--color-heading);
  font-size: calc(1.5rem * var(--content-font-scale, 1));
  font-weight: 800;
  line-height: 1.4;
}

.page-home.page-providers main .provider-results-heading h2 {
  font-size: var(--section-title-size);
}

.page-providers .provider-results-heading {
  margin: clamp(36px, 5vw, 56px) 0 24px;
}

.page-providers .provider-search :is(input, select) {
  height: auto;
  min-height: 52px;
  padding-block: 8px;
}

@media (min-width: 701px) and (max-width: 1200px) {
  .page-providers :is(#institution-search, #study-filter).provider-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-providers .provider-search-actions { align-self: end; }
}

.page-sub .sub-content :is(.provider-search label, .provider-search input, .provider-search select, .provider-search button),
.page-sub .sub-content .provider-table :is(th, td) {
  font-size: var(--body-text-size);
}

.page-sub .sub-content .provider-table .provider-number { font-size: var(--note-text-size); }
/* 사이드탭 활성 메뉴: 대분류 제목과 같은 네이비 그라데이션 바로 현재 위치를 표시합니다. */
.sub-sidebar nav { padding: 8px; }
.sub-sidebar nav a { padding-inline: 16px; border-radius: 8px; transition: background-color .2s, color .2s; }
.sub-sidebar nav a + a { border-top: 0; margin-top: 4px; position: relative; }
.sub-sidebar nav a + a::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 16px;
  right: 16px;
  border-top: 1px solid var(--color-surface-selected);
}
.sub-sidebar nav a[aria-current="page"]::before,
.sub-sidebar nav a[aria-current="page"] + a::before { content: none; }
.sub-sidebar nav a:not([aria-current="page"]):hover {
  background: var(--color-surface-emphasis);
  color: var(--color-primary);
  text-decoration: none;
}
.sub-sidebar nav a[aria-current="page"] {
  position: relative;
  background: linear-gradient(105deg, var(--color-primary), var(--color-primary-end));
  color: var(--color-surface);
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(52, 61, 120, .22);
  text-decoration: none;
}
.sub-sidebar nav a[aria-current="page"] > span[aria-hidden] { visibility: visible; border-color: var(--color-surface); }
.sub-sidebar nav a[aria-current="page"]:focus-visible { outline: 2px solid var(--color-heading); outline-offset: 2px; }

.detail-note { margin-top: 12px; color: var(--color-text-muted); font-size: var(--note-text-size); }
.detail-unavailable { padding: 24px; border: 1px solid var(--color-border); background: var(--color-surface-subtle); color: var(--color-text-muted); }
/* 2026 리뉴얼 적용(로컬 추가): 위치 표시 글자 크기. 시안은 각 서브 페이지 CSS(.page-preparation·.page-providers)가
   16px × 큰글씨 배율(기본 1.1 → 17.6px)로 덮어쓴다. 페이지 클래스가 없는 레거시 서브(.rn-scope)·운영기관 상세에도 같게 적용.
   rem 대신 px : 레거시 화면은 html 기준 글자 크기가 달라질 수 있다 */
.sub-location nav ol { font-size: calc(16px * var(--content-font-scale, 1.1)); line-height: 1.65; }
@media (max-width: 700px) { .sub-location nav ol { line-height: 1.7; } }
