﻿.board-theme .board-pages > span.prev,
.board-theme .board-pages > span.next {
    cursor: pointer;
    color: #666;
    padding: 10px;
}

/* board-list s */
.board-theme .theme-list {
    font-family: 'NanumSquare',san-serif ;
    overflow: hidden;
    width: 100%;
}

    .board-theme .theme-list .list-categories {
        margin-bottom: 12px;
    }

        .board-theme .theme-list .list-categories .category-group {
            vertical-align: top;
        }

            .board-theme .theme-list .list-categories .category-group:hover button {
                background-color: #e6e6e6;
                border-color: #adadad;
            }

            .board-theme .theme-list .list-categories .category-group .category-btn {
                margin-bottom: 2px;
            }

            .board-theme .theme-list .list-categories .category-group .addon-btn {
                padding-left: 5px;
                padding-right: 5px;
            }

            .board-theme .theme-list .list-categories .category-group ul {
                min-width: 100%;
                padding: 0;
                margin: 0;
                border-radius: 0;
            }

                .board-theme .theme-list .list-categories .category-group ul li:last-child {
                    border-bottom: 0;
                }

                .board-theme .theme-list .list-categories .category-group ul li a {
                    cursor: pointer;
                    font-size: 12px;
                    padding: 6px 12px;
                }

                .board-theme .theme-list .list-categories .category-group ul li.selected a {
                    background: #eee;
                }

    .board-theme .theme-list table {
        border-top-width: 1px;
    }

        .board-theme .theme-list table th,
        .board-theme .theme-list table td {
            font-size: 14px;
            text-align: center;
            padding: 14px;
        }

        .board-theme .theme-list table th {
            background: #fcfcfc;
            border-bottom-width: 1px;
            min-width: 70px;
            font-size:17px;
        }

            .board-theme .theme-list table th.document-title {
                width: 50%;
            }

        .board-theme .theme-list table td.document-title {
            text-align: left;
        }

        .board-theme .theme-list table tr.notice td.document-no,
        .board-theme .theme-list table tr.notice td.document-title {
            font-weight: 600;
        }

        .board-theme .theme-list table tr td.document-added_file {
            padding-top: 5px;
            padding-bottom: 5px;
        }

            .board-theme .theme-list table tr td.document-added_file .file-ico {
                display: inline-block;
                width: 30px;
                height: 30px;
                background: #333;
                margin-top: 5px;
            }

        .board-theme .theme-list table th input,
        .board-theme .theme-list table td input {
            margin: 0;
        }

        .board-theme .theme-list table thead th.title {
            width: 50%;
        }

        .board-theme .theme-list table tbody td.document-title a {
            color: #333;
            text-align: left;
            font-size:17px;
        }

            .board-theme .theme-list table tbody td.document-title a:hover {
                text-decoration: underline;
            }

            .board-theme .theme-list table tbody td.document-title a.comment-count {
                color: #333;
                margin-left: 6px;
                text-decoration: none;
                font-weight: 600;
            }

        .board-theme .theme-list table tbody td.document-title span.file {
            color: #000;
            vertical-align: middle;
        }

        .board-theme .theme-list table tbody td.document-title span.reserved {
            background: #444;
            color: #fff;
            padding: 2px 4px;
            margin-left: 6px;
        }

    .board-theme .theme-list .document-title a.active {
        text-decoration: underline;
    }

    .board-theme .theme-list .no-document {
        text-align: center;
        padding: 21px 0;
    }

.board-theme.list .board-pages {
    padding: 21px 0 30px 0;
    text-align: center;
    max-width: 1040px;
    margin: 0 auto;
}

    .board-theme.list .board-pages > span {
        padding-left: 11px;
        padding-right: 11px;
    }

        .board-theme.list .board-pages > span.page {
            margin-bottom: 5px;
            cursor: pointer;
            font-size: 13px;
            border-radius: 0;
        }

.board-theme.gallery .theme-list table {
    margin-bottom: 15px;
}

