﻿/* ======================================================================
   jubo 주보 테마 (2026 리뉴얼)
   - 게시판형(List) / 갤러리형(Gallery, Webzine) 공용
   - 모든 규칙은 .jubo-theme 안에서만 적용 (사이트 다른 영역에 영향 없음)
   - 색상은 아래 변수만 바꾸면 테마 전체에 반영됩니다
   ====================================================================== */
.jubo-theme {
    --bt-primary: #1f4e9c;
    --bt-primary-dark: #173c78;
    --bt-primary-soft: #eef3fb;
    --bt-accent: #e63946;          /* PDF */
    --bt-accent-dark: #c92a37;
    --bt-new: #ff6b35;             /* NEW 배지 */
    --bt-ink: #222;
    --bt-text: #444;
    --bt-muted: #8a8f98;
    --bt-line: #e6e8ec;
    --bt-bg: #f6f7f9;
    --bt-radius: 12px;
    --bt-shadow: 0 10px 28px rgba(20, 30, 50, 0.10);
    --bt-shadow-sm: 0 2px 8px rgba(20, 30, 50, 0.06);
    color: var(--bt-text);
    font-size: 15px;
}

    .jubo-theme *,
    .jubo-theme *:before,
    .jubo-theme *:after {
        box-sizing: border-box;
    }

    .jubo-theme a:hover,
    .jubo-theme a:focus {
        text-decoration: none;
    }

/* ======================================================================
   검색
   ====================================================================== */
.jubo-theme .div-search-list {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--bt-radius);
    background: var(--bt-bg);
}

.jubo-theme .action-search {
    display: flex;
    gap: 8px;
    max-width: 760px;
    margin: 0 auto;
}

.jubo-theme .search-kind {
    flex: 0 0 140px;
}

    .jubo-theme .search-kind select.form-control {
        height: 48px;
        padding: 0 14px;
        border: 1px solid var(--bt-line);
        border-radius: 999px;
        background-color: #fff;
        box-shadow: none;
        color: var(--bt-text);
        font-size: 15px;
    }

