@charset "utf-8";

/* =========================================================
   서브 페이지 공통 컨테이너 (#sh_content / .pagecommon)
   ========================================================= */
#sh_content {
  width: 100%;
  max-width: var(--container-width);
  min-height: 580px;
  margin: 0 auto;
  padding: 90px 95px 110px;
}

.pagecommon {
  margin: 0 auto;
  font-size: 15px;
  color: #777777;
  letter-spacing: -0.3px;
  line-height: 1.8;
  word-break: keep-all;
}

.pagecommon .cont_area {
  margin-bottom: 50px;
}

.pagecommon .br {
  white-space: pre-line;
}

.pagecommon .e_tit {
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font-en);
  color: #181b20;
  letter-spacing: 0;
}

.pagecommon .k_tit {
  margin: 20px 0 60px;
  font-size: 30px;
  font-weight: 300;
  line-height: 40px;
  color: #222222;
}

.pagecommon .k_tit span {
  font-weight: 700;
}

.pagecommon .txt_area span {
  color: #222222;
  text-decoration: underline;
  font-weight: 500;
}

.category-panel {
  display: none;
}

.category-panel.is-active {
  display: block;
}

/* =========================================================
   1. 인사말 (#p6) - page6.php 동일 구조
   ========================================================= */
#p6 .head_row {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  padding-left: 8%;
  margin-bottom: 45px;
}

#p6 .head_row .k_tit {
  margin: 0;
}

#p6 .img_wrap {
  position: relative;
  z-index: 1;
}

#p6 .img_wrap img {
  width: 800px;
  max-width: 100%;
}

#p6 .img_wrap .box {
  width: 690px;
  max-width: 85%;
  height: 270px;
  margin-left: auto;
  margin-top: -235px;
  position: relative;
  z-index: -1;
  background: #262626;
}

#p6 .img_wrap .box::before {
  content: "";
  position: absolute;
  top: 80px;
  right: 110px;
  width: 60px;
  height: 1px;
  background: #464646;
}

#p6 .img_wrap .box p {
  position: absolute;
  top: 110px;
  right: 65px;
  width: 165px;
  text-align: center;
  color: #ffffff;
  font-weight: 600;
  font-family: var(--font-en);
  font-size: 14px;
  line-height: 1.6;
}

#p6 .txt_area {
  position: relative;
  width: 86%;
  margin: 20px auto 0;
  padding: 54px 40px 20px;
  font-size: 15px;
  text-align: center;
}

#p6 .txt_area .sign {
  margin-top: 28px;
  color: #222222;
  font-weight: 600;
}

/* =========================================================
   2. 회사연혁 (#p36) - page36.php 동일 구조 (컷아웃 이미지 연동)
   ========================================================= */
#p36 .cont_area {
  margin-bottom: 80px;
}

#p36 .cont_area > img {
  width: 100%;
  height: auto;
}

#p36 .txt_wrap {
  margin-top: -55px;
  padding-left: 5%;
  position: relative;
  z-index: 2;
}

#p36 .history {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 5%;
}

#p36 .history dl {
  padding: 50px 24px 50px 0;
  border-top: 1px solid #e1e1e1;
  overflow: hidden;
}

#p36 .history dl:nth-child(1),
#p36 .history dl:nth-child(2) {
  padding-top: 0;
  border-top: none;
}

#p36 .history dl dt {
  float: left;
  padding: 30px 28px;
  border: 1px solid #dddddd;
  font-weight: 700;
  font-size: 18px;
  font-family: var(--font-en);
  color: #181b20;
  line-height: 1;
}

#p36 .history dl dt.bg {
  background: #f7f7f7;
}

#p36 .history dl dd:first-of-type {
  padding-top: 24px;
}

#p36 .history dl dd {
  padding-left: 132px;
  color: #666666;
}

#p36 .history dl dd + dd {
  margin-top: 6px;
}

#p36 .history dl dd span {
  margin-right: 10px;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-en);
  color: #222222;
}

/* =========================================================
   3. 조직도 (#p0103) - 데스크톱 도식 + 모바일 반응형 카드 자동 전환
   ========================================================= */
.org_scroll {
  overflow-x: auto;
}

#p0103 {
  position: relative;
  width: 818px;
  margin: 0 auto 60px;
  min-height: 450px;
  background: url('../images/sub/org-bg.png') 30px 43px no-repeat;
  font-weight: 700;
}

#p0103 li {
  position: absolute;
  text-align: center;
  padding: 15px 0;
  width: 123px;
  height: 54px;
  line-height: 22px;
}