.GalleryType{display: grid;grid-template-columns: repeat(auto-fill,minmax(min(100%,var(--width)),1fr));gap: var(--gap);--gap: 30px;--width: 20%;}
.board-theme.gallery .theme-list .GalleryType > .each-document {
    display: inline-block;
    vertical-align: top;
}

    .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image {
        display: inline-block;
        width: 100%;
        height:var(--height);
        --height:260px;
        position: relative;
        border: 1px solid #ddd;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: 50% 50%;
        background-color: #000;
        float:left;
    }
        .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image .document-checkbox{display: flex;z-index: 1;position: relative;}

        .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .no-image {
            position: absolute;
            left: 0;
            width: 100%;
            text-align: center;
            color: #333;
            margin-top: 0;
            height: 100%;
            top: 0;
            background: #eee;
        }

            .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .no-image span {
                position: absolute;
                top: 50%;
                left: 0;
                width: 100%;
                margin-top: -9px;
            }

        .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .list-items {
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.63);
            position: absolute;
            left: 0;
            top: 0;
            display: table;
            transition: opacity 0.21s;
            opacity: 0;
        }

        .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image:hover > .list-items {
            opacity: 1;
        }

        .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .list-items .items-wrapper {
            display: table-cell;
            color: #fff;
            vertical-align: middle;
        }

            .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .list-items .items-wrapper > .list-item {
                font-size:17px;
                display: block;
                text-align: center;
            }

                .board-theme.gallery .theme-list .GalleryType > .each-document > a.title-image > .list-items .items-wrapper > .list-item.title {
                    font-size: 16px;
                    margin-bottom: 4px;
                }

    .board-theme.gallery .theme-list .GalleryType > .each-document > a.title {
        width: 100%;
        display: block;
        overflow: hidden;
        text-align: center;
        color: #333;
        line-height:2;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size:16px;
        text-decoration:none;color:inherit;
    }