.jubo-theme .div-search-word {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

    .jubo-theme .div-search-word .search-icon {
        position: absolute;
        top: 50%;
        left: 18px;
        margin-top: -8px;
        color: var(--bt-muted);
        font-size: 16px;
        pointer-events: none;
    }

    .jubo-theme .div-search-word .input-search-word {
        width: 100%;
        height: 48px;
        padding: 0 18px 0 44px;
        border: 1px solid var(--bt-line);
        border-radius: 999px;
        background: #fff;
        box-shadow: none;
        font-size: 15px;
    }

.jubo-theme .search-kind select.form-control:focus,
.jubo-theme .div-search-word .input-search-word:focus {
    border-color: var(--bt-primary);
    box-shadow: 0 0 0 3px var(--bt-primary-soft);
    outline: 0;
}

.jubo-theme .span-button-search {
    flex: 0 0 auto;
}

    .jubo-theme .span-button-search .button-search {
        height: 48px;
        padding: 0 28px;
        border: 0;
        border-radius: 999px;
        background: var(--bt-primary);
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        transition: background 0.15s ease;
    }

        .jubo-theme .span-button-search .button-search:hover,
        .jubo-theme .span-button-search .button-search:focus {
            background: var(--bt-primary-dark);
            color: #fff;
        }

.jubo-theme .search-result {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: -12px 0 20px;
    padding: 0 4px;
    color: var(--bt-muted);
    font-size: 14px;
}

    .jubo-theme .search-result b {
        color: var(--bt-ink);
    }

    .jubo-theme .search-result .search-reset {
        color: var(--bt-muted);
    }

        .jubo-theme .search-result .search-reset:hover {
            color: var(--bt-primary);
        }

/* ======================================================================
   분류
   ====================================================================== */
.jubo-theme .list-categories {
    margin-bottom: 20px;
}

    .jubo-theme .list-categories > select.form-control {
        width: auto;
        min-width: 220px;
        height: 42px;
        border: 1px solid var(--bt-line);
        border-radius: 8px;
        box-shadow: none;
        font-size: 14px;
    }

    .jubo-theme .list-categories .btn {
        margin: 0 4px 6px 0;
        padding: 7px 16px;
        border: 1px solid var(--bt-line);
        border-radius: 999px;
        background: #fff;
        color: var(--bt-text);
        font-size: 14px;
    }

        .jubo-theme .list-categories .btn:hover {
            border-color: var(--bt-primary);
            color: var(--bt-primary);
        }

        .jubo-theme .list-categories .btn.btn-gray {
            border-color: var(--bt-primary);
            background: var(--bt-primary);
            color: #fff;
        }

    .jubo-theme .list-categories .category-group {
        margin-right: 4px;
    }

        .jubo-theme .list-categories .category-group .btn {
            margin-right: 0;
        }

        .jubo-theme .list-categories .category-group .category-btn:not(:last-child) {
            border-radius: 999px 0 0 999px;
        }

        .jubo-theme .list-categories .category-group .addon-btn {
            padding: 7px 10px 7px 8px;
            border-radius: 0 999px 999px 0;
        }

        .jubo-theme .list-categories .category-group ul {
            margin-top: 4px;
            padding: 6px 0;
            border: 1px solid var(--bt-line);
            border-radius: 8px;
            box-shadow: var(--bt-shadow);
        }

            .jubo-theme .list-categories .category-group ul li a {
                padding: 7px 14px;
                font-size: 13px;
                cursor: pointer;
            }

            .jubo-theme .list-categories .category-group ul li.selected a {
                background: var(--bt-primary-soft);
                color: var(--bt-primary);
            }

/* ======================================================================
   게시판형(List)
   ====================================================================== */
.jubo-theme .theme-list table {
    width: 100%;
    margin-bottom: 0;
    border-top: 2px solid var(--bt-ink);
    border-collapse: collapse;
}

    .jubo-theme .theme-list table th,
    .jubo-theme .theme-list table td {
        padding: 16px 12px;
        border-top: 0;
        border-bottom: 1px solid var(--bt-line);
        font-size: 15px;
        text-align: center;
        vertical-align: middle;
    }

    .jubo-theme .theme-list table > thead > tr > th {
        background: var(--bt-bg);
        border-bottom: 1px solid #d7dae0;
        color: var(--bt-ink);
        font-weight: 700;
        white-space: nowrap;
    }

    .jubo-theme .theme-list table th.document-title {
        width: 50%;
    }

    .jubo-theme .theme-list table td {
        color: var(--bt-muted);
        cursor: pointer;
    }

        .jubo-theme .theme-list table td.document-title {
            text-align: left;
        }

            .jubo-theme .theme-list table td.document-title a {
                color: var(--bt-ink);
                font-size: 16px;
                transition: color 0.15s ease;
            }

    .jubo-theme .theme-list table.table-hover > tbody > tr:hover {
        background: #f8fafd;
    }

        .jubo-theme .theme-list table.table-hover > tbody > tr:hover td.document-title a,
        .jubo-theme .theme-list table td.document-title a.active {
            color: var(--bt-primary);
        }

    .jubo-theme .theme-list table td.document-title .badge-new {
        display: inline-block;
        width: 18px;
        height: 18px;
        margin-left: 6px;
        border-radius: 50%;
        background: var(--bt-new);
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        line-height: 18px;
        text-align: center;
        vertical-align: 2px;
    }

    .jubo-theme .theme-list table td.document-title .file {
        margin-left: 6px;
        color: var(--bt-muted);
    }

    .jubo-theme .theme-list table td.document-title a.comment-count {
        display: inline-block;
        margin-left: 6px;
        padding: 0 7px;
        border-radius: 999px;
        background: var(--bt-primary-soft);
        color: var(--bt-primary);
        font-size: 12px;
        font-weight: 700;
        line-height: 20px;
    }

    .jubo-theme .theme-list table td.document-title .reserved {
        display: inline-block;
        margin-left: 6px;
        padding: 0 7px;
        border-radius: 4px;
        background: #fff4e5;
        color: #c46a00;
        font-size: 12px;
        line-height: 20px;
    }

    .jubo-theme .theme-list table tr.notice {
        background: #f8fafd;
    }

        .jubo-theme .theme-list table tr.notice td.document-number {
            color: var(--bt-primary);
            font-size: 13px;
            font-weight: 700;
        }

        .jubo-theme .theme-list table tr.notice td.document-title a {
            font-weight: 700;
        }

    .jubo-theme .theme-list table td.document-category span {
        display: inline-block;
        padding: 2px 10px;
        border-radius: 999px;
        background: var(--bt-bg);
        color: var(--bt-text);
        font-size: 13px;
    }

    .jubo-theme .theme-list table th input,
    .jubo-theme .theme-list table td input {
        margin: 0;
    }

/* 갤러리형에서 공지 표 아래 여백 */
.jubo-theme.gallery .theme-list table {
    margin-bottom: 28px;
}

/* ======================================================================
   갤러리형 - 이번 주 주보 (첫 페이지 맨 위)
   ====================================================================== */
.jubo-theme .jubo-latest {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--bt-primary-soft) 0%, #fff 70%);
    border: 1px solid var(--bt-line);
}

    .jubo-theme .jubo-latest .latest-cover {
        position: relative;
        flex: 0 0 240px;
        width: 240px;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--bt-shadow);
        transform: rotate(-2deg);
        transition: transform 0.3s ease;
    }

        .jubo-theme .jubo-latest .latest-cover:hover {
            transform: rotate(0deg) translateY(-4px);
        }

        .jubo-theme .jubo-latest .latest-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: 50% 0;
        }

    .jubo-theme .jubo-latest .latest-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .jubo-theme .jubo-latest .latest-label {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 999px;
        background: var(--bt-primary);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
    }

    .jubo-theme .jubo-latest .latest-title {
        margin: 14px 0 0;
        font-size: 28px;
        font-weight: 800;
        line-height: 1.35;
        word-break: keep-all;
    }

        .jubo-theme .jubo-latest .latest-title a {
            color: var(--bt-ink);
        }

            .jubo-theme .jubo-latest .latest-title a:hover {
                color: var(--bt-primary);
            }

    .jubo-theme .jubo-latest .latest-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 18px;
        margin-top: 12px;
        color: var(--bt-muted);
        font-size: 15px;
    }

    .jubo-theme .jubo-latest .latest-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 28px;
    }

