/**
 * ukb 테마 - 게시판 스타일
 * UK Biobank 스타일에 맞춘 그누보드 게시판 CSS
 */

/* 기본 리셋 */
.ukb-board-wrapper * {
  box-sizing: border-box;
}

/* 게시판 래퍼 */
.ukb-board-wrapper {
  background: #fff;
  border-radius: 8px;
}

/* 게시판 검색 */
.ukb-board-wrapper .board_search {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ukb-board-wrapper .board_search select,
.ukb-board-wrapper .board_search input[type="text"] {
  padding: 10px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
  color: #344054;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ukb-board-wrapper .board_search input[type="text"] {
  min-width: 200px;
}

.ukb-board-wrapper .board_search select:focus,
.ukb-board-wrapper .board_search input[type="text"]:focus {
  outline: none;
  border-color: #00a0c6;
  box-shadow: 0 0 0 3px rgba(0, 160, 198, 0.1);
}

.ukb-board-wrapper .board_search button,
.ukb-board-wrapper .board_search input[type="submit"] {
  padding: 10px 20px;
  background: #00a0c6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.ukb-board-wrapper .board_search button:hover,
.ukb-board-wrapper .board_search input[type="submit"]:hover {
  background: #008ba8;
}

/* 게시판 리스트 테이블 */
.ukb-board-wrapper .tbl_head01 {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.ukb-board-wrapper .tbl_head01 thead th {
  padding: 16px 12px;
  background: #f8f9fa;
  border-bottom: 2px solid #00a0c6;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
  text-align: center;
}

.ukb-board-wrapper .tbl_head01 tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
  color: #495057;
  text-align: center;
  vertical-align: middle;
}

.ukb-board-wrapper .tbl_head01 tbody tr:hover {
  background: #f8f9fa;
}

/* 제목 칸 왼쪽 정렬 */
.ukb-board-wrapper .tbl_head01 .td_subject,
.ukb-board-wrapper .tbl_head01 .td_subject a {
  text-align: left;
}

.ukb-board-wrapper .tbl_head01 .td_subject a {
  color: #212529;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  display: block;
}

.ukb-board-wrapper .tbl_head01 .td_subject a:hover {
  color: #00a0c6;
}

/* 공지사항 스타일 */
.ukb-board-wrapper .tbl_head01 tbody tr.bo_notice {
  background: #f0fafc;
}

.ukb-board-wrapper .tbl_head01 tbody tr.bo_notice td {
  font-weight: 500;
}

/* 번호 칸 */
.ukb-board-wrapper .tbl_head01 .td_num {
  width: 80px;
  color: #868e96;
}

/* 작성자 */
.ukb-board-wrapper .tbl_head01 .td_name {
  width: 120px;
}

/* 날짜 */
.ukb-board-wrapper .tbl_head01 .td_date {
  width: 100px;
  color: #868e96;
}

/* 조회수 */
.ukb-board-wrapper .tbl_head01 .td_num_ex {
  width: 80px;
  color: #868e96;
}

/* 아이콘들 */
.ukb-board-wrapper .tbl_head01 .cnt_cmt,
.ukb-board-wrapper .tbl_head01 .new_icon,
.ukb-board-wrapper .tbl_head01 .hot_icon {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

.ukb-board-wrapper .tbl_head01 .cnt_cmt {
  background: #e9ecef;
  color: #495057;
}

.ukb-board-wrapper .tbl_head01 .new_icon {
  background: #00a0c6;
  color: #fff;
}

.ukb-board-wrapper .tbl_head01 .hot_icon {
  background: #dc3545;
  color: #fff;
}

/* 페이지 네비게이션 */
.ukb-board-wrapper .pg_wrap {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.ukb-board-wrapper .pg {
  display: flex;
  gap: 4px;
  align-items: center;
}

.ukb-board-wrapper .pg a,
.ukb-board-wrapper .pg strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
  color: #344054;
  text-decoration: none;
  transition: all 0.2s;
}

.ukb-board-wrapper .pg a:hover {
  background: #f8f9fa;
  border-color: #00a0c6;
  color: #00a0c6;
}

.ukb-board-wrapper .pg strong,
.ukb-board-wrapper .pg .pg_current {
  background: #00a0c6;
  border-color: #00a0c6;
  color: #fff;
  font-weight: 600;
}

.ukb-board-wrapper .pg .pg_start,
.ukb-board-wrapper .pg .pg_prev,
.ukb-board-wrapper .pg .pg_next,
.ukb-board-wrapper .pg .pg_end {
  background: #f8f9fa;
}

/* 버튼 그룹 */
.ukb-board-wrapper .btn_bo_user,
.ukb-board-wrapper .btn_bo_adm {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.ukb-board-wrapper .btn_bo_user a,
.ukb-board-wrapper .btn_bo_user button,
.ukb-board-wrapper .btn_bo_adm a,
.ukb-board-wrapper .btn_bo_adm button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
}

.ukb-board-wrapper .btn_bo_user a:hover,
.ukb-board-wrapper .btn_bo_user button:hover,
.ukb-board-wrapper .btn_bo_adm a:hover,
.ukb-board-wrapper .btn_bo_adm button:hover {
  background: #f8f9fa;
  border-color: #00a0c6;
  color: #00a0c6;
}

.ukb-board-wrapper .btn_bo_user .btn_b01,
.ukb-board-wrapper .btn_submit {
  background: #00a0c6 !important;
  border-color: #00a0c6 !important;
  color: #fff !important;
}

.ukb-board-wrapper .btn_bo_user .btn_b01:hover,
.ukb-board-wrapper .btn_submit:hover {
  background: #008ba8 !important;
  border-color: #008ba8 !important;
}

/* 게시글 보기 페이지 */
.ukb-board-wrapper .bo_v_title {
  font-size: 24px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 16px;
  line-height: 1.4;
}

.ukb-board-wrapper .bo_v_info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 24px;
  font-size: 14px;
  color: #868e96;
}

.ukb-board-wrapper .bo_v_info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ukb-board-wrapper .bo_v_info strong {
  color: #495057;
  font-weight: 500;
}

.ukb-board-wrapper .bo_v_con {
  min-height: 200px;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.8;
  color: #495057;
}

.ukb-board-wrapper .bo_v_con img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 첨부파일 */
.ukb-board-wrapper .bo_v_file {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
}

.ukb-board-wrapper .bo_v_file_tit {
  font-size: 14px;
  font-weight: 600;
  color: #344054;
  margin-bottom: 12px;
}

.ukb-board-wrapper .bo_v_file ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ukb-board-wrapper .bo_v_file li {
  margin-bottom: 8px;
}

.ukb-board-wrapper .bo_v_file a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #00a0c6;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.ukb-board-wrapper .bo_v_file a:hover {
  color: #008ba8;
  text-decoration: underline;
}

/* 댓글 */
.ukb-board-wrapper #bo_vc {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e9ecef;
}

