@charset "utf-8";

/* 접근성 숨김 텍스트 */
.sound_only,
#bo_v h2,
#bo_w h2 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

/* 상단 서브 비주얼 */
#port_bg {
  background: url('/img/port_bg.png') no-repeat center center / cover;
}

/* =========================================================
   1. 포트폴리오 목록 페이지 (.portfolio-page)
   ========================================================= */
.portfolio-page {
  background: #fff;
}

/* 카테고리 탭 메뉴 (#service-tab_wrap 과 동일) */
.portfolio-tabs {
  background: #f9f5f2;
  border-bottom: 1px solid #ddd;
}

.portfolio-tabs ul {
  display: flex;
  justify-content: center;
  gap: 72px;
  padding: 30px 0;
}

.portfolio-tabs li a {
  color: #333;
  padding-bottom: 25px;
  border-bottom: 2px solid transparent;
  font-size: 24px;
}

.portfolio-tabs li.on a,
.portfolio-tabs li.active a {
  color: #e16f38;
  border-color: #e16f38;
  font-weight: 600;
}

.mo-only {
  display: none;
}

/* 카테고리 소개 섹션 (원본 복원) */
.portfolio-intro {
  padding: 100px 0;
  background: #f9f9f9;
}

.portfolio-intro .intro-icon img {
  width: 80px;
}

.portfolio-intro .intro-icon {
  text-align: center;
  margin: 0 auto;
  margin-bottom: 20px;
}

.intro-text {
  overflow: hidden;
}

.intro-text:after {
  content: "";
  display: table;
  clear: both;
}

.portfolio-intro .intro-text h3 {
  font-size: 40px;
  margin-bottom: 10px;
  font-family: 'Pretendard Variable' !important;
  color: #ff7e3f;
  font-weight: 700;
  float: left;
  width: 25%;
  text-align: center;
}

.portfolio-intro .intro-text p {
  font-size: 18px;
  color: #333;
  float: right;
  line-height: 1.9;
  width: 70%;
  word-break: keep-all;
  font-family: 'Pretendard Variable' !important;
}

@media(max-width:1300px) {
  .portfolio-intro .intro-text h3 {
    font-size: 30px;
  }

  .portfolio-intro .intro-text p {
    font-size: 16px;
  }
}

@media(max-width:1000px) {
  .portfolio-intro .intro-text h3 {
    font-size: 26px;
    float: none;
    width: 100%;
    margin-bottom: 40px;
  }

  .portfolio-intro .intro-text p {
    font-size: 16px;
    float: none;
    line-height: 1.6;
    width: 100%;
    text-align: center;
  }

  .portfolio-intro {
    padding: 80px 0;
  }
}

/* 현장 사진 목록 섹션 */
.portfolio-list-section {
  padding: 70px 0 100px;
}

.portfolio-list-section>.wrap>h3 {
  font-size: 34px;
  margin-bottom: 40px;
  font-weight: 700;
  text-align: center;
  color: #111;
  position: relative;
}

.portfolio-list-section>.wrap>h3::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: #f37021;
  margin: 0 auto 14px auto;
  border-radius: 2px;
}

/* 관리자 & 글쓰기 상단 툴바 */
.portfolio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
}

.portfolio-toolbar .toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-chk-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.pf-chk-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f37021;
  cursor: pointer;
}

.portfolio-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-adm-btn {
  padding: 9px 15px;
  background: #fff;
  color: #444;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-adm-btn:hover {
  background: #f1f3f5;
  border-color: #adb5bd;
  color: #111;
}

.pf-adm-btn.pf-adm-del {
  color: #dc3545;
  border-color: #f1aeb5;
}

.pf-adm-btn.pf-adm-del:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.pf-btn-write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  background: #f37021;
  color: #fff !important;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.pf-btn-write:hover {
  background: #d95d12;
}

/* 카드 그리드 */
.portfolio-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #eee;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.gall_chk_badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.gall_chk_badge input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f37021;
  cursor: pointer;
}

