@charset "utf-8";

/* ========================================
   CRE 스타일 기반 서브페이지 개선
   ======================================== */

/* -------------------- 색상 변수 -------------------- */
:root {
  --cre-primary: #004b9c;
  --cre-secondary: #307bcb;
  --cre-gray-bg: #f5f5f5;
  --cre-border: #ddd;
  --cre-text: #222;
  --cre-hover: #f5f5f5;
}

/* -------------------- 전체 개선 -------------------- */
body {
  font-weight: 400;
  line-height: 1.6;
}

/* -------------------- 서브 비주얼 개선 -------------------- */
.subvisual {
  height: 140px;
  background-size: cover;
  background-position: center;
}

.subvisual h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 140px;
  letter-spacing: -0.5px;
}

/* -------------------- SNB 개선 -------------------- */
#snb {
  height: 60px;
  border-top: 1px solid var(--cre-border);
  border-bottom: 2px solid var(--cre-primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#snb .menu > li {
  font-size: 15px;
  font-weight: 500;
  min-width: 200px;
}

#snb .menu > li > a {
  height: 58px;
  line-height: 58px;
  transition: all 0.3s;
}

#snb .menu > li.selected > a {
  color: var(--cre-primary);
  font-weight: 700;
}

#snb .menu .submenu {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 5px 5px;
}

#snb .menu .submenu > ul > li > a {
  transition: all 0.3s;
}

#snb .menu .submenu > ul > li:hover {
  background: var(--cre-hover);
}

#snb .con_util .print {
  transition: opacity 0.3s;
}

#snb .con_util .print:hover {
  opacity: 0.7;
}

/* -------------------- 페이지 타이틀 개선 -------------------- */
#content .layout-title {
  margin-top: 60px;
  padding-bottom: 30px;
}

#content .layout-title span {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  background-image: none;
  padding-left: 0;
  position: relative;
}

#content h3.title small {
  font-size: 16px;
  font-weight: 400;
  color: #666;
  margin-top: 15px;
}

/* -------------------- 페이지 탭 개선 (CRE case_tab 스타일) -------------------- */
.pageTab {
  margin: 30px 0 20px;
  border-bottom: 2px solid var(--cre-primary);
}

.pageTab > ul {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pageTab > ul > li {
  position: relative;
  margin: 0;
  padding: 0;
}

.pageTab > ul > li > a {
  display: block;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  background: #f5f5f5;
  border-radius: 5px 5px 0 0;
  transition: all 0.3s;
  color: #666;
}

.pageTab > ul > li.active > a {
  background: var(--cre-primary);
  color: #fff;
}

.pageTab > ul > li > a:hover {
  background: var(--cre-secondary);
  color: #fff;
}

/* 하위 메뉴 (childmenu) */
.pageTab .childmenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--cre-border);
  border-top: 0;
  min-width: 200px;
  z-index: 100;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 5px 5px;
  display: none;
}

.pageTab > ul > li.active .childmenu {
  display: block;
}

.pageTab .childmenu ul {
  padding: 10px 0;
}

.pageTab .childmenu ul > li {
  margin: 0;
  border: 0;
}

.pageTab .childmenu ul > li > a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.3s;
}

.pageTab .childmenu ul > li.active > a {
  color: var(--cre-primary);
  font-weight: 700;
  background: #f8f9fa;
}

.pageTab .childmenu ul > li > a:hover {
  background: var(--cre-hover);
  color: var(--cre-primary);
}

/* -------------------- 컨텐츠 박스 개선 -------------------- */
#content .content_box {
  margin: 40px 0 100px;
}

/* -------------------- 버튼 스타일 개선 -------------------- */
.btn_primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--cre-primary);
  color: #fff;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  border: 0;
  cursor: pointer;
}

.btn_primary:hover {
  background: var(--cre-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 75, 156, 0.2);
}

.btn_secondary {
  display: inline-block;
  padding: 12px 30px;
  background: #fff;
  color: var(--cre-primary);
  border: 2px solid var(--cre-primary);
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
}

.btn_secondary:hover {
  background: var(--cre-primary);
  color: #fff;
}

