@charset "utf-8";

/* ============================================================
   gallery.css — 갤러리 전용
   ============================================================ */

/* ------------------------------------------------------------
   1. 컨테이너
------------------------------------------------------------ */
#bo_gall {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    box-sizing: border-box;
}
#bo_gall::after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

/* ------------------------------------------------------------
   2. 카테고리 바
------------------------------------------------------------ */
#bo_cate {
    margin: 16px 0 12px;
}
#bo_cate h2 {
    position: absolute;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}
#bo_cate ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#bo_cate li {
    display: inline-block;
}
#bo_cate a {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--txt-s);
    line-height: 1.6;
    transition: border-color 0.15s, color 0.15s;
}
#bo_cate a:hover,
#bo_cate a:focus,
#bo_cate #bo_cate_on {
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

/* ------------------------------------------------------------
   3. 상단 바
------------------------------------------------------------ */
#bo_btn_top {
    padding: 8px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid #e4e4e4;
}
#bo_btn_top::after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}
#bo_list_total {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}
#bo_list_total span {
    color: var(--txt);
    font-weight: 600;
}

/* ------------------------------------------------------------
   4. 갤러리 그리드
------------------------------------------------------------ */
.gall_grid {
    display: grid;
    grid-template-columns: repeat(var(--gal-pc-cols, 4), 1fr);
    gap: 20px;
    margin: 20px 0 0;
}

/* ------------------------------------------------------------
   5. 갤러리 아이템
------------------------------------------------------------ */
.gall_item {
    position: relative;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}
.gall_item:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.gall_item.gall_notice {
    background: #ebffef;
    border-color: #b2dfb7;
}

/* ------------------------------------------------------------
   6. 체크박스
------------------------------------------------------------ */
.gall_item_chk {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

/* ------------------------------------------------------------
   7. 썸네일
------------------------------------------------------------ */
.gall_thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}
.gall_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.gall_item:hover .gall_thumb img {
    transform: scale(1.03);
}
.gall_noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f5f5f5;
}
.gall_noimg i {
    font-size: 40px;
    color: #ccc;
}

/* ------------------------------------------------------------
   8. 배지
------------------------------------------------------------ */
.gall_new,
.gall_notice_badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.gall_new {
    color: var(--white);
    background: var(--brand);
    border: 1px solid var(--brand);
}
.gall_notice_badge {
    color: var(--brand);
    background: var(--white);
    border: 1px solid var(--brand);
}

/* ------------------------------------------------------------
   9. 정보 영역
------------------------------------------------------------ */
.gall_info {
    padding: 10px 12px 12px;
}
.gall_cate {
    display: inline-block;
    padding: 2px 7px;
    font-size: 11px;
    color: var(--brand);
    border: 1px solid #b8d0e8;
    border-radius: 2px;
    background: transparent;
    margin-bottom: 6px;
    white-space: nowrap;
}
.gall_subject {
    font-size: 14px;
    font-weight: 500;
    color: var(--txt);
    line-height: 1.45;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.gall_item:hover .gall_subject {
    color: var(--brand);
}
.gall_cmt {
    display: inline-block;
    padding: 0 5px;
    height: 16px;
    line-height: 16px;
    font-size: 11px;
    color: var(--brand);
    background: var(--brand-light);
    border-radius: 2px;
    font-weight: 400;
    vertical-align: middle;
    margin-left: 4px;
}
.gall_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
    line-height: 1.5;
}
.gall_meta i {
    margin-right: 3px;
    font-size: 11px;
    color: #ccc;
}
.gall_good {
    font-size: 11px;
    color: #aaa;
}
.gall_good i {
    margin-right: 3px;
    color: #ccc;
}

