/*
 * 전통장발효연구원 게시판 스킨 CSS
 */

/* ===================================
   Board Common
   =================================== */
.board-wrap {
    max-width: 1200px;
    margin: 120px auto 80px;
    padding: 0 20px;
}

.board-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-primary-dark);
}

.board-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.board-desc {
    color: var(--text-medium);
}

/* ===================================
   Board List
   =================================== */
.board-list {
    border-top: 2px solid var(--color-primary-dark);
}

.board-list ul {
    display: flex;
    border-bottom: 1px solid #eee;
}

.board-list .list-header {
    background: var(--bg-cream);
    font-weight: 500;
}

.board-list .list-header li {
    padding: 15px 10px;
    text-align: center;
}

.board-list .list-row li {
    padding: 15px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-list .list-row:hover {
    background: var(--bg-cream);
}

.board-list .notice-row {
    background: #fffdf5;
}

/* Column widths */
.col-num { width: 80px; flex-shrink: 0; }
.col-subject { flex: 1; justify-content: flex-start !important; }
.col-name { width: 100px; flex-shrink: 0; }
.col-date { width: 100px; flex-shrink: 0; color: var(--text-light); }
.col-hit, .col-download { width: 80px; flex-shrink: 0; color: var(--text-light); }
.col-status { width: 90px; flex-shrink: 0; }

.col-subject a {
    color: var(--text-dark);
}

.col-subject a:hover {
    color: var(--color-accent);
}

/* Badges */
.badge-notice {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 3px;
}

.badge-new {
    display: inline-block;
    padding: 2px 6px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 3px;
    margin-left: 5px;
}

.cnt {
    color: var(--color-accent);
    margin-left: 5px;
    font-weight: 600;
}

.file-icon {
    color: var(--color-accent);
    margin-right: 8px;
}

/* Status badges */
.status-done {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 3px;
}

.status-wait {
    display: inline-block;
    padding: 4px 10px;
    background: #e0e0e0;
    color: var(--text-medium);
    font-size: 0.8rem;
    border-radius: 3px;
}

/* Secret */
.col-subject .fa-lock {
    color: var(--text-light);
    margin-right: 5px;
}

.secret-text {
    color: var(--text-light);
}

/* Empty */
.empty-list {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-light);
    border-bottom: 1px solid #eee;
}

/* ===================================
   Board Paging
   =================================== */
.board-paging {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.board-paging a,
.board-paging strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.board-paging a:hover {
    background: var(--bg-cream);
    border-color: var(--color-accent);
}

.board-paging strong {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* ===================================
   Board Bottom
   =================================== */
.board-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 20px;
}

.board-search form {
    display: flex;
    gap: 5px;
}

.board-search select,
.board-search input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.board-search input[type="text"] {
    min-width: 200px;
}

.board-search button {
    padding: 10px 15px;
    background: var(--color-primary-dark);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.board-search button:hover {
    background: var(--color-accent);
}

/* ===================================
   Board View
   =================================== */
.board-view .view-article {
    border-top: 2px solid var(--color-primary-dark);
    border-bottom: 1px solid #eee;
}

.view-header {
    padding: 25px 20px;
    background: var(--bg-cream);
    border-bottom: 1px solid #eee;
}

.view-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.view-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.view-info i {
    margin-right: 5px;
    color: var(--color-accent);
}

.view-file {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.view-file strong {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.view-file ul li {
    margin-bottom: 5px;
}

.view-file ul li a {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.view-file ul li a:hover {
    color: var(--color-accent);
}

.view-content {
    padding: 40px 20px;
    min-height: 200px;
    line-height: 1.8;
}

.view-content img {
    max-width: 100%;
    height: auto;
}

/* View Nav */
.view-nav {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.view-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-dark);
    border-bottom: 1px solid #f5f5f5;
}

.view-nav a:last-child {
    border-bottom: none;
}

.view-nav a:hover {
    background: var(--bg-cream);
}

.view-nav .label {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.view-nav .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* View Buttons */
.view-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
}

.view-buttons .btn-right {
    display: flex;
    gap: 10px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;
    color: var(--color-primary-dark);
    border: 1px solid var(--color-primary-dark);
    border-radius: 4px;
}

.btn-outline:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
}

.btn-secondary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-danger {
    display: inline-block;
    padding: 10px 25px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

/* ===================================
   Gallery Board
   =================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-thumb {
    position: relative;
    padding-top: 70%;
    overflow: hidden;
    background: var(--bg-cream);
}

.gallery-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-thumb img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 20px;
}

.gallery-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===================================
   Webzine Board
   =================================== */
.webzine-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.webzine-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: var(--transition);
}

.webzine-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent-light);
}

.webzine-thumb {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-cream);
}