.board-theme.webzine .each-document {
    display: block;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    position: relative;
    height: 172px;
    transition: border 0.4s;
    margin-top: 15px;
    display: inline-block;
    width: 100%;
}

    .board-theme.webzine .each-document:first-child {
        margin-top: 0;
    }

    .board-theme.webzine .each-document:hover {
        border-color: #07c;
    }

    .board-theme.webzine .each-document span {
        display: block;
    }

    .board-theme.webzine .each-document > span {
        height: 100%;
    }

    .board-theme.webzine .each-document .list-img {
        height: 100%;
        background-size: auto 100%;
        background-repeat: no-repeat;
        background-position: 50% 50%;
        background-color: #eee;
        height: 170px;
    }

    .board-theme.webzine .each-document .list-content .top {
        color: #333;
        font-weight: bold;
        padding: 15px;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

        .board-theme.webzine .each-document .list-content .top .title {
            font-size: 16px;
            display: inline-block;
            width: 50%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .board-theme.webzine .each-document .list-content .top .date {
            float: right;
        }

        .board-theme.webzine .each-document .list-content .top .writer {
            float: right;
            margin-right: 10px;
        }

    .board-theme.webzine .each-document .list-content .content {
        padding: 50px 0 15px 0;
        height: 100%;
    }

        .board-theme.webzine .each-document .list-content .content .wrapper {
            height: 100%;
            display: block;
            overflow: hidden;
            width: 100%;
            display: -webkit-box;
            -webkit-line-clamp: 6;
            -webkit-box-orient: vertical;
        }

            .board-theme.webzine .each-document .list-content .content .wrapper img {
                display: none;
            }
/* board-list e */
/* board-detail s */
.board-theme .theme-detail .detail-top {
    background: #fbfbfb;
    padding: 14px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: inline-block;
    width: 100%;
}

    .board-theme .theme-detail .detail-top .document-title {
        float: left;
        color: #333;
        overflow: hidden;
        font-weight: 600;
        font-size:17px;
    }

        .board-theme .theme-detail .detail-top .document-title .category {
            margin-right: 3px;
        }

    .board-theme .theme-detail .detail-top .document-regdate {
        float: right;
        font-size:17px;
    }

.board-theme .theme-detail .detail-upper {
    padding: 8px 14px;
    border-bottom: 1px solid #eee;
    display: inline-block;
    width: 100%;
}

    .board-theme .theme-detail .detail-upper .document-writer {
        float: left;
        font-size:17px;
    }

    .board-theme .theme-detail .detail-upper .document-readed_count {
        float: right;
        font-size:17px;
    }

.board-theme .theme-detail .detail-video > * {
    margin-top: 12px;
}
.board-theme .theme-detail .donw-pdf{padding: 15px;font-size: 38px;cursor: pointer;
text-align: center;background-color: #fff;color: #fff;margin: 10px 0;border:2px solid #adadad;}
.board-theme .theme-detail .donw-pdf a{color:#000;text-decoration:none;}

.board-theme .theme-detail .detail-video > a.video-button {
    display: block;
    width: 100%;
    text-align: center;
    background: #4e4e4e;
    color: #fff;
    padding: 16px 0;
    border-radius: 2px;
    font-size: 14px;
    text-decoration: none;
}

.board-theme .theme-detail .detail-video .video-js {
    width: 100%;
    height: auto;
}

    .board-theme .theme-detail .detail-video .video-js .vjs-tech {
        height: auto;
        position: relative;
    }

.board-theme .theme-detail .detail-video iframe {
    width: 100%;
    height: 540px;
}

.board-theme .theme-detail .detail-audio > * {
    margin-top: 12px;
}

.board-theme .theme-detail .detail-audio-downlad {
    text-align: center;
    margin: 12px 0 21px 0;
}

    .board-theme .theme-detail .detail-audio-downlad > a {
        font-size: 14px;
        background: #07c;
        color: #fff;
        text-decoration: none;
        padding: 12px 24px;
        display: inline-block;
    }

.board-theme .theme-detail .detail-pdf iframe {
    width: 100%;
    height: 550px;
}

.board-theme .theme-detail .detail-content {
    padding: 14px;
    word-break: break-all;
    font-size: 13px;
}

    .board-theme .theme-detail .detail-content img {
        cursor: pointer;
    }
/* board-detail e */

/* board-write s */
.board-theme .theme-write {
    padding: 21px 21px 0 21px;
    background: #eee;
}

    .board-theme .theme-write .title-category {
        padding: 0;
    }

    .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 #ccc;
        }

            .board-theme .theme-write .document-extended_keys table tr {
                background: #f9f9f9;
            }

                .board-theme .theme-write .document-extended_keys table tr th {
                    font-size: 11px;
                    vertical-align: middle;
                }

                .board-theme .theme-write .document-extended_keys table tr td select,
                .board-theme .theme-write .document-extended_keys table tr td input {
                    font-size: 12px;
                }

                .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;
    }

        .board-theme .theme-write .document-content #cke_content {
            margin: 0 auto;
        }
/* board-write e */

/* =========================================
   🔥 TopBoard 완벽 복구 및 세련된 반응형 🔥
   ========================================= */
.TopBoard {
    margin-bottom: 40px;
    font-family: 'NanumSquare', sans-serif;
}

/* 탭 디자인 */
.TopBoard .BoardTab {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    border-bottom: 3px solid #5b9bd5; /* 파란색 라인 */
}
.TopBoard .BoardTab li { margin-right: 4px; }
.TopBoard .BoardTab li a {
    display: block;
    padding: 12px 25px;
    background-color: #b8b8b8; /* 비활성 회색 */
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.2s;
}
.TopBoard .BoardTab li.active a,
.TopBoard .BoardTab li a:hover {
    background-color: #5b9bd5; /* 활성 파란색 */
}

/* 회색 배경 영역 */
.TopBoard .tab-content {
    background-color: #f4f4f4;
    padding: 30px;
    border-radius: 0 0 8px 8px;
}

/* 내부 테이블 초기화 */
.TopBoard .tab-content table { width: 100%; border: none; border-collapse: collapse; }
.TopBoard .tab-content table th, 
.TopBoard .tab-content table td { padding: 0; border: none; text-align: left; background: transparent; }

/* 🌟 핵심: 2단 분리 및 1,3,5,7,9 세로 배열 🌟 */
.rank-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2단 구성 */
    grid-template-rows: repeat(5, auto);   /* 5줄 */
    grid-auto-flow: column;                /* 위에서 아래로 먼저 채움 (1,3,5.. 배열) */
    column-gap: 40px;                      /* 좌우 간격 */
    row-gap: 15px;                         /* 위아래 간격 */
}

