/* ============================================================
   SW개발보안 진단원 교육과정 - 메인 스타일시트
   색상 테마: 딥네이비(#0d1b2a) + 시안블루(#1e90d6) + 그린(#2dbf7e)
   ============================================================ */

/* ---------- CSS 변수 ---------- */
:root {
  --navy:      #0d1b2a;
  --navy-dark: #080f17;
  --navy-mid:  #122336;
  --navy-light:#1a3150;
  --cyan:      #1e90d6;
  --cyan-dark: #176db5;
  --cyan-light:#4eb3f0;
  --green:     #2dbf7e;
  --green-dark:#1e9b63;
  --orange:    #f4a22d;
  --red:       #e55353;
  --white:     #ffffff;
  --gray-100:  #f4f6fa;
  --gray-200:  #e8ecf3;
  --gray-300:  #c8d0de;
  --gray-500:  #7a8899;
  --gray-700:  #3d4f63;
  --text:      #1c2b3a;
  --text-muted:#5a6e84;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 2px 16px rgba(13,27,42,0.10);
  --shadow-md: 0 4px 24px rgba(13,27,42,0.15);
  --shadow-lg: 0 8px 40px rgba(13,27,42,0.20);
  --transition: all 0.25s ease;
  --header-h:  64px;
}

/* ---------- 기본 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* 페이지마다 스크롤바 유무가 달라 가로폭이 흔들리는 현상 방지 — 항상 스크롤바 영역 확보 */
  overflow-y: scroll;
}
body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--gray-100);
  line-height: 1.7;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 로고 */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main {
  font-size: 15px; font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 11px; font-weight: 400;
  color: var(--cyan-light);
  letter-spacing: 0.2px;
}

/* 네비 */
.main-nav ul {
  display: flex;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link i { font-size: 13px; }
.nav-link:hover,
.nav-link.active {
  background: rgba(30, 144, 214, 0.18);
  color: var(--cyan-light);
}
.nav-link.active {
  background: rgba(30, 144, 214, 0.25);
  color: #fff;
}

/* 햄버거 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- MAIN / PAGE 전환 ---------- */
main { min-height: calc(100vh - var(--header-h) - 80px); }
.page { display: none; }
.page.active { display: block; }

/* ---------- HERO (홈) ---------- */
.hero {
  position: relative;
  background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy-mid) 60%, #0e2840 100%);
  overflow: hidden;
  padding: 96px 24px 88px;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(30,144,214,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(45,191,126,0.12) 0%, transparent 60%);
  pointer-events: none;
}
/* 그리드 패턴 */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,144,214,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,144,214,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(30,144,214,0.2);
  border: 1px solid rgba(30,144,214,0.4);
  color: var(--cyan-light);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.hero h1 span { color: var(--cyan-light); }
.hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  margin-bottom: 36px;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  line-height: 1;
}
.btn-primary {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
}
.btn-primary:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,144,214,0.4);
}
/* 라이트 배경(공지 상세, 폼 등)용 기본 outline */
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--gray-300);
}
.btn-outline:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
  color: var(--navy);
}
/* 다크 배경(hero) 위에서 사용하는 변형 */
.btn-outline-light {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}
.btn-secondary {
  background: var(--gray-200);
  color: var(--text);
  border-color: var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-300); }
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { background: #c44444; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ---------- SECTION WRAPPER ---------- */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}
.section-header {
  text-align: center;
  margin-bottom: 44px;
}
.section-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- 과정 카드 ---------- */
.course-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--cyan);
}

