@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* [1] 기본 초기화 및 폰트 설정 */
:root { 
    --primary-color: #000; 
    --dark-gray: #333; 
    --light-gray: #f8f9fa; 
    --accent-blue: #2563eb;
}

/* 폰트 고정 해제: 폰트 아이콘 라이브러리가 있다면 정상 작동하도록 폰트 패밀리 순서 조정 */
body, input, textarea, select, button { 
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    letter-spacing: -0.02em; 
}

button { border: none; background: none; cursor: pointer; outline: none; }
a { text-decoration: none; color: inherit; }

/* [2] 게시판 리스트 (카드 스타일) */
#sh_bo_gall { padding: 40px 0; max-width: 1200px; margin: 0 auto; clear: both; }
#sh_gall_ul { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 -12px; }
#sh_gall_ul::after { content: ""; display: block; clear: both; } /* float 해제 대응 */

.gall_li { width: 25%; padding: 0 12px; margin-bottom: 30px; box-sizing: border-box; }

.gall_box { 
    background: #fff; border-radius: 15px; overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: all 0.3s ease; 
    height: 100%; display: flex; flex-direction: column; position: relative; border: 1px solid #f1f1f1;
}
.gall_box:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(255, 86, 127, 0.15); border-color: var(--primary-color); }

.click_area { cursor: pointer; position: relative; z-index: 5; flex-grow: 1; }
.gall_img { position: relative; width: 100%; padding-bottom: 56.25%; overflow: hidden; background: #000; }
.gall_img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.gall_box:hover .gall_img img { transform: scale(1.1); opacity: 0.8; }

.gall_txt { padding: 20px; pointer-events: none; }
.gall_txt .tit strong { 
    font-size: 17px; color: #222; line-height: 1.5; font-weight: 700;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 3em;
}
.sermon_meta { margin-top: 12px; font-size: 13.5px; color: #666; }
.sermon_meta div { margin-bottom: 4px; display: flex; align-items: center; }
.sermon_meta strong { color: #999; width: 50px; font-weight: 400; font-size: 12px; }
.point_text { color: var(--primary-color) !important; font-weight: 600 !important; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f1f1; }

.gall_footer { padding: 10px 20px 15px; display: flex; justify-content: space-between; align-items: center; z-index: 10; position: relative; background: #fff; }
.admin_btns a { font-size: 12px; color: #bbb; margin-left: 10px; transition: 0.2s; }
.admin_btns a:hover { color: var(--primary-color); }

/* [3] 글쓰기 화면 */
#sh_bo_w { padding: 60px 0; max-width: 900px; margin: 0 auto; }
#sh_write_tbl { width: 100%; border-top: 3px solid var(--primary-color); border-collapse: collapse; background: #fff; }
#sh_write_tbl th { padding: 20px; background: #fff; border-bottom: 1px solid #eee; text-align: left; color: #333; font-size: 14px; font-weight: 700; width: 120px; }
#sh_write_tbl td { padding: 15px; border-bottom: 1px solid #eee; }
#sh_write_tbl .sh_input { width: 100%; height: 45px; border: 1px solid #ddd; padding: 0 15px; border-radius: 5px; box-sizing: border-box; font-size: 15px; }
#sh_write_tbl textarea { width: 100%; height: 300px; border: 1px solid #ddd; padding: 15px; border-radius: 5px; box-sizing: border-box; line-height: 1.6; font-size: 15px; }

.btn_submit { background: var(--primary-color); color: #fff; padding: 15px 50px; border-radius: 30px; font-size: 16px; font-weight: 700; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn_cancel { background: #eee; color: #666 !important; padding: 15px 40px; border-radius: 30px; font-size: 16px; margin-left: 10px; display: inline-block; }

/* [4] 비디오 팝업 */
#video_view { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 10001; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); padding: 20px; }
#video_view .inner { width: 100%; max-width: 850px; max-height: 90vh; background: #fff; border-radius: 20px; overflow: hidden; position: relative; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
#video_view .close { position: absolute; right: 20px; top: 20px; width: 35px; height: 35px; cursor: pointer; z-index: 10; background: #f8f9fa; border-radius: 50%; }
#video_view .close:before, #video_view .close:after { content: ""; position: absolute; top: 16px; left: 8px; width: 20px; height: 2px; background: #333; transform: rotate(45deg); }
#video_view .close:after { transform: rotate(-45deg); }

.video_container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; border-radius: 12px; margin-bottom: 25px; }
.video_container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
/* [6] 비디오 팝업 전용 스타일 (기존 스타일 유지, 추가분) */
#video_view { 
    position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 10001; 
    background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; 
    backdrop-filter: blur(5px); padding: 20px;
}
#video_view .inner { 
    width: 100%; max-width: 850px; max-height: 90vh; background: #fff; border-radius: 20px; 
    overflow: hidden; position: relative; display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); border: none; /* 기존 border 덮어쓰기 */
}

/* 새 디자인 버전의 닫기 버튼 */
#video_view .close { 
    position: absolute; right: 20px; top: 20px; width: 35px; height: 35px; 
    cursor: pointer; transition: 0.3s; z-index: 10; background: #f8f9fa; border-radius: 50%;
}
#video_view .close:before, #video_view .close:after { 
    content: ""; position: absolute; top: 16px; left: 8px; width: 20px; height: 2px; 
    background: #333; border-radius: 2px; transform: rotate(45deg); 
}
#video_view .close:after { transform: rotate(-45deg); }

