/* 관리자 기능·동적 게시판용 최소 추가 스타일 (기존 사이트 디자인은 그대로, 여기선 추가분만) */

/* 관리자 버튼 (기존 .btn_bo_user 스타일 재사용) */
.btn_bo_user.app-admin { float: right; }
.btn_bo_user.app-admin li.board-write-btn a { padding: 0 14px; cursor: pointer; }
.btn_bo_user.app-admin li.board-write-btn a.app-danger { color: #d33; border-color: #e5a0a0; }
#bo_v_top .btn_bo_user li.board-write-btn { margin-left: 5px; }
#bo_v_top .btn_bo_user li.board-write-btn a { padding: 0 12px; cursor: pointer; }
#bo_v_top .btn_bo_user li.board-write-btn a.app-danger { color: #d33; border-color: #e5a0a0; }

/* 글쓰기/수정 폼 */
#bo_w { width: 100%; }
#bo_w .inner { padding-top: 30px; }
#bo_w .bo_w_title { font-size: 1.6em; font-weight: 600; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid #656565; }
.app-form .write_div { margin: 0 0 14px; }
.app-form .write_div > label { display: block; font-weight: 600; margin-bottom: 6px; color: #141414; }
.app-form .frm_input, .app-form select.frm_input { width: 100%; height: 42px; box-sizing: border-box; font-size: 15px; }
.app-form textarea.frm_input { width: 100%; height: 280px; padding: 10px; line-height: 1.6; resize: vertical; }
.app-form textarea.frm_input.short { height: 120px; }
.app-form .frm_info { display: block; font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5; }
.app-form .chk_box { display: flex; align-items: center; gap: 8px; }
.app-form .btn_confirm { margin-top: 20px; text-align: center; }
.app-form .btn_confirm .btn { height: 42px; line-height: 42px; padding: 0 28px; font-size: 15px; margin: 0 4px; border-radius: 3px; }
.app-form .btn_confirm .btn_cancel { display: inline-block; }
.app-form .btn_submit:disabled { opacity: .6; cursor: not-allowed; }
.app-msg { display: block; margin: 0 0 14px; padding: 10px 14px; border-radius: 4px; font-size: 14px; background: #fff1f1; color: #a11; border: 1px solid #f3c2c2; }
.app-msg.info { background: #eef6ff; color: #124; border-color: #cfe3fb; }
.app-progress { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.app-progress > i { display: block; height: 100%; width: 0; background: #3a8afd; transition: width .2s; }
.app-filelist { font-size: 13px; color: #666; margin-top: 6px; line-height: 1.6; }

/* 게시판 상단 배너: 시공현장(board_3) / 관련뉴스(board_1, 기존 사업소개 다리 야경) */
.sub_banner.board_banner.board_3 { background-image: url(../theme/home/img/board/gallery-banner.jpg?v=20261007d); }
.sub_banner.board_banner.board_1 { background-image: url(../theme/home/img/business/bridge-336475_1920_1.jpg); }
/* 사업소개·연구·기술자료 상단 배너: 댐 사진 */
.sub_banner.business, .sub_banner.board_banner.board_research { background-image: url(../theme/home/img/business/business-banner.jpg?v=20261007); }

/* 갤러리 목록: 썸네일 4:3 통일 (사진·동영상 섞여도 카드 높이 동일) */
#bo_gall .gall_img a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f4f6; }
#bo_gall .gall_img a img, #bo_gall .gall_img a video { width: 100%; height: 100% !important; object-fit: cover; display: block; border: 0; }
/* 갤러리 목록 제목: 두 줄까지 보이고 넘치면 … (카드 높이는 두 줄 기준으로 통일) */
#bo_gall .gall_text_href a .gall-tit { -webkit-line-clamp: 2; line-clamp: 2; max-height: none; height: 60px; }
#bo_gall .gall_img a .no_image { display: block; width: 100%; height: 100%; line-height: 1; padding-top: 42%; box-sizing: border-box; }

/* 갤러리 상세: 사진·동영상 나열 */
#bo_v_con .app-media { margin: 0 0 24px; }
#bo_v_con .app-media img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
#bo_v_con .app-media video { display: block; width: 100%; max-height: 80vh; background: #000; }
#bo_v_con .app-media .app-embed { position: relative; padding-top: 56.25%; background: #000; }
#bo_v_con .app-media .app-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#bo_v_con .app-media .app-caption { margin: 8px 0 0; font-size: 14px; color: #555; text-align: center; }
#bo_v_con .app-media .app-link { display: block; padding: 14px 16px; border: 1px solid #e5e7eb; background: #fafafa; color: #141414; text-decoration: none; word-break: break-all; }
#bo_v_con .app-media .app-link i { color: #3a8afd; margin-right: 6px; }
#bo_v_con .app-body { margin: 0 0 24px; }
/* 게시물 상세: 제목 ↔ 밑줄 ↔ 본문 간격 (작성자·조회수 줄을 없앤 뒤 밑줄이 제목에 붙지 않게) */
#bo_v #bo_v_title .bo_v_tit { line-height: 1.4; }
#bo_v #bo_v_info { padding-top: 20px; margin-bottom: 36px; border-bottom-color: #e5e7eb; }
/* 게시물 상세: 목록 버튼을 본문 아래 가운데에 */
#bo_v_atc + #bo_v_top { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e5e7eb; text-align: center; }
#bo_v_atc + #bo_v_top .bo_v_com { float: none; display: inline-block; margin: 0; }
#bo_v_atc + #bo_v_top .bo_v_com > li { margin: 0; }
/* 시공현장 목록: 동영상 재생 표시, 대표(고정) 게시물 표시 */
#bo_gall .gall_img a { position: relative; }
#bo_gall .gall_img span.app-play, #bo_v_con .app-yt-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0,0,0,.55); pointer-events: none; }
#bo_gall .gall_img span.app-play::after, #bo_v_con .app-yt-play::after { content: ''; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
/* 스킨의 '#bo_gall .gall_img span'(회색 배경·높이 200px) 규칙을 이기도록 span 까지 지정 */
#bo_gall .gall_img span.app-pin-badge { position: absolute; left: 10px; top: 10px; display: inline-block; padding: 2px 10px; border-radius: 4px; background: #f59e0b; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.6; text-transform: none; }
#bo_gall .gall_img span.app-play { display: block; line-height: normal; }
/* 게시물 상세: 유튜브 썸네일 → 누르면 사이트 안에서 재생 */
#bo_v_con .app-embed .app-yt { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
#bo_v_con .app-embed .app-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
#bo_v_con .app-embed .app-yt-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(220,0,0,.9); }
#bo_v_con .app-embed .app-yt-play::after { left: 28px; top: 22px; border-width: 14px 0 14px 23px; }
#bo_v_con .app-embed .app-yt:hover .app-yt-play { background: #f00; }

/* 기사 미리보기 카드: 큰 이미지 + 사이트 + 제목 + 요약 + 원문 보기 */
#bo_v_con .app-linkcard { display: block; max-width: 860px; margin: 0 auto; border: 1px solid #dde3ea; border-radius: 10px; background: #fff; color: #141414; text-decoration: none; overflow: hidden; box-shadow: 0 2px 10px rgba(16,40,80,.06); transition: box-shadow .2s, transform .2s; }
#bo_v_con .app-linkcard:hover { box-shadow: 0 8px 24px rgba(16,40,80,.12); transform: translateY(-2px); }
#bo_v_con .app-linkcard-img { display: block; aspect-ratio: 16 / 9; background: #eef2f6; overflow: hidden; border-bottom: 1px solid #e5e9ef; }
#bo_v_con .app-linkcard-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
#bo_v_con .app-linkcard-text { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px 20px; }
#bo_v_con .app-linkcard-text em { font-style: normal; font-size: 13px; color: #6b7685; }
#bo_v_con .app-linkcard-text em i { color: #3a8afd; margin-right: 4px; }
#bo_v_con .app-linkcard-text b { font-size: 19px; font-weight: 700; line-height: 1.45; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#bo_v_con .app-linkcard-desc { font-size: 15px; line-height: 1.65; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#bo_v_con .app-linkcard-more { align-self: flex-start; margin-top: 4px; padding: 7px 14px; border-radius: 6px; background: #1f5fd6; color: #fff; font-size: 14px; font-weight: 600; }
#bo_v_con .app-linkcard:hover .app-linkcard-more { background: #184eb3; }
/* PDF 바로 보기 */
#bo_v_con .app-pdf-pages img { display: block; width: 100%; height: auto; margin: 0 0 12px; border: 1px solid #e5e7eb; background: #fff; }
#bo_v_con .app-pdf-loading { margin: 0; padding: 40px 0; text-align: center; color: #888; font-size: 14px; background: #f7f7f7; border: 1px solid #eee; }
#bo_v_con .app-pdf iframe { display: block; width: 100%; height: 80vh; max-height: 900px; border: 1px solid #e5e7eb; background: #f3f4f6; }
#bo_v_con .app-pdf .app-pdf-open { display: inline-block; margin-top: 8px; font-size: 14px; color: #141414; text-decoration: none; }
#bo_v_con .app-pdf .app-pdf-open i { color: #d33; margin-right: 6px; }
#bo_v_con .app-pdf .app-pdf-open:hover { text-decoration: underline; }
@media (max-width: 600px) {
  #bo_v_con .app-linkcard-text { padding: 14px 16px 16px; }
  #bo_v_con .app-linkcard-text b { font-size: 17px; }
  #bo_v_con .app-pdf iframe { height: 70vh; }
}

/* 갤러리 상세: 첨부파일 목록 */
#bo_v_con .app-attach-wrap { margin: 24px 0 0; border-top: 1px solid #e5e7eb; padding-top: 14px; }
#bo_v_con .app-attach-wrap h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: #141414; }
#bo_v_con .app-attach-wrap ul { list-style: none; margin: 0; padding: 0; }
#bo_v_con .app-attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #eee; margin-bottom: 6px; background: #fafafa; }
#bo_v_con .app-attach a:first-child { color: #141414; text-decoration: none; flex: 1; word-break: break-all; }
#bo_v_con .app-attach a:first-child i { color: #3a8afd; margin-right: 6px; }
#bo_v_con .app-attach a:first-child:hover { text-decoration: underline; }
#bo_v_con .app-attach .app-attach-size { color: #888; font-size: 12px; white-space: nowrap; }
#bo_v_con .app-attach .app-attach-cap { color: #666; }

/* 인증서: 카드 높이 통일(미리보기 영역 고정) + PDF 미리보기 + 관리자 버튼 */
.partner_type1 .partner_list ul li.cert-item { position: relative; padding: 0 0 10px; }
.partner_type1 .partner_list ul li.cert-item .cert-media { position: relative; display: block; width: 100%; height: 460px; background: #f3f4f6; overflow: hidden; }
.partner_type1 .partner_list ul li.cert-item .cert-media img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; padding: 0; }
.partner_type1 .partner_list ul li.cert-item .cert-media iframe.cert-pdf { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.partner_type1 .partner_list ul li.cert-item .cert-media a.cert-open { position: absolute; inset: 0; z-index: 2; }
.partner_type1 .partner_list ul li.cert-item .cert-text { min-height: 74px; }
.partner_type1 .partner_list ul li.cert-item .cert-title { margin: 10px 8px 0; font-weight: 600; color: #141414; font-size: 15px; }
.partner_type1 .partner_list ul li.cert-item .cert-desc { margin: 4px 8px 0; font-size: 13px; color: #666; white-space: pre-line; }
.partner_type1 .partner_list ul li.cert-item .cert-links { margin: 6px 8px 0; font-size: 12px; }
.partner_type1 .partner_list ul li.cert-item .cert-links a { color: #3a8afd; margin-right: 10px; }
.partner_type1 .partner_list ul li.cert-item .cert-admin { position: absolute; top: 8px; right: 8px; z-index: 5; display: flex; gap: 4px; }
.partner_type1 .partner_list ul li.cert-item .cert-admin a { background: #fff; border: 1px solid #737373; font-size: 12px; line-height: 26px; padding: 0 10px; color: #141414; cursor: pointer; text-decoration: none; }
.partner_type1 .partner_list ul li.cert-item .cert-admin a.app-danger { color: #d33; border-color: #e5a0a0; }
#cert-toolbar { max-width: 1100px; margin: 0 auto; text-align: right; padding: 0 0 10px; }
#cert-toolbar a { display: inline-block; border: 1px solid #737373; line-height: 32px; padding: 0 14px; font-size: 14px; color: #141414; text-decoration: none; cursor: pointer; }
#cert-form-wrap { max-width: 1100px; margin: 0 auto 40px; padding: 0 16px; }
#cert-form-wrap .bo_w_title { font-size: 1.4em; font-weight: 600; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #656565; }

/* 토스트 */
#toast-box { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 10000; }
.toast { background: #222; color: #fff; padding: 10px 16px; border-radius: 6px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.2); transition: opacity .3s; }
.toast-error { background: #b3261e; }
.toast-success { background: #1b7f3b; }
.toast.hide { opacity: 0; }

@media (max-width: 768px) {
  .partner_type1 .partner_list ul li.cert-item .cert-media { height: 360px; }
  .app-form textarea.frm_input { height: 200px; }
}