/* 헤더: [아이콘 좌측]                [시간 우측] */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.card-icon.lv1 { background: linear-gradient(135deg, #1e90d6, #4eb3f0); color: #fff; }
.card-icon.lv2 { background: linear-gradient(135deg, #2dbf7e, #5ad49c); color: #fff; }
.card-icon.lv3 { background: linear-gradient(135deg, #f4a22d, #f7c46d); color: #fff; }
.card-hours {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan-dark);
  background: rgba(30,144,214,0.08);
  border: 1px solid rgba(30,144,214,0.18);
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.card-hours i { font-size: 11px; }

/* 과정명 — 별도 줄, 가운데 */
.card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  word-break: keep-all;
  margin-top: 4px;
}

/* 설명 — 가운데 정렬 + 줄바꿈 (HTML 의 <br/> 사용) */
.card-desc {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
  word-break: keep-all;
}

/* 자세히 보기 링크 — 가운데 */
.card-link {
  align-self: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.course-card:hover .card-link { gap: 10px; }

/* ---------- 통계 ---------- */
.stats-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 48px 24px;
}
.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 8px 16px;
}
.stat-num {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.stat-num span { font-size: 60%; color: var(--cyan-light); }
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.12);
}

/* ---------- 페이지 HERO (서브) ---------- */
.page-hero {
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.lv1-hero { background: linear-gradient(145deg, #0e2440, #1a3a6e); }
.lv2-hero { background: linear-gradient(145deg, #0a2218, #0f3d2b); }
.lv3-hero { background: linear-gradient(145deg, #261a08, #3d2c0a); }
.notice-hero { background: linear-gradient(145deg, #160e26, #2a1850); }

.page-hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.page-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}
.page-hero p {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
}
.page-hero .apply-btn {
  margin-top: 22px;
  padding: 12px 24px;
  font-size: 14px;
  transition: var(--transition);
}
.page-hero .apply-btn:hover { transform: translateY(-1px); }
.page-hero .apply-btn.is-loading,
.page-hero .apply-btn.is-disabled {
  background: var(--gray-300) !important;
  border-color: var(--gray-300) !important;
  color: var(--gray-700) !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
.page-hero .apply-btn.is-loading:hover,
.page-hero .apply-btn.is-disabled:hover {
  transform: none !important;
}

/* 과정별 신청 버튼 — 각 hero 배경에 맞는 톤 */
.lv1-hero .apply-btn {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,144,214,0.35);
}
.lv1-hero .apply-btn:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  box-shadow: 0 6px 20px rgba(30,144,214,0.45);
}

.lv2-hero .apply-btn {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45,191,126,0.35);
}
.lv2-hero .apply-btn:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 6px 20px rgba(45,191,126,0.45);
}

.lv3-hero .apply-btn {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244,162,45,0.35);
}
.lv3-hero .apply-btn:hover {
  background: #d98e1d;
  border-color: #d98e1d;
  box-shadow: 0 6px 20px rgba(244,162,45,0.45);
}

/* ---------- INFO GRID ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}
.info-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.info-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-box h3 i { color: var(--cyan); font-size: 14px; }
.info-box p { font-size: 14px; color: var(--text-muted); line-height: 1.75; }
.info-box ul li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0;
  padding-left: 16px;
  position: relative;
}
.info-box ul li::before {
  content: '';
  position: absolute; left: 0; top: 13px;
  width: 5px; height: 5px;
  background: var(--cyan);
  border-radius: 50%;
}

/* 인포 테이블 */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--gray-200); }
.info-table tr:last-child { border-bottom: none; }
.info-table th {
  padding: 8px 12px 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  width: 110px;
  text-align: left;
  vertical-align: middle;
}
.info-table td {
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* 교육 개요: 옆의 교육 일정 표(헤더+4행)와 높이 균형 위해 행 간격 확대 */
.overview-table th,
.overview-table td {
  padding-top: 14px;
  padding-bottom: 14px;
  line-height: 1.65;
}

/* ---------- 커리큘럼 ---------- */
.curriculum-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.curriculum-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.curriculum-section h2 i { color: var(--cyan); }
.curriculum-table-wrap { overflow-x: auto; }
.curriculum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.curriculum-table thead tr {
  background: var(--navy);
  color: var(--white);
}
.curriculum-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.curriculum-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--text-muted);
  font-size: 13.5px;
}
.curriculum-table tbody tr:hover { background: var(--gray-100); }
.day-cell {
  font-weight: 700;
  color: var(--navy) !important;
  white-space: nowrap;
  text-align: center;
  background: var(--gray-100);
}
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.lecture { background: rgba(30,144,214,0.12); color: var(--cyan-dark); }
.tag.lab     { background: rgba(45,191,126,0.12); color: var(--green-dark); }
.tag.eval    { background: rgba(244,162,45,0.12); color: #c07d0a; }
.tag.discuss { background: rgba(120,80,220,0.12); color: #7050b0; }

/* 커리큘럼 3열: 대단원 / 중단원 / 형태 */
.col-cur-major { width: 280px; }
.col-cur-minor { width: auto; }
.col-cur-type  { width: 120px; }

.curriculum-table .cur-major {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
}
.curriculum-table .cur-minor {
  color: var(--text-muted);
  font-size: 13.5px;
}
.curriculum-table .cur-type {
  text-align: center;
  vertical-align: middle;
}
.curriculum-table td {
  vertical-align: top;
}
.curriculum-table th {
  text-align: center;
}

/* 중단원 불릿 목록 */
.curriculum-table .cur-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.curriculum-table .cur-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.65;
}
.curriculum-table .cur-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
}

/* 인라인 주의 텍스트 (빨간 강조) */
.text-warning {
  color: var(--red);
  font-weight: 600;
}

/* 신청 기간 표 (info-table 변형) */
.schedule-table thead {
  background: var(--gray-100);
}
.schedule-table thead th {
  width: auto;
  text-align: center;
  font-size: 12px;
  color: var(--gray-700);
  padding: 8px 12px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  font-weight: 600;
}
.schedule-table tbody td {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.schedule-table .schedule-round {
  font-weight: 700;
  color: var(--cyan-dark);
  background: rgba(30,144,214,0.05);
  width: 50px;
}

/* ---------- 진단원 절차 ---------- */
.process-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.process-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.process-section h2 i { color: var(--cyan); }
.process-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step {
  flex: 1; min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.step-num {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 700;
}
.step-txt { display: flex; flex-direction: column; gap: 4px; }
.step-txt strong { font-size: 14px; color: var(--navy); font-weight: 700; }
.step-txt span { font-size: 12px; color: var(--text-muted); }
.step-arrow { color: var(--gray-300); font-size: 18px; flex-shrink: 0; }

/* ---------- 주의 박스 ---------- */
.notice-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff9eb;
  border: 1px solid #f4d06a;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.notice-box > i {
  color: var(--orange);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notice-box strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
}
.notice-box p { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }

/* ---------- 게시판 ---------- */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* 카테고리 필터 칩 */
.board-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.filter-chip .chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* 검색 박스 */
.board-search {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: var(--transition);
}
.board-search:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(30,144,214,0.10);
}
.board-search input {
  border: none;
  padding: 9px 14px;
  font-size: 14px;
  width: 240px;
  outline: none;
  color: var(--text);
  background: transparent;
}
.board-search button {
  padding: 9px 14px;
  background: var(--navy);
  border: none;
  color: #fff;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}
.board-search button:hover { background: var(--cyan-dark); }

/* 보조 옵션 줄 (정렬 + 기간) */
.board-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.board-options-left,
.board-options-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.board-options-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 6px 0 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.board-options-group label {
  font-size: 12.5px;
  color: var(--gray-500);
  font-weight: 500;
}
.board-options-group select,
.board-options-group input[type="date"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  padding: 5px 4px;
  font-weight: 500;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.board-options-group .date-sep {
  color: var(--gray-300);
  font-size: 13px;
  padding: 0 2px;
}
.board-options-group .quick-range {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--gray-100);
  border-radius: var(--radius);
}
.board-options-group .quick-range button {
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  font-weight: 500;
}
.board-options-group .quick-range button:hover {
  color: var(--text);
}
.board-options-group .quick-range button.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(13,27,42,0.08));
  font-weight: 600;
}
.board-options-reset {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 100px;
  transition: var(--transition);
}
.board-options-reset:hover {
  background: var(--gray-100);
  color: var(--text);
}

/* 결과 메타 (총 N건 / 검색 결과 표시) */
.board-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.board-meta strong { color: var(--navy); font-weight: 700; }
.board-meta .clear-search {
  margin-left: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.board-meta .clear-search:hover { background: var(--gray-200); color: var(--text); }

/* 표 본체 */
.board-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.board-table thead tr {
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-300);
}
.board-table th {
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-700);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.board-table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  vertical-align: middle;
  white-space: nowrap;
}
/* 제목 셀만 줄바꿈 허용 — 긴 제목이 자연스럽게 두 줄로 */
.board-table td.col-title { white-space: normal; }
.board-table tbody tr {
  transition: var(--transition);
  position: relative;
}
.board-table tbody tr:hover {
  background: rgba(30,144,214,0.04);
}
.board-table tbody tr:hover .board-title-link {
  color: var(--cyan-dark);
}
.board-table tbody tr:last-child td { border-bottom: none; }

/* 핀 고정 행 강조 */
.board-table tbody tr.is-pinned {
  background: linear-gradient(90deg, rgba(229,83,83,0.04) 0%, rgba(229,83,83,0.015) 100%);
}
.board-table tbody tr.is-pinned:hover {
  background: linear-gradient(90deg, rgba(229,83,83,0.08) 0%, rgba(229,83,83,0.03) 100%);
}
.board-table tbody tr.is-pinned td:first-child {
  position: relative;
}
.board-table tbody tr.is-pinned td:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
}

/* 컬럼 너비 */
.col-title { text-align: left !important; width: auto; }
.col-num { width: 64px; }
.col-category { width: 88px; }
.col-author { width: 130px; }
.col-date { width: 108px; }
.col-views { width: 72px; }

/* 제목 링크 */
.board-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.board-title-link:hover { color: var(--cyan); }
.pin-icon {
  color: var(--red);
  font-size: 11px;
  flex-shrink: 0;
}
.row-num {
  font-variant-numeric: tabular-nums;
  color: var(--gray-500);
  font-size: 13px;
}
.row-views {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.row-date {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* 로딩 / 빈 상태 */
.board-loading {
  text-align: center !important;
  padding: 56px 16px !important;
  color: var(--gray-500);
}
.board-loading i { margin-right: 8px; }
.board-empty {
  text-align: center !important;
  padding: 64px 24px !important;
  color: var(--text-muted);
}
.board-empty .empty-icon {
  font-size: 32px;
  color: var(--gray-300);
  margin-bottom: 12px;
}
.board-empty .empty-msg {
  font-size: 14px;
  margin-bottom: 4px;
}
.board-empty .empty-sub {
  font-size: 13px;
  color: var(--gray-500);
}

/* 카테고리 뱃지 */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.category-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.cat-공지 { background: rgba(229,83,83,0.10);  color: var(--red); }
.cat-안내 { background: rgba(30,144,214,0.10); color: var(--cyan-dark); }
.cat-기타 { background: rgba(120,130,150,0.10); color: var(--gray-700); }

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  font-weight: 500;
}
.page-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.page-btn.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(30,144,214,0.25);
}
.page-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.page-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.page-info strong { color: var(--navy); font-weight: 700; }

/* ---------- 게시글 상세 ---------- */
.post-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* 상단 헤더 (제목 + 카테고리 + 메타) */
.post-header {
  position: relative;
  padding: 36px 40px 28px;
  background: linear-gradient(180deg, var(--gray-100) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--gray-200);
}
/* 좌측 컬러 액센트 바 — 카테고리 색상 */
.post-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--cyan);
}
.post-detail.is-공지 .post-header::before { background: var(--red); }
.post-detail.is-안내 .post-header::before { background: var(--cyan); }
.post-detail.is-기타 .post-header::before { background: var(--gray-500); }

