@charset "utf-8";

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

/* ✅ jjtheme.css의 .sub_contents를 그대로 사용하므로 별도 오버라이드 하지 않음 */

/* Total 표시 숨김 */
#bo_btn_top {
    display: none !important;
}

/* ==================== 갤러리 그리드 ==================== */
.fv-pf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .fv-pf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 768px) {
    .fv-pf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 600px) {
    .fv-pf-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==================== 갤러리 아이템 ==================== */
.fv-pf-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    position: relative;
}
.fv-pf-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.fv-pf-item.is-notice {
    border: 2px solid var(--accent);
}

.fv-pf-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ==================== 썸네일 ==================== */
.fv-pf-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--gallery-ratio, 4/3);
    background: var(--brand-light);
}
@media (max-width: 768px) {
    .fv-pf-thumb-wrap {
        aspect-ratio: var(--gallery-mobile-ratio, 4/3);
    }
}

.fv-pf-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}
.fv-pf-item:hover .fv-pf-thumb {
    transform: scale(1.07);
}

.fv-pf-noimg {
    width: 100%;
    height: 100%;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--brand-sub);
}

/* ==================== 카테고리 배지 ==================== */
.fv-pf-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    z-index: 5;
}

/* ==================== 오버레이 ==================== */
.fv-pf-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,24,64,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    z-index: 3;
}
.fv-pf-overlay i {
    font-size: 28px;
    color: var(--white);
}
.fv-pf-item:hover .fv-pf-overlay {
    opacity: 1;
}

/* ==================== 정보 영역 ==================== */
.fv-pf-info {
    padding: 16px 18px;
}
.fv-pf-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fv-pf-client,
.fv-pf-year {
    font-size: 12px;
    color: var(--txt-s);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}
.fv-pf-client i,
.fv-pf-year i {
    color: var(--brand-sub);
}

/* ==================== 관리자 영역 ==================== */
.fv-pf-admin {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    align-items: center;
    z-index: 10;
}
.fv-pf-admin input[type="checkbox"] {
    accent-color: var(--brand);
}
.fv-admin-edit {
    width: 28px;
    height: 28px;
    background: rgba(13,24,64,.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
}
.fv-admin-edit:hover {
    background: var(--brand);
}

/* ==================== 빈 상태 ==================== */
.fv-pf-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--txt-s);
}
.fv-pf-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--brand-sub);
}

/* ==================== 하단 버튼 바 ==================== */
.bo_fx {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
    border-top: 0px solid #e4e4e4;
    margin-bottom: 20px;
}
.btn_bo_user {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.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;
}

/* ==================== 페이징 ==================== */
.pg_wrap {
    text-align: center;
    margin: 20px auto;
}
.pg {
    display: inline-block;
}
.pg a,
.pg strong {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    margin: 0 2px;
    font-size: 14px;
    line-height: 32px;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: var(--white);
    color: #555;
    text-align: center;
}
.pg strong {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}
.pg a:hover {
    background: #f5f5f5;
    border-color: var(--brand);
    color: var(--brand);
}

/* ==================== 검색 모달 ==================== */
.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;
}

/* ==================== 반응형 추가 ==================== */
@media (max-width: 768px) {
    .fv-pf-info {
        padding: 10px 12px;
    }
    .fv-pf-title {
        font-size: 13px;
    }
    .fv-pf-client,
    .fv-pf-year {
        font-size: 11px;
    }
    .bo_fx {
        margin-top: 10px;
        padding-top: 10px;
    }
    .pg a,
    .pg strong {
        min-width: 30px;
        height: 30px;
        line-height: 28px;
        font-size: 12px;
    }
    .fv-pf-cat-badge {
        font-size: 10px;
        padding: 2px 8px;
        top: 8px;
        left: 8px;
    }
}
@media (max-width: 480px) {
    .fv-pf-title {
        font-size: 12px;
    }
    .pg a,
    .pg strong {
        min-width: 28px;
        height: 28px;
        line-height: 26px;
        font-size: 11px;
    }
}