.portfolio-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.portfolio-thumb-wrap {
  width: 100%;
  aspect-ratio: 10 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portfolio-item:hover img {
  transform: scale(1.04);
}

.item-title {
  background-color: #f37021;
  color: #fff;
  padding: 15px 16px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty_list {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: #777;
  font-size: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #ddd;
}

/* 페이징 */
.pg_wrap {
  margin: 48px auto 0 !important;
  text-align: center !important;
  display: block !important;
  float: none;
}

.pg {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.pg_page,
.pg_current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pg_page {
  background-color: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
}

.pg_page:hover {
  background-color: #f1f3f5;
}

.pg_start,
.pg_prev,
.pg_next,
.pg_end {
  text-indent: -999px;
  overflow: hidden;
  padding: 0;
  background-repeat: no-repeat;
  background-position: 50% 50%;
}

.pg_start {
  background-image: url('/img/btn_first.gif');
}

.pg_prev {
  background-image: url('/img/btn_prev.gif');
}

.pg_next {
  background-image: url('/img/btn_next.gif');
}

.pg_end {
  background-image: url('/img/btn_end.gif');
}

.pg_current {
  background: #f37021 !important;
  border: 1px solid #f37021;
  color: #fff;
}


/* =========================================================
   2. 포트폴리오 상세보기 페이지 (.portfolio-view-wrap)
   ========================================================= */
.portfolio-view-wrap {
  padding: 60px 0 100px;
  background: #f8f9fb;
}

.bo_v_card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  padding: 44px 48px;
}

.bo_v_header {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.bo_v_cate {
  display: inline-block;
  background: #fff3eb;
  color: #f37021;
  font-size: 13.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.bo_v_tit {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
  margin: 0 0 20px 0;
  word-break: keep-all;
}

.bo_v_meta_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bo_v_meta_left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: #666;
}

.bo_v_meta_left strong {
  color: #333;
  font-weight: 600;
  margin-right: 4px;
}

.meta_divider {
  color: #ddd;
}

.bo_v_meta_btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  background: #fff;
  color: #333 !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s;
}

.pf-v-btn:hover {
  background: #f1f3f5;
  border-color: #adb5bd;
}

.pf-v-btn-edit {
  border-color: #00538a;
  color: #00538a !important;
}

.pf-v-btn-edit:hover {
  background: #00538a;
  color: #fff !important;
}

.pf-v-btn-del {
  border-color: #f1aeb5;
  color: #dc3545 !important;
}

.pf-v-btn-del:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff !important;
}

.pf-v-btn-primary {
  background: #f37021;
  border-color: #f37021;
  color: #fff !important;
}

.pf-v-btn-primary:hover {
  background: #d95d12;
  border-color: #d95d12;
}

.pf-v-btn-large {
  padding: 12px 26px;
  font-size: 15px;
}

/* 본문 글 (위쪽) */
#bo_v_con {
  margin: 0 0 28px 0;
  width: 100%;
  font-size: 16.5px;
  color: #222;
  line-height: 1.85;
  word-break: keep-all;
  overflow: hidden;
}

#bo_v_con p {
  line-height: 1.85;
  margin-bottom: 12px;
}

#bo_v_con a {
  color: #00538a;
  text-decoration: underline;
}

#bo_v_con img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

/* 첨부 사진 (글 아래쪽) */
#bo_v_img {
  width: 100%;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#bo_v_img a.view_image {
  display: block;
}

#bo_v_img img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* 관련 링크 미리보기 카드 & 유튜브 임베드 */
.bo_v_link_previews {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bo_v_link_card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  border: 1px solid #e1e3e6;
  background: #fff;
  text-decoration: none !important;
  color: #222 !important;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bo_v_link_card:hover {
  border-color: #c5c9ce;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.bo_v_link_card .link_card_thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  background: #f4f4f4;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.bo_v_link_card .link_card_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bo_v_link_card .link_card_info {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bo_v_link_card .link_card_title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo_v_link_card .link_card_desc {
  font-size: 14px;
  color: #888;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo_v_link_card .link_card_url {
  font-size: 14px;
  color: #1aa049;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo_v_yt_embed {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid #e1e3e6;
  overflow: hidden;
}

.bo_v_yt_embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 일반 첨부파일 */
#bo_v_file {
  margin-top: 28px;
  padding: 18px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

#bo_v_file h4 {
  font-size: 14px;
  font-weight: 700;
  color: #444;
  margin-bottom: 10px;
}

#bo_v_file ul li {
  padding: 6px 0;
  font-size: 14px;
}

#bo_v_file ul li a {
  color: #00538a;
  text-decoration: underline;
}

/* 이전글 / 다음글 */
.bo_v_nb {
  margin: 36px 0 28px;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.bo_v_nb li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 12px;
  border-bottom: 1px solid #f1f3f5;
  font-size: 14.5px;
}

.bo_v_nb li:last-child {
  border-bottom: none;
}

.bo_v_nb li:hover {
  background: #f8f9fa;
}