/* 제목 및 정보 레이아웃 보강 */
#video_view .tit_area { padding: 30px 30px 20px; border-bottom: 1px solid #f1f1f1; flex-shrink: 0; }
#video_view .tit_area p { font-size: 22px; color: #111; font-weight: 700; margin: 0 0 15px 0; line-height: 1.4; padding-right: 40px; }

.view_info_wrap { display: flex; flex-wrap: wrap; gap: 10px 15px; }
.view_info_item { display: flex; align-items: center; font-size: 14px; color: #555; }
.view_info_item strong { 
    color: var(--primary-color); font-weight: 600; font-size: 11px; 
    background: rgba(255, 86, 127, 0.08); padding: 3px 10px; border-radius: 4px; margin-right: 8px;
    white-space: nowrap;
}


/* 본문 영역 보강 */
#video_view .scr_area { padding: 30px; overflow-y: auto; flex-grow: 1; }
#video_view .scr_area::-webkit-scrollbar { width: 6px; }
#video_view .scr_area::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

.view_content { font-size: 16px; line-height: 1.8; color: #444; word-break: break-all; margin-top: 0; }
.view_content img { max-width: 100% !important; height: auto !important; border-radius: 10px; margin: 10px 0; }


/* [5] 페이지네이션 및 하단 버튼 레이아웃 (겹침 해결) */
.sh_pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
    clear: both;
    width: 100%;
}

.sh_pagination a, 
.sh_pagination span,
.sh_pagination .pg_page,
.sh_pagination .pg_current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 5px;
    margin: 0 3px;
    border: 1px solid #eee;
    border-radius: 5px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    background: #fff;
}

.sh_pagination .pg_current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: bold;
}

/* 화살표 버튼 복구 (빈 네모 방지) */
.sh_pagination .pg_next, .sh_pagination .pg_prev, .sh_pagination .pg_start, .sh_pagination .pg_end {
    font-size: 0 !important; /* 기존 글자 숨김 */
    position: relative;
}

.sh_pagination .pg_next::after, .sh_pagination .pg_prev::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 2px solid #666;
    border-right: 2px solid #666;
    display: inline-block;
}
.sh_pagination .pg_next::after { transform: rotate(45deg); }
.sh_pagination .pg_prev::after { transform: rotate(-135deg); }