/* -------------------- 테이블 개선 (전체) -------------------- */
.table-scroll table {
  border-top: 2px solid var(--cre-text);
  border-bottom: 1px solid var(--cre-border);
}

.table-scroll thead th {
  background: #f8f9fa;
  padding: 15px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cre-text);
  border-bottom: 1px solid var(--cre-border);
}

.table-scroll tbody tr {
  transition: all 0.3s;
  border-bottom: 1px solid #f0f0f0;
}

.table-scroll tbody tr:hover {
  background: var(--cre-hover);
}

.table-scroll tbody td {
  padding: 15px 10px;
  font-size: 14px;
  line-height: 1.5;
  border-left: 1px solid #f0f0f0;
}

/* -------------------- 말줄임 개선 + Tooltip -------------------- */
.table-scroll span.wdItem,
.table-scroll span.wdDetail,
.table-scroll span.wdParts,
.table-scroll span.wdSegment,
.table-scroll span.wdFamily,
.table-scroll span.wdClass,
.table-scroll span.wdBrick,
.table-scroll span.wdClass2,
.table-scroll span.wdClass3 {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: help;
  position: relative;
}

/* Tooltip 효과 (title 속성 활용) */
.table-scroll span[title]:hover {
  z-index: 10;
}

/* -------------------- Classification 검색 블록 개선 -------------------- */
#content .content_box .block {
  border: 1px solid var(--cre-border);
  border-top: 3px solid var(--cre-primary);
  background: #fafbfc;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#content .content_box .searchKgpc {
  padding: 20px 40px;
}

#content .content_box .tree_block {
  background: #fafbfc;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--cre-border);
}

#content .content_box .block .block_content {
  background: #fff;
  margin-bottom: 20px;
  border-radius: 6px;
  border: 1px solid #e8eaef;
}

/* 검색 버튼 개선 */
#content .content_box .block .search .btn {
  background-color: var(--cre-primary);
  padding: 45px 30px 15px;
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 700;
}

#content .content_box .block .search .btn:hover {
  background-color: var(--cre-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 75, 156, 0.3);
}

.block_tree .select-search-btn button {
  background-color: var(--cre-primary);
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s;
}

.block_tree .select-search-btn button:hover {
  background-color: var(--cre-secondary);
  transform: translateY(-2px);
}

/* -------------------- 속성 박스 개선 -------------------- */
.attribute_box,
.gpcAttribute_box {
  background: #fff;
  padding: 25px !important;
  border-radius: 8px;
  border: 1px solid var(--cre-border) !important;
  margin-bottom: 20px;
}

.attribute_box > ul > li {
  padding: 15px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e8eaef;
}

.attribute_box > ul > li:hover {
  border-color: var(--cre-primary);
  background: #fff;
}

/* 라디오 버튼 스타일 개선 */
.attribute_box input[type="radio"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.attribute_box label {
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
}

.attribute_box label:hover {
  color: var(--cre-primary);
}

/* -------------------- 반응형 테이블 (핵심!) -------------------- */
@media (max-width: 1400px) {
  #content {
    max-width: 100%;
    padding: 0 30px;
  }
  
  #snb .location_nav {
    width: 100%;
    padding: 0 20px;
  }
  
  #snb .menu > li {
    min-width: 180px;
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  /* 테이블 가로 스크롤 */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-scroll table {
    min-width: 1200px;
  }
  
  /* SNB 간소화 */
  #snb .menu > li {
    min-width: 150px;
    font-size: 13px;
  }
  
  /* 페이지 타이틀 */
  #content .layout-title span {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  /* 모바일: 카드형 테이블 */
  .table-scroll {
    overflow-x: visible;
  }
  
  .table-scroll table {
    min-width: auto;
  }
  
  .table-scroll thead {
    display: none;
  }
  
  .table-scroll tbody tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--cre-border);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  
  .table-scroll tbody td {
    display: flex;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .table-scroll tbody td:last-child {
    border-bottom: 0;
  }
  
  .table-scroll tbody td:before {
    content: attr(data-label);
    font-weight: 700;
    width: 100px;
    flex-shrink: 0;
    color: var(--cre-text);
  }
  
  .table-scroll span.wdItem,
  .table-scroll span.wdDetail,
  .table-scroll span.wdParts,
  .table-scroll span.wdSegment,
  .table-scroll span.wdFamily,
  .table-scroll span.wdClass,
  .table-scroll span.wdBrick,
  .table-scroll span.wdClass2,
  .table-scroll span.wdClass3 {
    width: 100%;
    max-width: none;
  }
  
  /* 페이지 타이틀 */
  #content .layout-title span {
    font-size: 22px;
  }
  
  /* SNB 모바일 */
  #snb {
    height: auto;
  }
  
  #snb .location_nav {
    width: 100%;
    height: auto;
    padding: 10px;
  }
  
  #snb .menu {
    width: 100%;
  }
  
  #snb .menu > li {
    float: none;
    width: 100%;
    min-width: auto;
    background: none;
    border-bottom: 1px solid #e5e5e5;
  }
  
  #snb .menu > li > a {
    height: 45px;
    line-height: 45px;
    border: 0;
  }
  
  /* 페이지 탭 모바일 */
  .pageTab > ul {
    flex-direction: column;
    gap: 5px;
  }
  
  .pageTab > ul > li {
    width: 100%;
  }
  
  .pageTab > ul > li > a {
    width: 100%;
    padding: 12px 20px;
  }
  
  .pageTab .childmenu {
    position: static;
    margin-top: 5px;
    border-radius: 5px;
  }
}