.bo_v_nb .nb_tit {
  font-weight: 700;
  color: #666;
  min-width: 56px;
}

.bo_v_nb li a {
  flex: 1;
  color: #222;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bo_v_nb .nb_date {
  color: #999;
  font-size: 13.5px;
}

.bo_v_bottom_btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}


/* =========================================================
   3. 포트폴리오 글쓰기/수정 페이지 (.portfolio-write-wrap)
   ========================================================= */
.portfolio-write-wrap {
  padding: 60px 0 100px;
  background: #f8f9fb;
}

.bo_w_card {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  padding: 44px 48px;
}

.bo_w_card_header {
  border-bottom: 2px solid #111;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.bo_w_card_header h3 {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.bo_w_card_header p {
  font-size: 14.5px;
  color: #666;
}

.pf-form-group {
  margin-bottom: 24px;
}

.pf-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pf-form-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}

.pf-form-label .req {
  color: #f37021;
}

.pf-form-label small {
  font-weight: 400;
  color: #777;
  font-size: 13px;
  margin-left: 6px;
}

.pf-form-input,
.pf-form-select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #ced4da !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 15px;
  color: #222;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pf-form-input:focus,
.pf-form-select:focus {
  border-color: #f37021 !important;
  box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.12);
}

.pf-opt-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.pf-opt-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.pf-opt-chk input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #f37021;
}

.wr_content textarea {
  width: 100% !important;
  min-height: 260px;
  padding: 14px !important;
  border: 1px solid #ced4da !important;
  border-radius: 8px !important;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
}

.pf-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pf-link-badge {
  flex: 0 0 70px;
  height: 46px;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #495057;
}

.pf-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.pf-btn-add-file {
  padding: 9px 16px;
  background: #00538a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.pf-btn-add-file:hover {
  background: #003d66;
}

.pf-file-row {
  padding: 14px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 10px;
}

.pf-file-input-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-file-num {
  flex: 0 0 68px;
  font-size: 13.5px;
  font-weight: 700;
  color: #00538a;
}

.pf-file-input {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.pf-file-desc {
  margin-top: 10px;
  height: 40px;
  font-size: 14px;
}

.pf-file-del {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: #dc3545;
  cursor: pointer;
}

.pf-file-del input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #dc3545;
}

.pf-form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.pf-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 48px;
  padding: 0 24px;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #495057 !important;
  text-decoration: none;
  transition: all 0.2s;
}

.pf-btn-cancel:hover {
  background: #f1f3f5;
}

.pf-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  padding: 0 28px;
  background: #f37021 !important;
  border: 1px solid #f37021 !important;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.2s;
}

.pf-btn-submit:hover {
  background: #d95d12 !important;
}


/* =========================================================
   4. 반응형 (태블릿 / 모바일)
   ========================================================= */
@media (max-width: 1000px) {
  .pc-only {
    display: none !important;
  }

  .mo-only {
    display: block;
  }

  .portfolio-tabs ul {
    gap: 40px;
  }

  .portfolio-tabs li a {
    font-size: 18px;
  }

  .portfolio-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .portfolio-list-section {
    padding: 44px 0 70px;
  }

  .portfolio-list-section>.wrap>h3 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .portfolio-toolbar {
    padding: 12px;
  }

  .portfolio-toolbar .toolbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .portfolio-view-wrap,
  .portfolio-write-wrap {
    padding: 32px 0 70px;
  }

  .bo_v_card,
  .bo_w_card {
    padding: 24px 18px;
    border-radius: 12px;
  }

  .bo_v_tit {
    font-size: 21px;
  }

  .bo_v_meta_bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .bo_v_meta_btns {
    width: 100%;
    justify-content: flex-end;
  }

  #bo_v_con {
    font-size: 15px;
  }

  .bo_v_link_card .link_card_thumb {
    max-height: none;
  }

  .bo_v_link_card .link_card_info {
    padding: 15px 16px;
  }

  .bo_v_link_card .link_card_title {
    font-size: 15px;
  }

  .bo_v_link_card .link_card_desc,
  .bo_v_link_card .link_card_url {
    font-size: 13.5px;
  }

  .pf-form-row {
    grid-template-columns: 1fr;
  }

  .pf-file-input-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .pf-file-num {
    flex: none;
  }

  .pf-form-actions {
    flex-direction: row;
  }

  .pf-btn-cancel,
  .pf-btn-submit {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .portfolio-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .item-title {
    font-size: 15px;
    padding: 13px 14px;
  }
}