.rank-item {
    display: flex;
    align-items: center;
    border-bottom: 1px dotted #ccc; /* 옅은 점선 (원본 느낌 살림) */
    padding-bottom: 10px;
}

.rank-item a {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: #000;
    font-size: 15px;
}
.rank-item a:hover .item-title { text-decoration: underline; }

/* 흰색 반원 랭킹 번호 */
.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: #fff;
    border-radius: 0 50% 50% 0; /* 우측만 둥글게 */
    font-weight: bold;
    font-size: 15px;
    color: #333;
    margin-right: 15px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

/* 말줄임표 처리되는 텍스트 */
.item-title {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    font-size:1.8rem;
    font-weight:bold;
}

/* 파란색 댓글 수 */
.item-count {
    color: #5b9bd5; 
    font-weight: bold;
    flex-shrink: 0;
}

@media(min-width:768px) {
    .board-theme .theme-write .title-category {
        padding-right: 15px;
    }
}


/* =========================================
   🔥 SNS 리스트 반응형 그리드 (PC3 / 테블릿2 / 모바일1 완벽 고정) 🔥
   ========================================= */
.sns-list-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    padding: 20px;
    background-color: #f0f2f5; 
}

@media (max-width: 992px) {
    .rank-container {
        grid-template-columns: 1fr; /* 1단으로 변경 */
        grid-auto-flow: row;        /* 다시 기본 순서로 변경 */
        row-gap: 12px;
    }
    .TopBoard .tab-content { padding: 20px 15px; }
    .TopBoard .BoardTab li a { font-size: 14px; padding: 10px 15px; }
    .sns-list-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .sns-list-container { grid-template-columns: 1fr; } 
}

/* 카드 디자인 */
.sns-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    box-sizing: border-box;
    transition: transform 0.2s ease;
    border: none;
    overflow: hidden;
    width: 100%;
}

.sns-card:hover { transform: translateY(-5px); }
.card-inner { padding: 20px; }