#p0103 .ceo { top: 20px; left: 338px; width: 144px; background: #181b20; font-size: 17px; color: #fff; }
#p0103 .b_1 { top: 96px; left: 185px; background: #fff; font-size: 14.5px; color: #181b20; border: 1px solid #181b20; }
#p0103 .b_2 { top: 123px; left: 508px; background: #fff; font-size: 14.5px; color: #181b20; border: 1px solid #181b20; }
#p0103 .b_3 { top: 160px; left: 145px; background: #fff; font-size: 14.5px; color: #181b20; border: 1px solid #181b20; }
#p0103 .b_4 { top: 273px; left: 163px; background: #353b46; font-size: 14.5px; color: #fff; border: 1px solid #353b46; }
#p0103 .b_5 { top: 273px; left: 346px; background: #353b46; font-size: 14.5px; color: #fff; border: 1px solid #353b46; }
#p0103 .b_6 { top: 273px; left: 523px; background: #353b46; font-size: 14.5px; color: #fff; border: 1px solid #353b46; }
#p0103 .b_7 { top: 360px; left: 87px; background: #7b7b7b; font-size: 14px; color: #fff; border: 1px solid #6c6c6c; }
#p0103 .b_8 { top: 360px; left: 258px; background: #7b7b7b; font-size: 14px; color: #fff; border: 1px solid #6c6c6c; }
#p0103 .b_9 { top: 360px; left: 430px; background: #7b7b7b; font-size: 14px; color: #fff; border: 1px solid #6c6c6c; }
#p0103 .b_10 { top: 360px; left: 601px; background: #7b7b7b; font-size: 14px; color: #fff; border: 1px solid #6c6c6c; }

/* =========================================================
   4. 오시는길 (#sh_map_v)
   ========================================================= */
#sh_map_v .tit_area {
  margin-bottom: 30px;
}

#sh_map_v .tit_area span {
  display: block;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #181b20;
  margin-bottom: 8px;
}

#sh_map_v .tit_area p {
  font-size: 20px;
  font-weight: 600;
  color: #222222;
  word-break: keep-all;
}

#sh_map_v .map_canvas {
  position: relative;
  width: 100%;
  height: 460px;
  background: #f2f1ed;
  border: 1px solid #dddddd;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sh_map_v .map_info_tbl {
  width: 100%;
  border-top: 2px solid #181b20;
  margin-top: 36px;
  border-collapse: collapse;
}

#sh_map_v .map_info_tbl th,
#sh_map_v .map_info_tbl td {
  padding: 18px 20px;
  border-bottom: 1px solid #e1e1e1;
  text-align: left;
  font-size: 15px;
  word-break: keep-all;
}

#sh_map_v .map_info_tbl th {
  width: 160px;
  color: #181b20;
  font-weight: 600;
  background: #fafafa;
}

/* =========================================================
   5. 사업분야 (.business)
   ========================================================= */
.business .tit_wrap {
  max-width: 815px;
  margin: 0 auto 45px;
}

.business .tit_wrap .k_tit {
  margin: 20px 0 28px;
}

.business .img_wrap {
  position: relative;
}

.business .img_wrap img {
  width: 100%;
  height: auto;
}

.business .img_wrap .box {
  position: absolute;
  top: 0;
  right: 0;
  width: 360px;
  height: 100%;
  padding: 150px 40px 0 60px;
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font-en);
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.72);
}

.business .img_wrap .box p {
  position: relative;
  padding: 26px 0 14px;
  font-weight: 600;
  font-size: 17px;
  color: #ffffff;
}

