/* Bootstrap 5 Override for GNU Board Basic Theme */
/* 그누보드 베이직 테마와 Bootstrap 5 호환성을 위한 오버라이드 */

/* 모든 링크에서 밑줄 제거 */
a {
  text-decoration: none !important;
}

a:hover {
  text-decoration: none !important;
}

a:focus {
  text-decoration: none !important;
}

a:active {
  text-decoration: none !important;
}

a:visited {
  text-decoration: none !important;
}

/* 다크모드 배경색 오버라이드 */
[data-bs-theme="dark"] {
  /* 게시판 영역 배경 투명 처리 */
  #bo_list,
  #bo_gall,
  .tbl_wrap,
  .tbl_head01,
  .tbl_head02,
  #bo_btn_top,
  #bo_list_total,
  .btn_bo_user {
    background: transparent !important;
    background-color: transparent !important;
  }
  
  /* 게시판 테이블 배경 투명 처리 */
  .tbl_wrap table,
  .tbl_head01 table,
  .tbl_head02 table {
    background: transparent !important;
    background-color: transparent !important;
  }
  
  /* 게시판 테이블 셀 배경 투명 처리 */
  .tbl_head01 td,
  .tbl_head02 td,
  .tbl_head01 th,
  .tbl_head02 th,
  .tbl_head01 tbody th,
  .tbl_head02 tbody th {
    background: transparent !important;
    background-color: transparent !important;
  }
  
  /* 게시판 목록 상단 버튼 영역 배경 제거 */
  #bo_btn_top,
  .bo_fx,
  .btn_bo_user,
  .btn_bo_user li {
    background: transparent !important;
    background-color: transparent !important;
  }
  
  /* 우측 사이드바 배경 투명 처리 */
  #aside,
  #aside .latest_wr,
  #aside .lt_wr {
    background: transparent !important;
  }
  
  /* 로그인창 배경 투명 처리 */
  .outlogin,
  .outlogin_skin,
  .ol_after,
  .ol_before {
    background: transparent !important;
  }
  
  /* 최신글 박스 배경 투명 처리 */
  .latest_wr,
  .latest_top_wr {
    background: transparent !important;
  }
  
  /* 게시판 버튼 영역 배경 투명 처리 */
  #bo_btn_top,
  .bo_fx {
    background: transparent !important;
  }
  
  /* 검색 영역 배경 투명 처리 */
  .bo_sch_wrap,
  .bo_sch {
    background: transparent !important;
  }
  
  /* 폼 요소들 다크모드 적용 */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea,
  select {
    background-color: var(--bs-dark) !important;
    border-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
  }
  
  /* 버튼들 다크모드 적용 */
  .btn:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark) {
    background-color: var(--bs-gray-700) !important;
    border-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
  }
  
  .login-sns {
    background: transparent !important;
  }

  /* 모든 하위 요소의 배경색도 강제로 투명하게 */
  #bo_list *,
  #bo_gall *,
  .tbl_wrap *,
  .tbl_head01 *,
  .tbl_head02 * {
    background-color: transparent !important;
  }
  
  /* 특정 요소들만 배경색 허용 */
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-warning,
  .btn-info,
  .btn-light,
  .btn-dark,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea,
  select {
    background-color: var(--bs-gray-700) !important;
  }
}

/* 한국어 폰트 설정 */
:root {
  --bs-font-sans-serif: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Nanum Gothic", "나눔고딕", "돋움", Dotum, Arial, sans-serif;
}

/* 기본 색상 변수 */
:root {
  --bs-primary: #3a8afd;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
}

/* 그누보드 네비게이션과 Bootstrap 네비게이션 호환성 */
.navbar-nav .nav-link {
  color: #080808;
  font-weight: bold;
  padding: 0 15px;
  line-height: 55px;
  text-decoration: none;
}
[data-bs-theme="dark"] .navbar-nav .nav-link {
  color: #a5a5a5;
}
.navbar-nav .nav-link {
  color: #080808;
  font-weight: bold;
  padding: 0 15px;
  line-height: 55px;
  text-decoration: none;
}