/* 공통 버튼 */
.jubo-theme .jubo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.15s ease;
}

.jubo-theme .jubo-btn-primary {
    background: var(--bt-primary);
    color: #fff;
}

    .jubo-theme .jubo-btn-primary:hover,
    .jubo-theme .jubo-btn-primary:focus {
        background: var(--bt-primary-dark);
        color: #fff;
    }

.jubo-theme .jubo-btn-line {
    border: 1px solid var(--bt-line);
    background: #fff;
    color: var(--bt-text);
}

    .jubo-theme .jubo-btn-line .fa {
        color: var(--bt-accent);
    }

    .jubo-theme .jubo-btn-line:hover,
    .jubo-theme .jubo-btn-line:focus {
        border-color: var(--bt-accent);
        color: var(--bt-accent);
    }

/* 메타 공통 */
.jubo-theme .meta-item .fa {
    margin-right: 5px;
}

.jubo-theme .meta-item b {
    margin-right: 6px;
    color: var(--bt-text);
    font-weight: 700;
}

/* ======================================================================
   갤러리형 - 카드
   ====================================================================== */
.jubo-theme .GalleryType {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 28px;
}

.jubo-theme .GalleryType > .each-document {
    position: relative;
    min-width: 0;
}

    .jubo-theme .GalleryType > .each-document > a.title-image {
        position: relative;
        display: block;
        width: 100%;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        border: 1px solid var(--bt-line);
        border-radius: 10px;
        background-color: var(--bt-bg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: 50% 0;
        box-shadow: var(--bt-shadow-sm);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .jubo-theme .GalleryType > .each-document:hover > a.title-image {
        box-shadow: var(--bt-shadow);
        transform: translateY(-4px);
    }

    /* 가로로 긴 표지(펼침면 등)는 자르지 않고 전체 표시 (스크립트가 판별) */
    .jubo-theme .GalleryType > .each-document > a.title-image.is-landscape {
        background-color: #fff;
        background-size: contain;
        background-position: 50% 50%;
    }

    .jubo-theme .jubo-latest .latest-cover.is-landscape img {
        object-fit: contain;
        object-position: 50% 50%;
    }

    .jubo-theme .GalleryType > .each-document > a.title-image > .no-image,
    .jubo-theme .jubo-latest .latest-cover > .no-image {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #c3c7ce;
        font-size: 40px;
    }

    /* 배지 : NEW / 면 수 */
    .jubo-theme .GalleryType > .each-document > a.title-image > .badges {
        position: absolute;
        left: 10px;
        bottom: 10px;
        display: flex;
        gap: 6px;
    }

        .jubo-theme .GalleryType > .each-document > a.title-image > .badges > span {
            padding: 3px 9px;
            border-radius: 999px;
            color: #fff;
            font-size: 11px;
            font-weight: 800;
            line-height: 1.5;
        }

    .jubo-theme .GalleryType .badge-new {
        background: var(--bt-new);
        letter-spacing: 0.5px;
    }

    .jubo-theme .GalleryType .badge-pages {
        background: rgba(10, 20, 40, 0.6);
    }

        .jubo-theme .GalleryType .badge-pages .fa {
            margin-right: 4px;
        }

    /* 관리자 체크박스 */
    .jubo-theme .GalleryType > .each-document > .document-checkbox {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 3;
        display: flex;
        padding: 4px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.9);
        line-height: 0;
    }

        .jubo-theme .GalleryType > .each-document > .document-checkbox input {
            margin: 0;
        }

    /* PDF 다운로드 */
    .jubo-theme .GalleryType > .each-document > .file-btn-pdf {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 3;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        height: 32px;
        padding: 0 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--bt-shadow-sm);
        color: var(--bt-accent);
        font-size: 12px;
        font-weight: 800;
        transition: all 0.15s ease;
    }

        .jubo-theme .GalleryType > .each-document > .file-btn-pdf:hover,
        .jubo-theme .GalleryType > .each-document > .file-btn-pdf:focus {
            background: var(--bt-accent);
            color: #fff;
        }

    .jubo-theme .GalleryType > .each-document > .card-info {
        padding: 14px 2px 0;
        text-align: center;
    }

        .jubo-theme .GalleryType > .each-document > .card-info .title {
            display: block;
            overflow: hidden;
            color: var(--bt-ink);
            font-size: 16px;
            font-weight: 700;
            line-height: 1.5;
            text-overflow: ellipsis;
            white-space: nowrap;
            transition: color 0.15s ease;
        }

    .jubo-theme .GalleryType > .each-document:hover > .card-info .title {
        color: var(--bt-primary);
    }

    .jubo-theme .GalleryType > .each-document > .card-info .meta {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 12px;
        margin-top: 4px;
        color: var(--bt-muted);
        font-size: 13px;
    }