.business .img_wrap .box p::after {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 50px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.business .grh {
  position: relative;
  z-index: 2;
  max-width: 910px;
  margin: -65px auto 0;
  padding: 48px 44px;
  background: #ffffff;
}

.business .grh ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.business .grh ul li {
  width: 170px;
  height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #16191d;
  border-radius: 50%;
  text-align: center;
}

.business .grh ul li + li {
  margin-left: -10px;
}

.business .grh ul li span {
  font-weight: 600;
  font-size: 12px;
  font-family: var(--font-en);
  color: #aaaaaa;
}

.business .grh ul li p {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #222222;
}

.business .grh ul li:last-child {
  width: 195px;
  height: 195px;
  margin-left: 16px;
  border: none;
  background: #16191d;
}

.business .grh ul li:last-child span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.business .grh ul li:last-child p {
  font-size: 19px;
  font-weight: 500;
  color: #ffffff;
}

.business .txt_area_card {
  position: relative;
  z-index: 2;
  max-width: 890px;
  margin: -60px auto 0;
  padding: 45px;
  background: #ffffff;
}

.business .txt_area_plain {
  max-width: 815px;
  margin: 0 auto;
}

/* =========================================================
   6. 포트폴리오 갤러리 & 시공갤러리 Before/After 비교 슬라이더
   ========================================================= */
.board_top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.board_search {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cccccc;
  height: 40px;
}

.board_search select {
  height: 100%;
  padding: 0 12px;
  border-right: 1px solid #cccccc;
  font-size: 14px;
  color: #444444;
}

.board_search input {
  width: 200px;
  padding: 0 12px;
  font-size: 14px;
}

.board_search button {
  padding: 0 16px;
  height: 100%;
  background: #181b20;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.pf_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
}

.pf_item .gall_img {
  overflow: hidden;
  border: 1px solid #eeeeee;
}

.pf_item .gall_img img {
  width: 100%;
  aspect-ratio: 375 / 300;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.pf_item:hover .gall_img img {
  transform: scale(1.06);
}

.pf_item .gall_txt {
  padding: 16px 4px 0;
}

.pf_item .gall_txt .tit {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #222222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 시공갤러리 Before / After 리스트 (모바일 터치 드래그 대응 touch-action: none) */
.ba_list {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.ba_row {
  display: flex;
  gap: 42px;
  align-items: center;
  padding-bottom: 44px;
  border-bottom: 1px solid #e5e5e5;
}

.ba_compare {
  position: relative;
  width: 580px;
  max-width: 54%;
  height: 350px;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}

.ba_compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba_compare .ba_before_wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

.ba_compare .ba_handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.ba_compare .ba_handle::after {
  content: "◀ ▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
}

.ba_compare .ba_tag {
  position: absolute;
  top: 14px;
  z-index: 4;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
}

.ba_compare .ba_tag.before { left: 14px; }
.ba_compare .ba_tag.after { right: 14px; }

.ba_txt {
  flex: 1;
}

.ba_txt .bo_tit {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  color: #181b20;
  margin-bottom: 20px;
}

.ba_txt .bf_tit {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  color: #181b20;
  margin-bottom: 4px;
}

.ba_txt .bf_tit.st {
  margin-top: 16px;
}

.ba_txt .caption {
  font-size: 14.5px;
  color: #666666;
  word-break: keep-all;
}

.ba_txt .more_view {
  display: inline-block;
  margin-top: 26px;
  padding: 9px 26px;
  border: 1px solid #181b20;
  font-size: 14px;
  font-weight: 600;
  color: #181b20;
  transition: all 0.25s ease;
}

.ba_txt .more_view:hover {
  background: #181b20;
  color: #ffffff;
}

/* =========================================================
   7. 게시판 테이블 & 온라인 견적/문의 작성 폼 공통
   ========================================================= */
.sh_tbl_common {
  width: 100%;
  border-top: 2px solid #181b20;
  overflow-x: auto;
}

.sh_tbl_common table {
  width: 100%;
  border-collapse: collapse;
}

.sh_tbl_common th,
.sh_tbl_common td {
  padding: 18px 14px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 15px;
  text-align: center;
}

.sh_tbl_common th {
  background: #fafafa;
  color: #222222;
  font-weight: 600;
  white-space: nowrap;
}

.sh_tbl_common td.subject {
  text-align: left;
  color: #222222;
  font-weight: 500;
  word-break: keep-all;
}

.sh_tbl_common .badge {
  display: inline-block;
  min-width: 58px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  white-space: nowrap;
}

.sh_tbl_common .badge.done { background: #181b20; color: #ffffff; }
.sh_tbl_common .badge.ing { background: #8c7a6b; color: #ffffff; }
.sh_tbl_common .badge.contract { background: #f0f0ee; color: #222222; border: 1px solid #cccccc; }

.empty_list_box {
  padding: 90px 20px;
  border-top: 2px solid #181b20;
  border-bottom: 1px solid #e1e1e1;
  text-align: center;
  color: #888888;
}

.write_form_tbl {
  width: 100%;
  border-top: 2px solid #181b20;
  border-collapse: collapse;
}

.write_form_tbl th,
.write_form_tbl td {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  font-size: 15px;
}

.write_form_tbl th {
  width: 170px;
  background: #fafafa;
  color: #222222;
  font-weight: 600;
}

.write_form_tbl input[type="text"],
.write_form_tbl input[type="tel"],
.write_form_tbl input[type="email"],
.write_form_tbl select,
.write_form_tbl textarea {
  width: 100%;
  max-width: 480px;
  padding: 10px 14px;
  border: 1px solid #d5d5d5;
  background: #ffffff;
  color: #222222;
  font-size: 16px;
}

.write_form_tbl textarea {
  max-width: 100%;
  height: 170px;
  resize: vertical;
}

.write_submit_area {
  margin-top: 36px;
  text-align: center;
}

.write_submit_area button {
  min-width: 200px;
  height: 54px;
  background: #181b20;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

/* =========================================================
   SUBPAGE TABLET & MOBILE RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  #sh_content { padding: 48px 20px 72px; min-height: 420px; }
  .pagecommon .k_tit { font-size: 24px; line-height: 1.4; margin: 14px 0 36px; }

  /* 인사말 */
  #p6 .head_row { flex-direction: column; gap: 10px; padding-left: 0; margin-bottom: 28px; }
  #p6 .img_wrap .box { display: none; }
  #p6 .txt_area { width: 100%; padding: 28px 4px 10px; text-align: left; font-size: 14.5px; }
  #p6 .txt_area br { display: none; }
  #p6 .txt_area .sign { margin-top: 22px; }

  /* 회사연혁 */
  #p36 .txt_wrap { margin-top: 24px; padding-left: 0; }
  #p36 .history { grid-template-columns: 1fr; margin: 0; }
  #p36 .history dl { padding: 32px 0; }
  #p36 .history dl:nth-child(2) { padding-top: 32px; border-top: 1px solid #e1e1e1; }

  /* 조직도 모바일 반응형 그리드 카드 전환 (가로 스크롤 제거) */
  .org_scroll { overflow-x: visible; }
  #p0103 {
    width: 100%;
    min-height: auto;
    background: none;
    margin-bottom: 24px;
  }
  #p0103 ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #p0103 li {
    position: static !important;
    width: 100% !important;
    height: auto;
    padding: 14px 10px;
    font-size: 14px;
  }
  #p0103 .ceo {
    grid-column: 1 / -1;
    font-size: 16px;
    padding: 16px;
  }
  #p0103 .b_3 {
    grid-column: 1 / -1;
  }

  /* 사업분야 */
  .business .img_wrap .box { position: static; width: 100%; padding: 28px 24px; }
  .business .grh { margin-top: 0; padding: 32px 12px; }
  .business .grh ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .business .grh ul li,
  .business .grh ul li:last-child {
    width: 100%;
    max-width: 160px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    padding: 12px;
  }
  .business .grh ul li p,
  .business .grh ul li:last-child p {
    font-size: 15px;
  }
  .business .txt_area_card { margin-top: 0; padding: 28px 4px 0; }

  /* 포트폴리오 & 시공갤러리 */
  .pf_grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .ba_row { flex-direction: column; align-items: stretch; gap: 22px; padding-bottom: 36px; }
  .ba_compare { width: 100%; max-width: 100%; height: 250px; }
  .ba_txt .bo_tit { font-size: 19px; margin-bottom: 14px; }
}

@media (max-width: 640px) {
  /* 회사연혁 연도 박스 세로 정렬 */
  #p36 .history dl {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px 0;
  }
  #p36 .history dl dt {
    float: none;
    align-self: flex-start;
    padding: 12px 20px;
    font-size: 16px;
    margin-bottom: 6px;
  }
  #p36 .history dl dd,
  #p36 .history dl dd:first-of-type {
    padding-left: 2px;
    padding-top: 0;
    font-size: 14.5px;
  }
  #p36 .history dl dd br {
    display: none;
  }

  /* 오시는길 & 작성 폼 세로 스택 */
  #sh_map_v .tit_area p { font-size: 17px; }
  #sh_map_v .map_canvas { height: 240px; }
  #sh_map_v .map_info_tbl tr,
  .write_form_tbl tr {
    display: block;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
  }
  #sh_map_v .map_info_tbl th,
  #sh_map_v .map_info_tbl td,
  .write_form_tbl th,
  .write_form_tbl td {
    display: block;
    width: 100%;
    border-bottom: none;
    padding: 4px 8px;
  }
  #sh_map_v .map_info_tbl th,
  .write_form_tbl th {
    background: transparent;
    font-size: 13.5px;
    color: #555555;
  }
  .write_submit_area button {
    width: 100%;
  }

  /* 포트폴리오 1열 & 게시판 검색바/테이블 압축 */
  .pf_grid { grid-template-columns: 1fr; gap: 26px; }
  .board_search { width: 100%; }
  .board_search input { flex: 1; width: auto; min-width: 0; font-size: 15px; }
  .sh_tbl_common th,
  .sh_tbl_common td {
    padding: 13px 8px;
    font-size: 13.5px;
  }
  .sh_tbl_common th:first-child,
  .sh_tbl_common td:first-child {
    display: none;
  }
}