/* 하단 버튼 영역 */
.list_btn_wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    clear: both;
}

.list_btn_wrap .left_btns { display: flex; gap: 8px; }

.sh_adm_btn, .w_btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #d1d1d1;
    background: #fff;
    color: #333;
    transition: 0.2s;
    height: 40px;
    box-sizing: border-box;
}

.w_btn {
    background: var(--accent-blue);
    color: #fff !important;
    border-color: var(--accent-blue);
    font-weight: bold;
    padding: 10px 25px;
}

.w_btn:hover { background: #1d4ed8; transform: translateY(-1px); }
.sh_adm_btn:hover { background: #f8f9fa; border-color: #bbb; }

/* [6] 반응형 디자인 */
@media (max-width: 1024px) { .gall_li { width: 33.333%; } }
@media (max-width: 768px) { .gall_li { width: 50%; } }
@media (max-width: 480px) { 
    .gall_li { width: 100%; padding: 0; } 
    #sh_gall_ul { margin: 0; }
    #sh_write_tbl th { display: none; }
    #sh_write_tbl td { display: block; width: 100%; padding: 10px 0; }
    .list_btn_wrap { flex-direction: column; gap: 15px; text-align: center; }
}

/* 그누보드 기본 sound_only 클래스 숨김 처리 */
.sound_only {
    display: inline-block;
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    text-indent: -9999px;
    font-size: 0;
    line-height: 0;
}

/* [7] sh_setup (설정/관리 영역) 디자인 추가 */
#sh_setup { 
    max-width: 1000px; 
    margin: 40px auto; 
    padding: 30px; 
    background: #fff; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

/* 설정 섹션 제목 */
.setup_tit { 
    font-size: 22px; 
    font-weight: 700; 
    color: #111; 
    margin-bottom: 25px; 
    padding-bottom: 15px; 
    border-bottom: 2px solid var(--primary-color); 
    display: flex;
    align-items: center;
}

.setup_tit::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--accent-blue);
    margin-right: 12px;
    border-radius: 2px;
}

/* 설정 테이블 스타일 */
.setup_table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    margin-bottom: 30px;
}

.setup_table th { 
    width: 200px; 
    padding: 20px; 
    background: #fcfcfc; 
    border-bottom: 1px solid #eee; 
    text-align: left; 
    font-size: 14px; 
    color: #444; 
    vertical-align: middle;
}

.setup_table td { 
    padding: 15px 20px; 
    border-bottom: 1px solid #eee; 
    font-size: 14px; 
    color: #666; 
}

/* 설정 안내 문구 */
.setup_info { 
    font-size: 13px; 
    color: #888; 
    margin-top: 8px; 
    line-height: 1.5; 
    display: block;
}

/* 설정 내 입력창 */
.setup_input { 
    width: 100%; 
    max-width: 500px; 
    height: 40px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    padding: 0 12px; 
    font-size: 14px; 
    transition: 0.2s;
}

.setup_input:focus { 
    border-color: var(--accent-blue); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}

/* 설정 체크박스/라디오 커스텀 느낌 */
.setup_table input[type="checkbox"], 
.setup_table input[type="radio"] { 
    margin-right: 6px; 
    accent-color: var(--accent-blue); 
    cursor: pointer;
}

/* 하단 버튼 영역 */
.setup_btn_wrap { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 40px; 
    padding-top: 30px; 
    border-top: 1px solid #f1f1f1; 
}

.btn_save { 
    background: var(--primary-color); 
    color: #fff; 
    padding: 12px 40px; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 15px; 
    transition: 0.3s;
}

.btn_save:hover { 
    background: #222; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

/* 반응형 대응 */
@media (max-width: 768px) {
    #sh_setup { padding: 20px; margin: 20px; }
    .setup_table th { width: 100px; padding: 15px 10px; font-size: 13px; }
    .setup_table td { padding: 10px; }
    .setup_input { width: 100%; }
}