/* ======================================================================
   글 없음 / 페이지 번호
   ====================================================================== */
.jubo-theme .no-document {
    padding: 70px 0;
    border-top: 2px solid var(--bt-ink);
    border-bottom: 1px solid var(--bt-line);
    color: var(--bt-muted);
    font-size: 15px;
    text-align: center;
}

    .jubo-theme .no-document .fa {
        display: block;
        margin-bottom: 10px;
        color: #c3c7ce;
        font-size: 36px;
    }

.jubo-theme .board-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 36px 0 44px;
}

    .jubo-theme .board-pages > span.page {
        min-width: 38px;
        height: 38px;
        margin: 0;
        padding: 0 8px;
        border: 1px solid var(--bt-line);
        border-radius: 8px;
        background: #fff;
        box-shadow: none;
        color: var(--bt-text);
        font-size: 14px;
        line-height: 36px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

        .jubo-theme .board-pages > span.page:hover {
            border-color: var(--bt-primary);
            background: #fff;
            color: var(--bt-primary);
        }

        .jubo-theme .board-pages > span.page.selected,
        .jubo-theme .board-pages > span.page.selected:hover {
            border-color: var(--bt-primary);
            background: var(--bt-primary);
            color: #fff;
            font-weight: 700;
        }

    .jubo-theme .board-pages > span.dots {
        padding: 0 2px;
        color: var(--bt-muted);
    }

    .jubo-theme .board-pages > span.prev,
    .jubo-theme .board-pages > span.next {
        padding: 0 8px;
        color: var(--bt-muted);
        font-size: 16px;
        cursor: pointer;
    }

        .jubo-theme .board-pages > span.prev:hover,
        .jubo-theme .board-pages > span.next:hover {
            color: var(--bt-primary);
        }

/* ======================================================================
   상세보기
   ====================================================================== */
.jubo-theme .theme-detail .detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 14px;
    border-top: 1px solid var(--bt-line);
    border-bottom: 1px solid var(--bt-line);
    background: #fafafa;
}

    .jubo-theme .theme-detail .detail-top .document-title {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        color: var(--bt-ink);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
        word-break: keep-all;
    }

        .jubo-theme .theme-detail .detail-top .document-title .category {
            display: inline-block;
            margin-right: 6px;
            padding: 1px 9px;
            border-radius: 999px;
            background: var(--bt-primary-soft);
            color: var(--bt-primary);
            font-size: 12px;
            font-weight: 700;
            vertical-align: 2px;
        }

    .jubo-theme .theme-detail .detail-top .document-regdate {
        flex: 0 0 auto;
        color: #333;
        font-size: 15px;
        white-space: nowrap;
    }

.jubo-theme .theme-detail .detail-upper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bt-line);
    font-size: 15px;
}

    .jubo-theme .theme-detail .detail-upper .document-writer {
        color: #333;
    }

    .jubo-theme .theme-detail .detail-upper .document-readed_count {
        color: var(--bt-muted);
        font-size: 13px;
        white-space: nowrap;
    }

/* 영상 */
.jubo-theme .theme-detail .detail-video {
    margin-top: 8px;
}

    .jubo-theme .theme-detail .detail-video iframe,
    .jubo-theme .theme-detail .detail-video video {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border: 0;
        background: #000;
    }

@supports not (aspect-ratio: 16 / 9) {
    .jubo-theme .theme-detail .detail-video iframe {
        height: 540px;
    }
}

.jubo-theme .theme-detail .detail-video .video-js {
    width: 100%;
    height: auto;
}

