/* =============================================
   board.css - 게시판/FAQ/자료실/폼 연동형 페이지 전용
   ============================================= */

/* ── 게시판 (공지사항) ───────────────────── */
.board {
  width: 100%;
}

.board__search {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: clamp(20px, 3vw, 32px);
  flex-wrap: wrap;
}

.board__search-input {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 15px;
  font-family: 'Noto Sans KR', sans-serif;
  transition: all 0.2s;
}

.board__search-input:focus {
  outline: none;
  border-color: var(--color-secondary01);
  box-shadow: 0 0 0 3px rgba(0, 83, 162, 0.1);
}

.board__search-input::placeholder {
  color: #9ca3af;
}

.board__search-btn {
  padding: 12px 24px;
  background: var(--color-secondary01);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}

.board__search-btn:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.2);
}

/* 글쓰기 버튼: 검색 버튼과 동일 스타일, 목록·페이징 하단 배치 */
.board__write-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(24px, 3vw, 32px);
}

.board__write-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-secondary01);
  border: none;
  border-radius: 8px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;

}

.board__write-btn:hover {
  /*background: var(--color-primary);*/
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.2);
}

.board__list-form {
  margin-bottom: 0;
}

.board__list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.board__delete-selected-btn {
  background: #dc2626;
}

.board__delete-selected-btn:hover {
  background: #b91c1c;
}

.board__list--with-select .board__item {
  grid-template-columns: 40px 80px 1fr 120px 100px;
}

.board__item-select {
  display: flex;
  align-items: center;
  justify-content: center;
}

.board__item-check {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-secondary01);
}

.board__item-select-placeholder {
  display: inline-block;
  width: 18px;
  height: 18px;
}

.board__list {
  border-top: 2px solid #1a1a1a;
}

.board__empty {
  text-align: center;
  padding: 30px 0;
}

.board__item {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px;
  gap: 16px;
  padding: clamp(16px, 2vw, 20px) clamp(16px, 2vw, 24px);
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
}

.board__item:hover {
  background: #f9fafb;
}

.board__num {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
}

