/* =========================================================
   GNUBOARD GALLERY VIEW
   갤러리 상세보기 전용
========================================================= */

.gallery-view-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: #222;
    box-sizing: border-box;
}


/* =========================================================
   HEADER
========================================================= */

.gallery-view-header {
    position: relative;

    padding-bottom: 24px;

    border-bottom: 1px solid #222;
}


/* 카테고리 */

.gallery-view-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;
    height: 24px;

    margin-bottom: 12px;
    padding: 0 9px;

    border-radius: 4px;

    background: #eef5ff;
    color: #2867d8;

    font-size: 11px;
    font-weight: 600;
}


/* 제목 */

.gallery-view-title {
    margin: 0;

    color: #222;

    font-size: 28px;
    font-weight: 700;

    line-height: 1.4;
    letter-spacing: -1px;

    word-break: keep-all;
}


/* 정보 */

.gallery-view-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    margin-top: 14px;

    color: #999;

    font-size: 13px;
}

.gallery-view-meta span {
    display: inline-flex;
    align-items: center;
}

.gallery-view-meta span:not(:last-child)::after {
    content: "";

    width: 1px;
    height: 11px;

    margin: 0 10px;

    background: #ddd;
}

.gallery-view-author {
    color: #444;
    font-weight: 500;
}


/* =========================================================
   MAIN IMAGE
========================================================= */

.gallery-view-main-image {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    margin-top: 35px;

    min-height: 400px;

    background: #f5f6f8;

    border-radius: 10px;

    overflow: hidden;

    box-sizing: border-box;
}

.gallery-view-main-image img {
    display: block;

    width: auto;
    max-width: 100%;

    max-height: 700px;

    height: auto;

    object-fit: contain;
}


/* 이미지가 없을 때 */

.gallery-view-no-image {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 300px;

    color: #aaa;

    font-size: 14px;
}


/* =========================================================
   IMAGE CAPTION
========================================================= */

.gallery-view-caption {
    margin-top: 10px;

    color: #999;

    font-size: 12px;

    text-align: center;
}


/* =========================================================
   CONTENT
========================================================= */

.gallery-view-content {
    padding: 45px 10px 55px;

    color: #444;

    font-size: 15px;
    line-height: 1.9;

    word-break: break-word;
}

.gallery-view-content img {
    max-width: 100%;
    height: auto;
}

.gallery-view-content iframe {
    max-width: 100%;
}

.gallery-view-content table {
    max-width: 100%;
}


/* =========================================================
   IMAGE GALLERY
========================================================= */

.gallery-view-images {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;

    margin: 0 0 45px;
}

.gallery-view-image {
    overflow: hidden;

    border-radius: 7px;

    background: #f4f5f7;
}

.gallery-view-image img {
    display: block;

    width: 100%;
    height: auto;

    transition: transform .35s ease;
}

.gallery-view-image:hover img {
    transform: scale(1.02);
}


/* =========================================================
   FILE
========================================================= */

.gallery-view-files {
    padding: 20px;

    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;

    background: #fafbfc;
}

.gallery-view-files-title {
    margin-bottom: 12px;

    color: #444;

    font-size: 13px;
    font-weight: 600;
}

.gallery-view-file {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 5px 0;

    font-size: 13px;
}

.gallery-view-file a {
    color: #555;

    text-decoration: none;
}

.gallery-view-file a:hover {
    color: #2867d8;
}

.gallery-view-file-size {
    color: #aaa;

    font-size: 11px;
}


/* =========================================================
   REACTION
========================================================= */

.gallery-view-reaction {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 8px;

    padding: 30px 0;
}

.gallery-reaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 85px;
    height: 40px;

    padding: 0 15px;

    border: 1px solid #e0e3e7;
    border-radius: 22px;

    background: #fff;

    color: #666;

    font-size: 13px;

    text-decoration: none;

    cursor: pointer;

    box-sizing: border-box;

    transition: .2s;
}