.webzine-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webzine-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.webzine-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.webzine-content h3 a {
    color: var(--color-primary-dark);
}

.webzine-content h3 a:hover {
    color: var(--color-accent);
}

.webzine-excerpt {
    flex: 1;
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.webzine-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.webzine-meta i {
    margin-right: 5px;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
    .board-wrap {
        margin-top: 100px;
    }
    
    .board-header h2 {
        font-size: 1.5rem;
    }
    
    .board-list .list-header {
        display: none;
    }
    
    .board-list .list-row {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .board-list .list-row li {
        padding: 5px;
    }
    
    .col-num { width: auto; order: 1; }
    .col-subject { width: 100%; order: 3; margin-top: 10px; }
    .col-name { width: auto; order: 2; }
    .col-date { width: auto; order: 4; }
    .col-hit, .col-download { width: auto; order: 5; }
    .col-status { width: auto; order: 6; }
    
    .board-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    
    .board-search form {
        flex-wrap: wrap;
    }
    
    .board-search input[type="text"] {
        min-width: auto;
        flex: 1;
    }
    
    .webzine-item {
        flex-direction: column;
    }
    
    .webzine-thumb {
        width: 100%;
        height: 200px;
    }
    
    .view-info {
        gap: 10px;
    }
    
    .view-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-buttons .btn-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===================================
   기본 스킨(basic) 테마 스타일
   =================================== */

/* 공통 레이아웃 */
#bo_list, #bo_v, #bo_w {
    max-width: 1200px;
    margin: 120px auto 80px;
    padding: 0 20px;
}

/* 목록 테이블 스타일 */
#bo_list .tbl_head01 {
    border-top: 2px solid var(--color-primary-dark);
}

#bo_list .tbl_head01 thead th {
    background: var(--bg-cream);
    padding: 15px 10px;
    font-weight: 500;
    color: var(--color-primary-dark);
    border-bottom: 1px solid #ddd;
}

#bo_list .tbl_head01 tbody td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#bo_list .tbl_head01 tbody tr:hover {
    background: #fafafa;
}

#bo_list .bo_notice {
    background: var(--bg-cream);
}

#bo_list .notice_icon {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 3px;
}

#bo_list .new_icon {
    display: inline-block;
    padding: 2px 6px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 3px;
    margin-left: 5px;
}

#bo_list .cnt_cmt {
    color: var(--color-accent);
    font-weight: 600;
    margin-left: 5px;
}

/* 버튼 스타일 */
#bo_list .btn_bo_user,
#bo_v .btn_bo_user {
    display: flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#bo_list .btn_bo_user .btn,
#bo_v .btn_bo_user .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: var(--text-dark);
    transition: all 0.3s;
}

#bo_list .btn_bo_user .btn:hover,
#bo_v .btn_bo_user .btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* 페이지 정보 */
#bo_btn_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#bo_list_total {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* 검색 */
.bo_sch_wrap {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.bo_sch_bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.bo_sch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    z-index: 1001;
    min-width: 400px;
}

.bo_sch h3 {
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.bo_sch select,
.bo_sch .sch_input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.bo_sch select {
    margin-bottom: 10px;
    width: 100%;
}

.bo_sch .sch_bar {
    display: flex;
    gap: 10px;
}

.bo_sch .sch_input {
    flex: 1;
}

.bo_sch .sch_btn {
    padding: 10px 20px;
    background: var(--color-primary-dark);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.bo_sch .bo_sch_cls {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-medium);
}

/* 더보기 옵션 */
.more_opt {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 120px;
    list-style: none;
    margin: 0;
    padding: 5px 0;
}

.more_opt li a,
.more_opt li button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
}