.board__title-link {
  color: #1a1a1a;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 500;
  transition: color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board__title-link:hover {
  color: var(--color-secondary01);
}

.board__date {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.board__views {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

/* 교육안내 목록 (5컬럼: 번호, 제목, 교육기간, 접수기간, 상태) */
.board__list--education .board__item {
  grid-template-columns: 80px 1fr 160px 160px 80px;
}

.board__apply,
.board__status {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.board__status {
  font-weight: 600;
}

.board__detail {
  background: #ffffff;
  border-radius: 12px;
  padding: clamp(32px, 4vw, 48px);
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.board__detail-header {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 20px;
  margin-bottom: 32px;
}

.board__detail-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.4;
}

.board__detail-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #6b7280;
  flex-wrap: wrap;
}

.board__detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board__detail-body {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.8;
  color: #374151;
  margin-bottom: 32px;
  min-height: 300px;
}

.board__detail-body p {
  margin-bottom: 16px;
}

.board__detail-body strong {
  font-weight: 700;
  color: #1a1a1a;
}

.board__detail-files {
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.board__detail-files-title {
  font-weight: 600;
  color: var(--color-secondary01);
  margin-bottom: 12px;
  font-size: 15px;
}

.board__detail-file {
  padding: 8px 0;
  color: #4b5563;
  font-size: 14px;
}

.board__detail-file a {
  color: #4b5563;
  transition: color 0.2s;
  text-decoration: underline;
}

.board__detail-file a:hover {
  color: var(--color-secondary01);
}

.board__detail-nav {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.board__nav-btn {
  padding: 12px 24px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #4b5563;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
}

.board__nav-btn:hover {
  background: #f9fafb;
  border-color: var(--color-secondary01);
  color: var(--color-secondary01);
}

.board__detail-nav-form {
  display: inline-block;
  margin: 0;
}

.board__nav-btn--danger {
  border-color: #dc2626;
  color: #dc2626;
}

.board__nav-btn--danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}

/* 목록 버튼: 등록/목록 버튼과 동일 디자인 */
.board__back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--color-secondary01);
  border: none;
  border-radius: 10px;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.board__back-btn:hover {  
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.2);
}

/* ── 페이지네이션 ───────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(32px, 4vw, 48px);
  flex-wrap: wrap;
}

.pagination__btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
}

.pagination__btn:hover {
  background: #f9fafb;
  border-color: var(--color-secondary01);
  color: var(--color-secondary01);
}

.pagination__btn.is-active {
  background: var(--color-secondary01);
  border-color: var(--color-secondary01);
  color: #ffffff;
  font-weight: 600;
}

/* ── 자료실/양식자료실 ──────────────────── */
.archive {
  width: 100%;
}

.archive__filters {
  display: flex;
  gap: 12px;
  margin-bottom: clamp(24px, 3vw, 32px);
  flex-wrap: wrap;
}

.archive__filter-select {
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  transition: all 0.2s;
}

.archive__filter-select:focus {
  outline: none;
  border-color: var(--color-secondary01);
}

.archive__list {
  display: grid;
  gap: 16px;
}

.archive__row {
  display: grid;
  grid-template-columns: 1fr auto 120px 140px;
  gap: clamp(12px, 2vw, 20px);
  padding: clamp(16px, 2.5vw, 24px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  align-items: center;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.archive__row:hover {
  background: #fafbfc;
  border-color: var(--color-secondary01);
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.1);
}

.archive__info {
  min-width: 0;
}

.archive__title {
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive__desc {
  font-size: 14px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive__format {
  padding: 6px 12px;
  background: #dbeafe;
  border-radius: 6px;
  color: var(--color-secondary01);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.archive__date {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.archive__btn {
  padding: 10px 20px;
  background: var(--color-secondary01);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.archive__btn:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.2);
}

/* ── FAQ ────────────────────────────────── */
.faq {
  width: 100%;
}

.faq__search {
  margin-bottom: clamp(24px, 3vw, 32px);
}

.faq__search-input {
  width: 100%;
  max-width: 600px;
  padding: 14px 20px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 15px;
  font-family: 'Noto Sans KR', sans-serif;
  transition: all 0.2s;
}

.faq__search-input:focus {
  outline: none;
  border-color: var(--color-secondary01);
  box-shadow: 0 0 0 3px rgba(0, 83, 162, 0.1);
}

.faq__search-input::placeholder {
  color: #9ca3af;
}

.faq__list {
  display: grid;
  gap: 12px;
}

.faq__item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.faq__item.is-open {
  border-color: var(--color-secondary01);
  background: #fafbfc;
  box-shadow: 0 4px 12px rgba(0, 83, 162, 0.08);
}

.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 24px);
  cursor: pointer;
  transition: background 0.2s;
}

.faq__q:hover {
  background: #f9fafb;
}

.faq__q-text {
  flex: 1;
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq__q-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #dbeafe;
  border-radius: 6px;
  color: var(--color-secondary01);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.faq__q-icon {
  width: 24px;
  height: 24px;
  color: #6b7280;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq__item.is-open .faq__q-icon {
  transform: rotate(180deg);
  color: var(--color-secondary01);
}

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq__item.is-open .faq__a {
  max-height: 1000px;
}

.faq__a-inner {
  padding: 0 clamp(18px, 2.5vw, 24px) clamp(20px, 2.5vw, 28px);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.7;
  color: #4b5563;
  border-top: 1px solid #e5e7eb;
  padding-top: clamp(16px, 2vw, 20px);
}

/* ── 폼 (제출/신청) ─────────────────────── */
.form {
  max-width: 800px;
  margin: 0 auto;
}

/* 게시판 등록/수정 폼: sub__content 가로폭에 맞춤 */
.sub__content .board-write-form {
  max-width: 100%;
}

.board-write-form .form__field--textarea {
  min-height: 360px;
}

.board-write-form .ck-editor .ck-editor__editable {
  min-height: 340px;
}

.board-write-form__attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.board-write-form__attach-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.board-write-form__attach-label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.board-write-form__attach-item .form__field--file {
  width: 100%;
}

/* 등록/수정 버튼 한 줄 배치 */
.form__row--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 40px);
}

.form__row--actions .form__submit--inline {
  width: auto;
  min-width: 100px;
  width:100px;
  padding: 14px 28px;
  font-size:15px;
  margin-top: 0;
}

.form__cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  min-width: 100px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #4b5563;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
  transition: all 0.2s;
}

.form__cancel:hover {
  background: #f9fafb;
  border-color: var(--color-secondary01);
  color: var(--color-secondary01);
}

.form__row {
  margin-bottom: clamp(20px, 3vw, 28px);
}

.form__label {
  display: block;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.form__label--required::after {
  content: '*';
  color: #ef4444;
  margin-left: 4px;
}

.form__field {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 15px;
  font-family: 'Noto Sans KR', sans-serif;
  transition: all 0.2s;
}

.form__field:focus {
  outline: none;
  border-color: var(--color-secondary01);
  box-shadow: 0 0 0 3px rgba(0, 83, 162, 0.1);
}

.form__field::placeholder {
  color: #9ca3af;
}

.form__field--textarea {
  min-height: 160px;
  resize: vertical;
}

.form__field--select {
  cursor: pointer;
}

.form__field--file {
  padding: 12px;
  cursor: pointer;
}

.form__hint {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

.form__checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form__checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
  accent-color: var(--color-secondary01);
}

.form__checkbox-label {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
  cursor: pointer;
}

.form__submit {
  display: block;
  width: 100%;
  padding: 16px 32px;
  background: var(--color-secondary01);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Noto Sans KR', sans-serif;
  margin-top: clamp(32px, 4vw, 48px);
}

.form__submit:hover {  
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 83, 162, 0.25);
}

.form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form__success {
  padding: clamp(24px, 4vw, 40px);
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  text-align: center;
}

.form__success-title {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 12px;
}

.form__success-text {
  font-size: clamp(15px, 2vw, 17px);
  color: #15803d;
  line-height: 1.6;
}

/* ── 반응형 ─────────────────────────────── */
@media (max-width: 991.98px) {
  .board__item {
    grid-template-columns: 60px 1fr 100px;
    gap: 12px;
  }

  .board__list--with-select .board__item {
    grid-template-columns: 40px 60px 1fr 100px;
  }

  .board__list--education .board__item {
    grid-template-columns: 60px 1fr 120px 90px;
  }

  .board__list--education .board__apply {
    display: none;
  }

  .board__views {
    display: none;
  }

  .archive__row {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .archive__format,
  .archive__date {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .archive__btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .board__item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .board__list--with-select .board__item {
    grid-template-columns: 40px 1fr;
  }

  .board__list--education .board__item {
    grid-template-columns: 1fr;
  }

  .board__list--education .board__date,
  .board__list--education .board__status {
    text-align: left;
    font-size: 13px;
  }

  .board__num {
    display: none;
  }

  .board__date {
    text-align: left;
    font-size: 13px;
  }

  .archive__row {
    grid-template-columns: 1fr;
  }

  .board__search {
    flex-direction: column;
  }

  .board__search-input {
    max-width: 100%;
  }

  .board__detail-nav {
    flex-direction: column;
  }

  .board__nav-btn,
  .board__back-btn {
    width: 100%;
    text-align: center;
  }
}

/* ── 3뎁스 그룹 탭 (nav_group) ───────────────────── */
.board-depth3 {
  margin-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid #e5e7eb;
}
.board-depth3__inner {
  max-width: 100%;
}
.board-depth3__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.board-depth3__item {
  margin: 0;
}
.board-depth3__link {
  display: inline-block;
  padding: 12px 20px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.board-depth3__link:hover {
  color: var(--color-secondary01);
}
.board-depth3__link.is-active {
  color: var(--color-secondary01);
  border-bottom-color: var(--color-secondary01);
}

/* BUILD_STAMP: 2026-03-05T21:30:00+09:00 */