.gallery-reaction-btn:hover {
    border-color: #2867d8;

    color: #2867d8;
}


/* =========================================================
   PREV / NEXT
========================================================= */

.gallery-view-navigation {
    margin-top: 10px;

    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.gallery-view-nav {
    display: flex;
    align-items: center;

    min-height: 58px;

    border-bottom: 1px solid #eee;

    text-decoration: none;
}

.gallery-view-nav:last-child {
    border-bottom: 0;
}

.gallery-view-nav-label {
    width: 90px;
    flex-shrink: 0;

    padding-left: 20px;

    color: #888;

    font-size: 13px;
}

.gallery-view-nav-title {
    flex: 1;

    overflow: hidden;

    padding-right: 20px;

    color: #444;

    font-size: 13px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery-view-nav-date {
    width: 100px;

    color: #999;

    font-size: 12px;

    text-align: right;
}


/* =========================================================
   BUTTON
========================================================= */

.gallery-view-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 25px;
}

.gallery-view-buttons {
    display: flex;
    align-items: center;

    gap: 5px;
}

.gallery-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 78px;
    height: 40px;

    padding: 0 15px;

    border: 1px solid #ddd;
    border-radius: 4px;

    background: #fff;

    color: #555;

    font-size: 13px;

    text-decoration: none;

    box-sizing: border-box;

    transition: .2s;
}

.gallery-view-btn:hover {
    background: #f7f8fa;
    border-color: #cdd1d6;
}

.gallery-view-btn.primary {
    border-color: #2867d8;

    background: #2867d8;

    color: #fff;
}

.gallery-view-btn.primary:hover {
    border-color: #1e55b8;

    background: #1e55b8;
}


/* =========================================================
   COMMENT
========================================================= */

.gallery-comment-wrap {
    margin-top: 55px;

    padding-top: 30px;

    border-top: 1px solid #222;
}

.gallery-comment-title {
    margin-bottom: 20px;

    font-size: 16px;
    font-weight: 700;
}

.gallery-comment-title strong {
    color: #2867d8;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .gallery-view-title {
        font-size: 22px;
    }

    .gallery-view-header {
        padding-bottom: 18px;
    }

    .gallery-view-meta {
        font-size: 12px;
    }

    .gallery-view-meta span:not(:last-child)::after {
        margin: 0 7px;
    }


    /* MAIN IMAGE */

    .gallery-view-main-image {
        min-height: 260px;

        margin-top: 25px;

        border-radius: 7px;
    }

    .gallery-view-main-image img {
        max-height: 500px;
    }


    /* CONTENT */

    .gallery-view-content {
        padding: 30px 0 40px;

        font-size: 14px;

        line-height: 1.8;
    }


    /* IMAGE */

    .gallery-view-images {
        grid-template-columns: 1fr;

        gap: 10px;

        margin-bottom: 30px;
    }


    /* NAVIGATION */

    .gallery-view-nav {
        min-height: 52px;
    }

    .gallery-view-nav-label {
        width: 65px;

        padding-left: 10px;
    }

    .gallery-view-nav-date {
        display: none;
    }

    .gallery-view-nav-title {
        padding-right: 10px;
    }


    /* BUTTON */

    .gallery-view-bottom {
        flex-wrap: wrap;

        gap: 8px;
    }

    .gallery-view-buttons {
        width: 100%;
    }

    .gallery-view-btn {
        flex: 1;
    }


    /* COMMENT */

    .gallery-comment-wrap {
        margin-top: 40px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .gallery-view-title {
        font-size: 20px;
    }

    .gallery-view-category {
        margin-bottom: 9px;
    }

    .gallery-view-main-image {
        min-height: 220px;
    }

    .gallery-view-content {
        font-size: 13px;
    }

    .gallery-view-files {
        padding: 15px;
    }

    .gallery-view-btn {
        height: 42px;

        padding: 0 8px;

        font-size: 12px;
    }

}