.ukb-board-wrapper #bo_vc h2 {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 16px;
}

.ukb-board-wrapper .cmt_list li {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
}

.ukb-board-wrapper .cmt_list .cmt_name {
  font-weight: 600;
  color: #344054;
  margin-right: 12px;
}

.ukb-board-wrapper .cmt_list .cmt_txt {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #495057;
}

/* 글쓰기 폼 */
.ukb-board-wrapper .write_div {
  margin-bottom: 16px;
}

.ukb-board-wrapper .write_div label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #344054;
  margin-bottom: 6px;
}

.ukb-board-wrapper .write_div input[type="text"],
.ukb-board-wrapper .write_div input[type="password"],
.ukb-board-wrapper .write_div textarea,
.ukb-board-wrapper .write_div select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
  color: #344054;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ukb-board-wrapper .write_div input[type="text"]:focus,
.ukb-board-wrapper .write_div input[type="password"]:focus,
.ukb-board-wrapper .write_div textarea:focus,
.ukb-board-wrapper .write_div select:focus {
  outline: none;
  border-color: #00a0c6;
  box-shadow: 0 0 0 3px rgba(0, 160, 198, 0.1);
}

.ukb-board-wrapper .write_div textarea {
  min-height: 200px;
  resize: vertical;
}

/* 갤러리 스킨 */
.ukb-board-wrapper .gall_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.ukb-board-wrapper .gall_list li {
  list-style: none;
}

.ukb-board-wrapper .gall_list .gall_img {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
  background: #f8f9fa;
}

.ukb-board-wrapper .gall_list .gall_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ukb-board-wrapper .gall_list li:hover .gall_img img {
  transform: scale(1.05);
}

.ukb-board-wrapper .gall_list .gall_text_href {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #212529;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}

.ukb-board-wrapper .gall_list .gall_text_href:hover {
  color: #00a0c6;
}

.ukb-board-wrapper .gall_list .gall_info {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #868e96;
}

/* 반응형 */
@media (max-width: 768px) {
  .ukb-board-wrapper .tbl_head01 thead {
    display: none;
  }

  .ukb-board-wrapper .tbl_head01 tbody tr {
    display: block;
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .ukb-board-wrapper .tbl_head01 tbody td {
    display: block;
    padding: 4px 0;
    border: none;
    text-align: left;
  }

  .ukb-board-wrapper .tbl_head01 .td_subject {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .ukb-board-wrapper .tbl_head01 .td_num,
  .ukb-board-wrapper .tbl_head01 .td_name,
  .ukb-board-wrapper .tbl_head01 .td_date,
  .ukb-board-wrapper .tbl_head01 .td_num_ex {
    display: inline-block;
    width: auto;
    font-size: 12px;
    margin-right: 12px;
  }

  .ukb-board-wrapper .board_search {
    justify-content: center;
  }

  .ukb-board-wrapper .board_search input[type="text"] {
    min-width: 150px;
    flex: 1;
  }

  .ukb-board-wrapper .btn_bo_user,
  .ukb-board-wrapper .btn_bo_adm {
    justify-content: center;
  }

  .ukb-board-wrapper .gall_list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