.more_opt li a:hover,
.more_opt li button:hover {
    background: var(--bg-cream);
}

/* 글 읽기 페이지 */
#bo_v header {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-primary-dark);
}

#bo_v_title {
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    margin: 0;
}

.bo_v_cate {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 3px;
    margin-right: 10px;
}

#bo_v_info {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.profile_info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pf_img img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.profile_info_ct {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.8;
}

.profile_info_ct strong {
    color: var(--text-dark);
}

#bo_v_atc {
    padding: 30px 0;
}

#bo_v_con {
    line-height: 1.8;
    color: var(--text-dark);
}

#bo_v_con img {
    max-width: 100%;
    height: auto;
}

/* 추천/비추천 */
#bo_v_act {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.bo_v_good, .bo_v_nogood {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    border: 1px solid #ddd;
    border-radius: 25px;
    color: var(--text-dark);
}

.bo_v_good:hover, .bo_v_nogood:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* 첨부파일, 링크 */
#bo_v_file, #bo_v_link {
    padding: 20px;
    background: #f9f9f9;
    margin-bottom: 20px;
    border-radius: 4px;
}

#bo_v_file h2, #bo_v_link h2 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

#bo_v_file ul, #bo_v_link ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#bo_v_file li, #bo_v_link li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#bo_v_file li:last-child, #bo_v_link li:last-child {
    border-bottom: none;
}

/* 이전글/다음글 */
.bo_v_nb {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #eee;
}

.bo_v_nb li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.bo_v_nb .nb_tit {
    flex-shrink: 0;
    width: 80px;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.bo_v_nb a {
    flex: 1;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bo_v_nb a:hover {
    color: var(--color-accent);
}

.bo_v_nb .nb_date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 글쓰기 */
#bo_w .write_div {
    margin-bottom: 15px;
}

#bo_w .frm_input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#bo_w .frm_input:focus {
    outline: none;
    border-color: var(--color-accent);
}

#bo_w .half_input {
    width: calc(50% - 5px);
}

#bo_w .full_input {
    width: 100%;
}

#bo_w .bo_w_info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#bo_w .bo_v_option {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

#bo_w .chk_box {
    display: flex;
    align-items: center;
    gap: 5px;
}

#bo_w .wr_content {
    margin-top: 10px;
}

#bo_w .btn_confirm {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#bo_w .btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

#bo_w .btn_cancel {
    background: #fff;
    border: 1px solid #ddd;
    color: var(--text-dark);
}

#bo_w .btn_cancel:hover {
    border-color: var(--color-accent);
}

#bo_w .btn_submit {
    background: var(--color-primary-dark);
    border: none;
    color: #fff;
}

#bo_w .btn_submit:hover {
    background: var(--color-accent);
}

#bo_w #btn_autosave {
    margin-top: 10px;
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

#bo_w #autosave_pop {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

/* 파일 업로드 */
#bo_w .bo_w_flie {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

#bo_w .file_del {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* SNS 공유 */
#bo_v_share {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* 페이지네이션 */
.pg_wrap {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.pg_wrap .pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.pg_wrap .pg:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pg_wrap .pg_current {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
}

/* 반응형 */
@media (max-width: 768px) {
    #bo_list, #bo_v, #bo_w {
        margin-top: 100px;
    }
    
    #bo_btn_top {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    #bo_list .tbl_head01 thead {
        display: none;
    }
    
    #bo_list .tbl_head01 tbody tr {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }
    
    #bo_list .tbl_head01 tbody td {
        display: block;
        padding: 5px 0;
        border: none;
    }
    
    #bo_list .td_chk {
        position: absolute;
        right: 15px;
        top: 15px;
    }
    
    #bo_list .td_num2 {
        display: none;
    }
    
    #bo_w .half_input {
        width: 100%;
    }
    
    .bo_sch {
        min-width: auto;
        width: 90%;
        padding: 20px;
    }
    
    .profile_info {
        flex-direction: column;
        align-items: flex-start;
    }
}