.jubo-theme .theme-detail .detail-video > a.video-button {
    display: block;
    padding: 16px 0;
    border-radius: var(--bt-radius);
    background: var(--bt-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.jubo-theme .theme-detail .video-parts {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

    .jubo-theme .theme-detail .video-parts .video-part {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 42px;
        padding: 0 22px;
        border: 1px solid var(--bt-line);
        border-radius: 999px;
        background: #fff;
        color: var(--bt-text);
        font-size: 14px;
        font-weight: 700;
        transition: all 0.15s ease;
    }

        .jubo-theme .theme-detail .video-parts .video-part .fa {
            font-size: 11px;
        }

        .jubo-theme .theme-detail .video-parts .video-part:hover {
            border-color: var(--bt-primary);
            color: var(--bt-primary);
        }

        .jubo-theme .theme-detail .video-parts .video-part.is-active {
            border-color: var(--bt-primary);
            background: var(--bt-primary);
            color: #fff;
        }

.jubo-theme .theme-detail .detail-audio {
    margin-top: 16px;
}

    .jubo-theme .theme-detail .detail-audio audio {
        width: 100%;
    }

.jubo-theme .theme-detail .detail-pdf iframe {
    width: 100%;
    height: 600px;
    border: 0;
}

/* 확장필드 */
.jubo-theme .theme-detail .document-extended_keys {
    margin: 16px 0 0;
    border-top: 1px solid var(--bt-line);
}

    .jubo-theme .theme-detail .document-extended_keys .ext-row {
        display: flex;
        border-bottom: 1px solid var(--bt-line);
    }

    .jubo-theme .theme-detail .document-extended_keys dt {
        flex: 0 0 160px;
        padding: 12px 16px;
        background: var(--bt-bg);
        color: var(--bt-ink);
        font-size: 14px;
        font-weight: 700;
        text-align: center;
    }

    .jubo-theme .theme-detail .document-extended_keys dd {
        flex: 1 1 auto;
        margin: 0;
        padding: 12px 16px;
        color: var(--bt-text);
        font-size: 14px;
    }

/* ======================================================================
   상세 - 주보 이미지 뷰어
   ====================================================================== */
.jubo-theme .jubo-viewer {
    margin-top: 24px;
    padding: 24px;
    border-radius: 16px;
    background: var(--bt-bg);
    outline: 0;
}

    .jubo-theme .jubo-viewer:focus-visible {
        box-shadow: 0 0 0 3px var(--bt-primary-soft);
    }

    .jubo-theme .jubo-viewer .jv-stage {
        position: relative;
        display: flex;
        justify-content: center;
        min-height: 200px;
    }

    .jubo-theme .jubo-viewer .jv-slide {
        display: none;
        margin: 0;
    }

        .jubo-theme .jubo-viewer .jv-slide.is-active {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            animation: jvFade 0.3s ease;
        }

        /* 크기가 제각각인 이미지 : 원본보다 키우지 않고 영역 안에 맞춤 */
        .jubo-theme .jubo-viewer .jv-slide img {
            display: block;
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 85vh;
            border-radius: 4px;
            background: #fff;
            box-shadow: var(--bt-shadow);
            cursor: zoom-in;
        }

    /* 스크립트가 가장 긴 면 기준으로 높이를 고정한 상태 → 넘겨도 아래 영역이 움직이지 않음 */
    .jubo-theme .jubo-viewer .jv-stage.is-sized .jv-slide.is-active {
        height: 100%;
    }

        .jubo-theme .jubo-viewer .jv-stage.is-sized .jv-slide img {
            max-height: 100%;
        }

    /* 세로로 아주 긴 이미지 : 화면 높이에 맞춰 줄이지 않고 너비 기준으로 표시 */
    .jubo-theme .jubo-viewer .jv-stage.is-tall .jv-slide img {
        max-height: none;
    }

    .jubo-theme .jubo-viewer .jv-stage.is-tall .jv-nav {
        top: 50vh;
    }

@keyframes jvFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.jubo-theme .jubo-viewer .jv-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--bt-shadow);
    color: var(--bt-ink);
    font-size: 26px;
    line-height: 52px;
    transition: all 0.15s ease;
}

    .jubo-theme .jubo-viewer .jv-nav:hover {
        background: var(--bt-primary);
        color: #fff;
    }

.jubo-theme .jubo-viewer .jv-prev {
    left: 0;
}

    .jubo-theme .jubo-viewer .jv-prev .fa {
        margin-right: 3px;
    }

.jubo-theme .jubo-viewer .jv-next {
    right: 0;
}

    .jubo-theme .jubo-viewer .jv-next .fa {
        margin-left: 3px;
    }

.jubo-theme .jubo-viewer .jv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

.jubo-theme .jubo-viewer .jv-counter {
    color: var(--bt-muted);
    font-size: 14px;
}

    .jubo-theme .jubo-viewer .jv-counter b {
        color: var(--bt-ink);
        font-size: 16px;
    }

.jubo-theme .jubo-viewer .jv-actions {
    display: flex;
    gap: 8px;
}

.jubo-theme .jubo-viewer .jv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--bt-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bt-text);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s ease;
}

    .jubo-theme .jubo-viewer .jv-btn:hover,
    .jubo-theme .jubo-viewer .jv-btn:focus {
        border-color: var(--bt-primary);
        color: var(--bt-primary);
    }

.jubo-theme .jubo-viewer .jv-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 4px 2px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.jubo-theme .jubo-viewer .jv-thumb {
    position: relative;
    flex: 0 0 76px;
    height: 100px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #fff;
    opacity: 0.55;
    transition: all 0.15s ease;
}

    .jubo-theme .jubo-viewer .jv-thumb:hover {
        opacity: 0.9;
    }

    .jubo-theme .jubo-viewer .jv-thumb.is-active {
        border-color: var(--bt-primary);
        opacity: 1;
    }

    /* 썸네일은 가로/세로 상관없이 전체가 보이게 */
    .jubo-theme .jubo-viewer .jv-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .jubo-theme .jubo-viewer .jv-thumb span {
        position: absolute;
        right: 4px;
        bottom: 4px;
        min-width: 18px;
        padding: 0 4px;
        border-radius: 4px;
        background: rgba(10, 20, 40, 0.65);
        color: #fff;
        font-size: 11px;
        line-height: 18px;
    }

/* ── 크게 보기 (body 에 붙으므로 .jubo-theme 밖) ── */
html.jv-lock,
html.jv-lock body {
    overflow: hidden;
}