.post-category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.post-category-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.post-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(229,83,83,0.10);
  color: var(--red);
  border: 1px solid rgba(229,83,83,0.22);
}
.post-pin-badge i { font-size: 10px; }

.post-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
  word-break: keep-all;
}
.post-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta i { color: var(--cyan); width: 13px; text-align: center; }
.post-meta .meta-divider {
  width: 1px;
  height: 11px;
  background: var(--gray-300);
}

/* 본문 영역 */
.post-body {
  padding: 36px 40px;
  background: var(--white);
}
.post-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
  word-break: break-word;
  min-height: 160px;
}
/* sanitize HTML 안의 기본 요소 스타일링 */
.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child  { margin-bottom: 0; }
.post-content p { margin: 0 0 14px; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  margin: 24px 0 12px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}
.post-content h1 { font-size: 22px; }
.post-content h2 { font-size: 19px; }
.post-content h3 { font-size: 17px; }
.post-content h4 { font-size: 15px; }
.post-content ul, .post-content ol { margin: 0 0 14px 22px; }
.post-content li { margin-bottom: 4px; }
.post-content a {
  color: var(--cyan-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover { color: var(--cyan); }
.post-content blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--cyan);
  background: var(--gray-100);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content code {
  padding: 2px 6px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--navy);
}
.post-content pre {
  margin: 16px 0;
  padding: 16px;
  background: var(--navy);
  border-radius: var(--radius);
  overflow-x: auto;
}
.post-content pre code {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.92);
  padding: 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.post-content table th,