/* -------------------- info_box (정보 박스) -------------------- */
.info_box {
  display: flex;
  border: 1px solid var(--cre-border);
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info_box .iconbox {
  position: relative;
  width: 120px;
  text-align: center;
  flex-shrink: 0;
}

.info_box .iconbox:after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--cre-border);
}

.info_box .iconbox img {
  max-width: 80px;
}

.info_box .txtbox {
  flex: 1;
  padding-left: 30px;
}

.info_box .txtbox .i_tit {
  font-size: 18px;
  font-weight: 700;
  color: var(--cre-primary);
  margin-bottom: 10px;
}

.info_box .txtbox .txt {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

@media (max-width: 768px) {
  .info_box {
    flex-direction: column;
    padding: 20px;
  }
  
  .info_box .iconbox {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .info_box .iconbox:after {
    display: none;
  }
  
  .info_box .txtbox {
    padding-left: 0;
  }
}

/* -------------------- 불릿 스타일 -------------------- */
.page_tit {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: var(--cre-text);
  padding-left: 15px;
  margin-bottom: 20px;
}

.page_tit:before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 5px;
  height: 5px;
  background: var(--cre-primary);
  border-radius: 50%;
}

p.chk {
  padding-left: 20px;
  background: url("../images/sub/bullet_check.png") no-repeat left center;
  background-size: 14px;
  color: #444;
  font-weight: 500;
  line-height: 1.6;
  margin: 10px 0;
}

/* -------------------- 스크롤 버튼 개선 -------------------- */
.scroll-btn {
  background-color: rgba(0, 75, 156, 0.8);
  transition: all 0.3s;
}

.scroll-btn:hover {
  background-color: var(--cre-primary);
  transform: translateY(-50%) scale(1.1);
}

/* -------------------- 검색 결과 없음 스타일 -------------------- */
.no-results {
  text-align: center;
  padding: 60px 20px;
}

.no-results h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--cre-text);
  margin-bottom: 30px;
}

.no-results h3 span {
  color: var(--cre-primary);
}

.no-results .suggestions {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 650px;
}

.no-results .suggestions h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--cre-text);
}

.no-results .suggestions ul {
  text-align: left;
}

.no-results .suggestions ul li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: #555;
}

.no-results .suggestions ul li:before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--cre-primary);
  font-weight: 700;
}

.no-results .search-tips {
  font-size: 14px;
  color: #666;
  margin-top: 20px;
}

.no-results .search-tips span {
  color: var(--cre-primary);
  font-weight: 600;
}

.no-results .btn-request {
  background: #dc3545 !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.no-results .btn-request:hover {
  background: #c82333 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3) !important;
}

/* -------------------- 로딩 오버레이 -------------------- */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  display: none;
}

#div_ajax_load_image {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