.jv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(12, 16, 24, 0.94);
    animation: jvFade 0.2s ease;
}

    .jv-lightbox .jv-lb-top {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        color: #fff;
    }

    .jv-lightbox .jv-lb-counter {
        font-size: 15px;
        font-weight: 700;
    }

    .jv-lightbox .jv-lb-actions {
        display: flex;
        gap: 8px;
    }

    .jv-lightbox .jv-lb-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 18px;
        text-decoration: none;
        cursor: pointer;
    }

        .jv-lightbox .jv-lb-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            color: #fff;
        }

    .jv-lightbox .jv-lb-stage {
        position: absolute;
        inset: 70px 80px 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
    }

        .jv-lightbox .jv-lb-stage img {
            max-width: 100%;
            max-height: 100%;
            background: #fff;
            cursor: zoom-in;
        }

    .jv-lightbox.is-zoomed .jv-lb-stage {
        display: block;
        text-align: center;
    }

        .jv-lightbox.is-zoomed .jv-lb-stage img {
            max-width: none;
            max-height: none;
            cursor: zoom-out;
        }

    /* 화면에 다 들어오는 작은 이미지 */
    .jv-lightbox.no-zoom .jv-lb-stage img {
        cursor: default;
    }

    .jv-lightbox.no-zoom .jv-lb-hint {
        display: none;
    }

    .jv-lightbox .jv-lb-nav {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 56px;
        height: 56px;
        margin-top: -28px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 30px;
    }

        .jv-lightbox .jv-lb-nav:hover {
            background: rgba(255, 255, 255, 0.25);
        }

    .jv-lightbox .jv-lb-prev {
        left: 14px;
    }

    .jv-lightbox .jv-lb-next {
        right: 14px;
    }

    .jv-lightbox .jv-lb-hint {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 10px;
        margin: 0;
        color: rgba(255, 255, 255, 0.55);
        font-size: 12px;
        text-align: center;
    }

/* ======================================================================
   상세 - 첨부파일 카드 / PDF 미리보기
   ====================================================================== */