.post-content table td {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  text-align: left;
}
.post-content table th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--navy);
}
.post-content img {
  max-width: 100%;
  height: auto;
  margin: 12px 0;
  border-radius: var(--radius);
}
.post-content hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--gray-200);
}

/* ---------- 공지 상세: 첨부파일 ---------- */
.post-attachments {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--gray-300);
}
.post-attachments-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.post-attachments-title i { color: var(--cyan); }
.post-attachments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.attachment-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13.5px;
  transition: var(--transition);
}
.attachment-link:hover {
  background: rgba(30,144,214,0.06);
  border-color: var(--cyan);
  color: var(--cyan-dark);
}
.attachment-link > i:first-child { color: var(--gray-500); font-size: 14px; }
.attachment-link .att-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-link .att-meta {
  color: var(--gray-500);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.attachment-link .att-download { color: var(--gray-500); font-size: 12px; }
.attachment-link:hover .att-download { color: var(--cyan); }
.post-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px 40px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
  gap: 12px;
  flex-wrap: wrap;
}
.post-actions > div { display: flex; gap: 8px; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  transition: var(--transition);
}
.btn-back:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
  transform: translateY(-1px);
}
.btn-back i { font-size: 12px; }

/* ---------- 글쓰기 폼 ---------- */
.write-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.write-form-wrap h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.write-form-wrap h2 i { color: var(--cyan); }
.write-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 7px; }
.form-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.required { color: var(--red); }
.form-row input[type="text"],
.form-row select,
.form-row textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-row input[type="text"]:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(30,144,214,0.1); }
.form-row textarea { resize: vertical; }
.form-row input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--cyan);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 21px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-cis {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-ci {
  width: auto;
  display: block;
  object-fit: contain;
}
.footer-ci-mois { height: 36px; }
.footer-ci-kisa { height: 36px; }
.footer-copy {
  font-size: 12.5px;
  color: var(--gray-500);
  letter-spacing: -0.01em;
  margin: 0;
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-cis { gap: 14px; }
  .footer-ci-mois { height: 46px; }
  .footer-ci-kisa { height: 30px; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .course-cards { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .info-grid { grid-template-columns: 1fr; }
  .stats-inner { flex-wrap: wrap; gap: 8px; }
  .stat-divider { display: none; }
  .stat-item { min-width: 120px; }
  .process-steps { justify-content: center; }
}
@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--navy-mid); padding: 8px 16px 16px; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .nav-link { font-size: 15px; padding: 11px 16px; }
  .hamburger { display: flex; }
  .hero { padding: 64px 20px 56px; }
  .page-hero { padding: 52px 20px 44px; }
  .section-wrap { padding: 40px 16px 56px; }
  .curriculum-section, .process-section, .write-form-wrap { padding: 24px 20px; }
  .post-header { padding: 24px 22px 22px; }
  .post-body { padding: 24px 22px; }
  .post-actions { padding: 14px 22px; }
  .board-search input { width: 180px; }
  .post-title { font-size: 18px; }
  .step-arrow { display: none; }
  .step { min-width: 100px; }
  .board-toolbar { flex-direction: column; align-items: stretch; }
  .board-search { width: 100%; }
  .board-search input { width: 100%; }
}
@media (max-width: 480px) {
  .board-table { font-size: 12.5px; }
  .board-table th, .board-table td { padding: 12px 8px; }
  .col-views, .col-author, .col-num { display: none; }
  .course-cards { grid-template-columns: 1fr; }
  .board-title-link { font-size: 13.5px; }
}

/* ---------- 공개 팝업 ---------- */
.popup-area {
  /* 팝업은 각 위치별 fixed. 부모는 단순 컨테이너. */
}
.popup-window {
  position: fixed;
  z-index: 2000;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.popup-pos-center {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.popup-pos-top-left     { top: 80px;  left: 24px; }
.popup-pos-top-right    { top: 80px;  right: 24px; }
.popup-pos-bottom-right { bottom: 24px; right: 24px; }
.popup-body {
  flex: 1;
  overflow: auto;
  background: var(--white);
}
.popup-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.popup-image-link {
  display: block;
  width: 100%;
  height: 100%;
}
.popup-html {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.popup-html-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.popup-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray-500);
  font-size: 14px;
  background: var(--gray-100);
}
.popup-empty i { margin-right: 8px; }
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  flex-shrink: 0;
}
.popup-today-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.popup-today-close input { accent-color: var(--cyan); }
.popup-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  transition: var(--transition);
}
.popup-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

@media (max-width: 600px) {
  /* 모바일에선 모든 위치를 가운데로 폴백 */
  .popup-window {
    top: 50% !important; left: 50% !important;
    right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%);
    width: 92vw !important;
    max-width: 92vw;
  }
}