/* ------------------------------------------------------------
   10. 하단 버튼 바
------------------------------------------------------------ */
.bo_fx {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 14px 0 6px;
    padding-top: 12px;
    border-top: 1px solid #e4e4e4;
    float: none;
}
.bo_fx::after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}
.btn_bo_user {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    float: none;
}
.btn_bo_user li {
    float: none;
    width: auto;
    background: transparent;
    margin: 0;
}
.btn_bo_user > li {
    position: relative;
}
.btn_bo_user .more_opt {
    top: auto;
    bottom: 42px;
}
.btn_bo_user .more_opt::before {
    top: auto;
    bottom: -6px;
    transform: rotate(225deg);
}
.btn_bo_user .more_opt {
    min-width: 110px;
}
.btn_bo_user .more_opt li {
    padding: 9px 4px 9px 14px;
}

/* ------------------------------------------------------------
   11. 검색 모달
------------------------------------------------------------ */
.bo_sch_wrap {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}
.bo_sch_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
}
.bo_sch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 90vw);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.bo_sch h3 {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    margin: 0;
}
.bo_sch form {
    padding: 16px 20px 20px;
}
.bo_sch select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
}
.bo_sch .sch_bar {
    display: flex;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.bo_sch .sch_input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: none;
}
.bo_sch .sch_btn {
    width: 44px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
}
.bo_sch .bo_sch_cls {
    position: absolute;
    top: 0;
    right: 0;
    padding: 14px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* ------------------------------------------------------------
   12. 페이징
------------------------------------------------------------ */
.pg_wrap {
    position: relative;
    display: block;
    text-align: center;
    width: 100%;
    float: none;
    clear: both;
    margin: 30px 0 20px;
}
.pg {
    display: inline-block;
    float: none;
    margin: 0 auto;
    padding: 0;
}
.pg a,
.pg strong {
    display: inline-block;
    float: none;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    margin: 0 2px;
    font-size: 14px;
    font-family: 'Apple SD Gothic Neo', sans-serif !important;
    line-height: 32px;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: var(--white);
    color: #555;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    transition: all 0.2s;
}
.pg strong {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
    font-weight: 600;
}
.pg a:hover {
    background: #f5f5f5;
    border-color: var(--brand);
    color: var(--brand);
}
.pg_start a:before {
    content: "\f100";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #555;
}
.pg_prev a:before {
    content: "\f104";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #555;
}
.pg_next a:before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #555;
}
.pg_end a:before {
    content: "\f101";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #555;
}
.pg_start a:hover:before,
.pg_prev a:hover:before,
.pg_next a:hover:before,
.pg_end a:hover:before {
    color: var(--brand);
}
.gall_empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
    font-size: 14px;
    border: 1px solid #ececec;
    background: #fafafa;
    border-radius: 4px;
}

/* ------------------------------------------------------------
   13. 반응형 — 휴대폰(1개) / 태블릿(3개)
------------------------------------------------------------ */
/* 수정 후 (태블릿에서 2개) */
@media (min-width: 744px) and (max-width: 1024px) {
    .gall_grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
        max-width: 100%;
        margin: 0 auto;
        padding: 0px;
    }
}
/* ✅ 휴대폰 (743px 이하): 1개 */
@media (max-width: 743px) {
    .gall_grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        max-width: 100%;
        margin: 0 auto;
        padding: 0px;
    }
    .gall_info { padding: 8px 10px 10px; }
    .gall_subject { font-size: 13px; }
    .gall_meta { font-size: 10px; gap: 6px; }
    .bo_fx { margin-top: 10px; padding-top: 10px; }
    .pg a, .pg strong {
        min-width: 30px; height: 30px; line-height: 28px;
        padding: 0 6px; font-size: 12px;
    }
    .pg_start a:before, .pg_prev a:before,
    .pg_next a:before, .pg_end a:before { font-size: 12px; }
}
@media (max-width: 480px) {
    .gall_subject {
        font-size: 12px;
    }
    .pg a,
    .pg strong {
        min-width: 28px;
        height: 28px;
        line-height: 26px;
        padding: 0 4px;
        font-size: 11px;
    }
    .pg_start a:before,
    .pg_prev a:before,
    .pg_next a:before,
    .pg_end a:before {
        font-size: 11px;
    }
}