.jubo-theme .theme-detail .detail-files {
    margin-top: 20px;
}

    .jubo-theme .theme-detail .detail-files .file-item {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 10px;
        padding: 14px 18px;
        border: 1px solid var(--bt-line);
        border-radius: var(--bt-radius);
        background: #fafafa;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .jubo-theme .theme-detail .detail-files .file-item:hover {
            border-color: #d5d9e0;
            box-shadow: var(--bt-shadow-sm);
        }

    .jubo-theme .theme-detail .detail-files .file-icon {
        flex: 0 0 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 42px;
        border-radius: 10px;
        background: var(--bt-accent);
        color: #fff;
        font-size: 20px;
    }

    .jubo-theme .theme-detail .detail-files .file-item.is-etc .file-icon {
        background: var(--bt-muted);
    }

    .jubo-theme .theme-detail .detail-files .file-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .jubo-theme .theme-detail .detail-files .file-name {
        display: block;
        overflow: hidden;
        color: var(--bt-ink);
        font-size: 15px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jubo-theme .theme-detail .detail-files .file-meta {
        display: block;
        margin-top: 3px;
        color: var(--bt-muted);
        font-size: 12px;
    }

    .jubo-theme .theme-detail .detail-files .file-actions {
        flex: 0 0 auto;
        display: flex;
        gap: 8px;
    }

.jubo-theme .theme-detail .file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.jubo-theme .theme-detail .file-btn-view {
    border: 1px solid var(--bt-accent);
    background: var(--bt-accent);
    color: #fff;
}

    .jubo-theme .theme-detail .file-btn-view:hover,
    .jubo-theme .theme-detail .file-btn-view:focus {
        border-color: var(--bt-accent-dark);
        background: var(--bt-accent-dark);
        color: #fff;
    }

.jubo-theme .theme-detail .file-btn-down {
    border: 1px solid #dcdcdc;
    background: #fff;
    color: var(--bt-text);
}

    .jubo-theme .theme-detail .file-btn-down:hover,
    .jubo-theme .theme-detail .file-btn-down:focus {
        border-color: #aaa;
        background: #f2f2f2;
        color: var(--bt-ink);
    }

.jubo-theme .theme-detail .pdf-viewer {
    margin-top: 16px;
}

    .jubo-theme .theme-detail .pdf-viewer object {
        display: block;
        width: 100%;
        height: 85vh;
        min-height: 560px;
        border: 1px solid var(--bt-line);
        border-radius: 8px;
        background: var(--bt-bg);
    }

    .jubo-theme .theme-detail .pdf-viewer .pdf-viewer-msg {
        padding: 40px 20px;
        color: var(--bt-muted);
        text-align: center;
    }

/* 본문 */
.jubo-theme .theme-detail .detail-content {
    padding: 20px 14px;
    border-bottom: 1px solid var(--bt-line);
    color: var(--bt-text);
    font-size: 15px;
    line-height: 1.8;
    word-break: break-all;
}

    .jubo-theme .theme-detail .detail-content:empty {
        display: none;
    }

    .jubo-theme .theme-detail .detail-content img {
        max-width: 100%;
        height: auto !important;
        cursor: pointer;
    }

/* ======================================================================
   글쓰기
   ====================================================================== */
.board-theme .theme-write {
    padding: 24px 24px 4px;
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    background: #f6f7f9;
}

    .board-theme .theme-write .form-control {
        border-color: #e6e8ec;
        border-radius: 6px;
        box-shadow: none;
    }

        .board-theme .theme-write .form-control:focus {
            border-color: #1f4e9c;
            box-shadow: 0 0 0 3px #eef3fb;
        }

    .board-theme .theme-write .title-category,
    .board-theme .theme-write .title-content {
        padding: 0;
    }

    .board-theme .theme-write .document-title {
        margin: 0;
    }

    .board-theme .theme-write .document-extended_keys {
        margin-top: 12px;
        padding: 1px;
    }

        .board-theme .theme-write .document-extended_keys table {
            border: 1px solid #e6e8ec;
            background: #fff;
        }

            .board-theme .theme-write .document-extended_keys table tr th {
                color: #222;
                font-size: 13px;
                vertical-align: middle;
            }

            .board-theme .theme-write .document-extended_keys table tr td textarea {
                width: 100% !important;
                height: 120px;
                min-height: 70px;
            }

        .board-theme .theme-write .document-extended_keys select {
            max-width: 210px;
        }

    .board-theme .theme-write .document-content {
        margin-top: 12px;
    }

@media (min-width: 768px) {
    .board-theme .theme-write .title-category {
        padding-right: 15px;
    }
}

/* ======================================================================
   반응형
   ====================================================================== */
@media (max-width: 1199px) {
    .jubo-theme .GalleryType {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    /* 게시판형 → 카드 */
    .jubo-theme .theme-list table {
        border-top: 0;
    }

        .jubo-theme .theme-list table thead {
            display: none;
        }

        .jubo-theme .theme-list table tbody {
            display: block;
        }

            .jubo-theme .theme-list table tbody tr {
                position: relative;
                display: block;
                margin-bottom: 10px;
                padding: 0 40px 14px 0;
                border: 1px solid var(--bt-line);
                border-radius: 10px;
                background: #fff;
            }

                .jubo-theme .theme-list table tbody tr:after {
                    content: "";
                    position: absolute;
                    top: 50%;
                    right: 18px;
                    width: 8px;
                    height: 8px;
                    margin-top: -4px;
                    border-right: 2px solid #bbb;
                    border-bottom: 2px solid #bbb;
                    transform: rotate(-45deg);
                }

            .jubo-theme .theme-list table tbody td {
                display: none;
                padding: 0;
                border: 0;
                text-align: left;
            }

                .jubo-theme .theme-list table tbody td.document-title {
                    display: block;
                    padding: 14px 0 0 16px;
                }

                    .jubo-theme .theme-list table tbody td.document-title a {
                        font-weight: 700;
                        word-break: keep-all;
                    }

                .jubo-theme .theme-list table tbody td.document-writer,
                .jubo-theme .theme-list table tbody td.document-regdate,
                .jubo-theme .theme-list table tbody td.document-readedcount {
                    display: inline-block;
                    margin: 6px 0 0 16px;
                    color: var(--bt-muted);
                    font-size: 13px;
                }

                .jubo-theme .theme-list table tbody td.document-readedcount:before {
                    content: "조회 ";
                }

                .jubo-theme .theme-list table tbody td.document-checkbox {
                    position: absolute;
                    top: 12px;
                    right: 40px;
                    display: block;
                }

            .jubo-theme .theme-list table tbody tr.notice td.document-number {
                display: block;
                padding: 12px 0 0 16px;
                font-size: 0;
            }

                .jubo-theme .theme-list table tbody tr.notice td.document-number:before {
                    content: "공지";
                    display: inline-block;
                    padding: 1px 8px;
                    border-radius: 4px;
                    background: var(--bt-primary);
                    color: #fff;
                    font-size: 11px;
                    font-weight: 700;
                }

                .jubo-theme .theme-list table tbody tr.notice td.document-number + td.document-title {
                    padding-top: 6px;
                }

    /* 이번 주 주보 */
    .jubo-theme .jubo-latest {
        gap: 28px;
        padding: 24px;
    }

        .jubo-theme .jubo-latest .latest-cover {
            flex-basis: 180px;
            width: 180px;
        }

        .jubo-theme .jubo-latest .latest-title {
            font-size: 22px;
        }
}

@media (max-width: 767px) {
    /* 검색 : 한 줄 유지, 버튼은 아이콘 크기로 */
    .jubo-theme .div-search-list {
        padding: 12px;
    }

    .jubo-theme .action-search {
        flex-wrap: wrap;
    }

    .jubo-theme .search-kind {
        flex: 1 1 100%;
    }

    .jubo-theme .span-button-search .button-search {
        padding: 0 20px;
    }

    .jubo-theme .search-result {
        margin-top: -16px;
    }

    /* 이번 주 주보 : 세로 배치 */
    .jubo-theme .jubo-latest {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 32px;
        padding: 20px;
        text-align: center;
    }

        .jubo-theme .jubo-latest .latest-cover {
            flex-basis: auto;
            width: 62%;
            max-width: 240px;
            margin: 0 auto;
        }

        .jubo-theme .jubo-latest .latest-title {
            font-size: 20px;
        }

        .jubo-theme .jubo-latest .latest-meta,
        .jubo-theme .jubo-latest .latest-actions {
            justify-content: center;
        }

        .jubo-theme .jubo-latest .latest-actions {
            margin-top: 20px;
        }

        .jubo-theme .jubo-latest .jubo-btn {
            flex: 1 1 0;
            justify-content: center;
            height: 44px;
            padding: 0 14px;
            font-size: 14px;
        }

    /* 갤러리 2열 */
    .jubo-theme .GalleryType {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 14px;
    }

        .jubo-theme .GalleryType > .each-document > .card-info .title {
            font-size: 14px;
        }

        .jubo-theme .GalleryType > .each-document > .card-info .meta {
            font-size: 12px;
        }

        .jubo-theme .GalleryType > .each-document > .file-btn-pdf {
            top: 8px;
            right: 8px;
            height: 28px;
            padding: 0 10px;
        }

    /* 페이지 번호 */
    .jubo-theme .board-pages {
        gap: 4px;
        padding: 28px 0 36px;
    }

        .jubo-theme .board-pages > span.page {
            min-width: 34px;
            height: 34px;
            padding: 0 6px;
            font-size: 13px;
            line-height: 32px;
        }

    /* 상세 */
    .jubo-theme .theme-detail .detail-top {
        flex-wrap: wrap;
        gap: 4px;
        padding: 14px 12px;
    }

        .jubo-theme .theme-detail .detail-top .document-title {
            flex-basis: 100%;
        }

        .jubo-theme .theme-detail .detail-top .document-regdate {
            color: var(--bt-muted);
            font-size: 13px;
        }

    .jubo-theme .theme-detail .detail-upper {
        padding: 10px 12px;
        font-size: 14px;
    }

    .jubo-theme .theme-detail .document-extended_keys dt {
        flex-basis: 100px;
        padding: 10px;
    }

    .jubo-theme .theme-detail .document-extended_keys dd {
        padding: 10px 12px;
    }

    .jubo-theme .jubo-viewer {
        margin-left: -4px;
        margin-right: -4px;
        padding: 12px;
        border-radius: 12px;
    }

        .jubo-theme .jubo-viewer .jv-nav {
            width: 40px;
            height: 40px;
            margin-top: -20px;
            font-size: 20px;
            line-height: 40px;
            background: rgba(255, 255, 255, 0.85);
        }

        .jubo-theme .jubo-viewer .jv-prev {
            left: -4px;
        }

        .jubo-theme .jubo-viewer .jv-next {
            right: -4px;
        }

        /* 버튼 글자는 숨기고 아이콘만 */
        .jubo-theme .jubo-viewer .jv-btn span {
            display: none;
        }

        .jubo-theme .jubo-viewer .jv-btn {
            width: 38px;
            padding: 0;
            justify-content: center;
        }

        .jubo-theme .jubo-viewer .jv-thumb {
            flex-basis: 56px;
            height: 74px;
        }

    .jv-lightbox .jv-lb-stage {
        inset: 64px 0 34px;
    }

    .jv-lightbox .jv-lb-nav {
        width: 42px;
        height: 42px;
        margin-top: -21px;
        font-size: 22px;
    }

    .jv-lightbox .jv-lb-prev {
        left: 6px;
    }

    .jv-lightbox .jv-lb-next {
        right: 6px;
    }

    .jubo-theme .theme-detail .detail-files .file-item {
        flex-wrap: wrap;
        padding: 14px;
    }

    .jubo-theme .theme-detail .detail-files .file-actions {
        flex: 1 1 100%;
    }

        .jubo-theme .theme-detail .detail-files .file-actions .file-btn {
            flex: 1 1 0;
            justify-content: center;
            padding: 0 10px;
        }

    .jubo-theme .theme-detail .detail-pdf iframe {
        height: 70vh;
        min-height: 420px;
    }

    .jubo-theme .theme-detail .detail-content {
        padding: 16px 4px;
    }

    .board-theme .theme-write {
        padding: 16px 16px 4px;
    }
}

/* 아주 작은 화면 */
@media (max-width: 360px) {
    .jubo-theme .GalleryType {
        gap: 24px 10px;
    }

    .jubo-theme .GalleryType > .each-document > a.title-image > .badges {
        left: 6px;
        bottom: 6px;
    }
}

/* 터치 기기 : 떠오르는 hover 효과 해제 */
@media (hover: none) {
    .jubo-theme .GalleryType > .each-document:hover > a.title-image,
    .jubo-theme .jubo-latest .latest-cover:hover {
        transform: none;
        box-shadow: var(--bt-shadow-sm);
    }

    .jubo-theme .jubo-latest .latest-cover,
    .jubo-theme .jubo-latest .latest-cover:hover {
        transform: rotate(-2deg);
        box-shadow: var(--bt-shadow);
    }
}