.navbar-nav .nav-link:hover {
  color: #3a8afd;
}

/* 그누보드 버튼 스타일과 Bootstrap 버튼 호환성 */
.btn.btn-gnu {
  line-height: 35px;
  height: 35px;
  padding: 0 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1.4em;
}

.btn.btn-gnu-submit {
  background: #3a8afd;
  color: #fff;
  border: 0;
}

.btn.btn-gnu-submit:hover {
  background: #2375eb;
}

/* 그누보드 테이블과 Bootstrap 테이블 호환성 */
.table.table-gnu {
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.table.table-gnu th {
  padding: 20px 0;
  font-weight: normal;
  text-align: center;
  border-bottom: 1px solid #ececec;
  height: 40px;
}

.table.table-gnu td {
  color: #666;
  padding: 10px 5px;
  border-top: 1px solid #ecf0f1;
  border-bottom: 1px solid #ecf0f1;
  line-height: 1.4em;
  height: 60px;
  word-break: break-all;
}

.table.table-gnu tbody tr:hover td {
  background: #fafafa;
}

/* 그누보드 폼과 Bootstrap 폼 호환성 */
.form-control.form-gnu {
  border: 1px solid #d0d3db;
  background: #fff;
  color: #000;
  border-radius: 3px;
  padding: 5px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.form-control.form-gnu:focus {
  box-shadow: 0 0 5px #9ed4ff;
  border: 1px solid #558ab7;
}

/* Bootstrap 컨테이너 사이즈 조정 */
.container,
.container-fluid {
  max-width: 1200px;
}

/* Bootstrap 그리드 시스템 활용 */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  #hd_pop,
  #hd_wrapper,
  #tnb .inner,
  #gnb .gnb_wrap,
  #container_wr,
  #ft_wr {
    width: 100%;
    padding: 0 15px;
  }
  
  .container,
  .container-fluid {
    width: 100%;
    padding: 0 15px;
  }
}

/* 페이지네이션 호환성 */
.pagination.pagination-gnu {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pagination.pagination-gnu .page-item {
  margin: 0 2px;
}

.pagination.pagination-gnu .page-link {
  color: #959595;
  font-size: 1.083em;
  height: 30px;
  line-height: 28px;
  padding: 0 5px;
  min-width: 30px;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid #eee;
  background: #eee;
}

.pagination.pagination-gnu .page-link:hover {
  background-color: #fafafa;
}

.pagination.pagination-gnu .page-item.active .page-link {
  background: #3a8afd;
  border: 1px solid #3a8afd;
  color: #fff;
  font-weight: bold;
}

/* 알림 메시지 호환성 */
.alert.alert-gnu {
  position: relative;
  margin: 10px;
  border-radius: 5px;
  font-size: 1em;
  background: #f2838f;
  color: #fff;
  line-height: 50px;
  text-align: left;
  padding: 0 20px;
  border: none;
}

.alert.alert-gnu:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 50px;
  background: #da4453;
  border-radius: 3px 0 0 3px;
}

/* 카드 컴포넌트 호환성 */
.card.card-gnu {
  border: 1px solid #e9e9e9;
  border-radius: 5px;
  margin-bottom: 20px;
}

.card.card-gnu .card-header {
  background: #f5f8f9;
  border-bottom: 1px solid #e9e9e9;
  padding: 15px;
  font-weight: bold;
}

.card.card-gnu .card-body {
  padding: 15px;
}

/* 모달 호환성 */
.modal.modal-gnu .modal-content {
  border-radius: 5px;
}

.modal.modal-gnu .modal-header {
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  padding: 15px;
}

.modal.modal-gnu .modal-body {
  padding: 20px;
}

.modal.modal-gnu .modal-footer {
  border-top: 1px solid #e9e9e9;
  padding: 15px;
}