/* 헤더 & 제목 */
.card-header { margin-bottom: 15px; }
.card-header .writer { font-weight: 800; font-size: 15px; color: #1c1e21; display: block; } 
.card-header .date { font-size: 14px; color: #65676b; } 
.card-title { color: #1877f2; font-size: 18px; margin: 10px 0; font-weight: bold; line-height: 1.4; } 
.card-body a { text-decoration:none; color:inherit; }

/* 이미지 박스 */
.card-thumb { margin: 0 -20px 15px -20px; overflow: hidden; }
.card-thumb img { width: 100%; display: block; transition: scale 0.3s; }
.card-thumb img:hover { scale: 1.05; }


/* =========================================
   🔥 본문 애니메이션 및 그라데이션 복구 (사진 보임 유지) 🔥
   ========================================= */
.card-content-short {
    max-height: 140px; 
    overflow: hidden;
    font-size: 15px; 
    line-height: 1.6;
    color: #333;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 사진과 영상 등 미디어 파일 정상 노출 (숨기지 않음) */
.card-content-short img, 
.card-content-short iframe, 
.card-content-short video {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
}

/* 하단 부드러운 그라데이션 흐림 효과 완벽 복구 */
.card-content-wrapper:not(.expanded) .card-content-short {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

/* 펼쳐졌을 때 텍스트 높이 부드럽게 증가 및 마스크 해제 */
.card-content-wrapper.expanded .card-content-short {
    max-height: 5000px; 
    -webkit-mask-image: none;
    mask-image: none;
}


/* 더보기 버튼 (본문 바로 밑, 우측 정렬) */
.btn-content-more {
    text-align: right;
    color: #51b865; 
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    background: transparent;
    border: none;
}
.btn-content-more:hover { text-decoration: underline; }


/* =========================================
   🔥 푸터: [왼쪽 하트] / [오른쪽 댓글달기] 분리 배치 🔥
   ========================================= */
.card-footer {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ebedf0;
}

.card-footer .footer-left { display: flex; align-items: center; }
.card-footer .footer-right { display: flex; align-items: center; }

/* 연두색 하트(아멘) 버튼 */
.vote {
    color: #51b865;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.vote.voted { color: #28a745; }
.vote .vote-btn { display: flex; align-items: center; gap: 5px; }

/* 댓글달기 버튼 */
.btn-comment-toggle {
    color: #51b865; 
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    background: transparent;
    border: none;
    margin: 0;
}
.btn-comment-toggle:hover { text-decoration: underline; }

/* =========================================
   댓글 영역 디자인
   ========================================= */
.card-comment-section {
    display: none; 
    background: #fff; 
    padding: 0;
    margin: 15px -20px -20px -20px;
    border-top: 1px solid #ebedf0; 
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.card-comment-section .comment-list .each-comment {
    position: relative; 
    padding: 20px;
    border-bottom: 1px solid #f0f2f5; 
    display: block;
    margin: 0;
}
.card-comment-section .comment-list .each-comment:last-child {
    border-bottom: none; 
}

.card-comment-section .comment-list .list-writer { margin-bottom: 8px; padding-right: 80px; }
.card-comment-section .comment-list .list-writer b { font-weight: 800; font-size: 15px; color: #1c1e21; margin-right: 8px; }
.card-comment-section .comment-list .list-writer span { font-size: 14px; color: #8c939d; font-weight: normal; }

.card-comment-section .comment-list .list-content {
    font-size: 15px; 
    color: #333;
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap; 
}

.card-comment-section .comment-list .comment-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px; 
    color: #adb5bd; 
}
.card-comment-section .comment-list .comment-actions a { color: #1877f2; text-decoration: none; cursor: pointer; }
.card-comment-section .comment-list .comment-actions a:hover { text-decoration: underline; }

/* =========================================
   🔥 썸네일 & 본문 좌우 배치 (접기/펼치기 연동) 🔥
   ========================================= */
.content-flex-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 좌측 썸네일 영역 (접혀있을 때만 표시) */
.thumb-left {
    flex-shrink: 0;
    width: 180px;  /* 썸네일 가로 크기 (원하시는 크기로 조절) */
    height: 120px; /* 썸네일 세로 크기 */
    border-radius: 8px;
    overflow: hidden;
    display: block;
}
.thumb-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 우측 텍스트 영역 */
.content-flex-container .text-right-link {
    flex-grow: 1;
    display: block;
    min-width: 0; /* Flexbox 안에서 텍스트가 밖으로 삐져나가는 것 방지 */
}

/* 📌 중요 1: 접혀있을 때(not expanded) 본문 안의 원본 사진이나 영상은 숨김 처리
   (그래야 좌측 썸네일 + 우측 순수 텍스트의 깔끔한 구조가 유지됨) */
.card-content-wrapper:not(.expanded) .card-content-short img,
.card-content-wrapper:not(.expanded) .card-content-short iframe,
.card-content-wrapper:not(.expanded) .card-content-short video {
    display: none !important;
}

/* 📌 중요 2: 더보기 눌러서 펼쳐졌을 때 (.expanded) */
.card-content-wrapper.expanded .content-flex-container {
    display: block; /* Flex 가로 배치를 풀고 1단 위아래 구조로 변경 */
}
.card-content-wrapper.expanded .thumb-left {
    display: none; /* 펼치면 좌측 썸네일은 사라짐 */
}

/* 우측 텍스트 영역 묶음 */
.content-flex-container .text-right-wrapper {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content-flex-container .text-right-link {
    display: block;
    text-decoration: none;
    color: inherit;

}
/* =========================================
   🔥 공지사항 카드 스타일 (일반 글과 동일한 3칸/2칸/1칸 배열 유지) 🔥
   ========================================= */
.sns-card.notice-card {
    border: 2px solid #5b9bd5; /* 공지사항 파란색 강조 테두리 */
    background-color: #f4f9ff; /* 일반 글과 구분되는 옅은 배경색 */
}

/* [공지] 뱃지 디자인 */
.notice-badge {
    color: #d9534f;
    font-weight: 800;
    margin-right: 6px;
}