/* ==================================================
   TEXT BOARD SKIN — White Cube 스타일
   미니멀 타이포그래피 중심 게시판
   ================================================== */

/* ── 게시판 컨테이너 ── */
.bo-text {
    max-width: 1100px;
    margin: 80px auto 60px;
    padding: 0 24px;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

/* ── 헤더 ── */
.bo-text__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 2px solid #111;
    margin-bottom: 0;
}

.bo-text__header > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.bo-text__title {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #111;
    margin: 0;
}

.bo-text__count {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.05em;
    margin: 0;
}


/* ── 글쓰기 버튼 ── */
.bo-text__write-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #111;
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    border: 1px solid #111;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.bo-text__write-btn:hover {
    background: transparent;
    color: #111 !important;
}

/* ── 카테고리 ── */
.bo-text__cate {
    padding: 16px 0;
    border-bottom: 1px solid #e8e8e8;
}

.bo-text__cate ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
}

.bo-text__cate a {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.bo-text__cate a:hover,
.bo-text__cate a.on {
    color: #111;
}

/* ── 게시물 리스트 ── */
.bo-text__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bo-text__item {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.bo-text__item:hover {
    background: #fafafa;
}

.bo-text__item.is-notice {
    background: #fafaf5;
}

.bo-text__link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 18px 12px;
    text-decoration: none;
    gap: 24px;
}

.bo-text__subject {
    font-size: 1rem;
    font-weight: 400;
    color: #222;
    flex: 1;
    min-width: 0;
    line-height: 1.5;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bo-text__badge {
    display: inline-block;
    padding: 2px 8px;
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
}

.bo-text__comment {
    font-size: 0.8rem;
    color: #999;
    margin-left: 6px;
}

/* ── 메타 정보 ── */
.bo-text__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    font-size: 0.82rem;
    color: #aaa;
    white-space: nowrap;
}

.bo-text__name {
    color: #666;
    font-weight: 500;
    display: inline-block;
    width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.bo-text__date {
    display: inline-block;
    width: 80px;
    text-align: center;
}

.bo-text__hit {
    display: inline-block;
    width: 50px;
    text-align: right;
}


/* ── 빈 목록 ── */
.bo-text__empty {
    padding: 80px 0;
    text-align: center;
    color: #bbb;
    font-size: 0.95rem;
    font-style: italic;
}

/* ── 관리자 버튼 ── */
.bo-text__admin {
    display: flex;
    gap: 8px;
    padding: 16px 0;
}

.bo-text__admin input[type="submit"] {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bo-text__admin input[type="submit"]:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ── 페이지네이션 ── */
.bo-text__pages {
    text-align: center;
    padding: 40px 0 24px;
}

.bo-text__pages a,
.bo-text__pages strong {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 0.85rem;
    text-decoration: none;
    color: #888;
    margin: 0 2px;
    transition: all 0.2s;
}

.bo-text__pages a:hover {
    color: #111;
}

.bo-text__pages strong {
    color: #111;
    font-weight: 700;
    border-bottom: 2px solid #111;
}

/* ── 하단 버튼 ── */
.bo-text__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 24px;
}

.bo-text__btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    color: #666 !important;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s;
}

.bo-text__btn:hover {
    border-color: #111;
    color: #111 !important;
}

/* ── 게시판 공용 버튼 스타일 (View Page) ── */
.btn_b01, .btn_b02, .btn_admin {
    display: inline-block !important;
    padding: 8px 20px !important;
    font-size: 0.82rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    letter-spacing: 0.02em !important;
    vertical-align: middle !important;
    margin: 2px !important;
    font-weight: 400 !important;
}

.btn_b01 { /* 목록, 수정, 답변 등 기본 버튼 */
    background: #fff !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
}
.btn_b01:hover {
    border-color: #111 !important;
    color: #111 !important;
}

.btn_b02 { /* 글쓰기 등 강조 버튼 */
    background: #111 !important;
    color: #fff !important;
    border: 1px solid #111 !important;
}
.btn_b02:hover {
    background: transparent !important;
    color: #111 !important;
}

.btn_admin { /* 관리자 전용 버튼 */
    background: #fff !important;
    color: #900 !important;
    border: 1px solid #ecc !important;
}
.btn_admin:hover {
    background: #900 !important;
    color: #fff !important;
    border-color: #900 !important;
}

/* 리스트 버튼 오버라이드 유효하게 */
.bo_v_nb, .bo_v_com {
    list-style: none !important;
    padding: 0 !important;
    margin: 20px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
}
.bo_v_nb li, .bo_v_com li {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.bo_v_nb li a, .bo_v_com li a {
    width: auto !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

/* ── 첨부파일 폼 디자인 개선 ── */
input[type="file"].frm_file {
    padding: 8px;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    transition: all 0.2s;
    outline: none;
}

input[type="file"].frm_file:hover {
    border-color: #111;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 파일 선택 버튼 (Modern Button) */
input[type="file"].frm_file::file-selector-button {
    padding: 8px 18px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 3px;
    margin-right: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.2s;
}

input[type="file"].frm_file::file-selector-button:hover {
    background: #444;
}

/* ── 검색 ── */
.bo-text__search {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 24px 0 0;
    border-top: 1px solid #f0f0f0;
}

.bo-text__search select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 0.82rem;
    background: #fff;
    color: #555;
}

.bo-text__search input[type="text"] {
    padding: 8px 16px;
    border: 1px solid #ddd;
    font-size: 0.82rem;
    width: 200px;
    outline: none;
    transition: border-color 0.2s;
}

.bo-text__search input[type="text"]:focus {
    border-color: #111;
}

.bo-text__search button {
    padding: 8px 20px;
    background: #111;
    color: #fff;
    border: 1px solid #111;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bo-text__search button:hover {
    background: transparent;
    color: #111;
}

/* ── 모바일 반응형 (iPhone Safari 최적화) ── */
@media (max-width: 768px) {
    .bo-text {
        margin: 20px auto 40px !important;
        padding: 0 16px !important;
    }


    .bo-text__title {
        font-size: 1.4rem !important;
    }

    .bo-text__sep {
        margin-top: 30px !important;
        margin-bottom: 0 !important;
    }

    .bo-text__pages {
        padding-top: 10px !important;
    }



    .bo-text__count {
        font-size: 12px !important;
    }

    .bo-text__header {
        flex-direction: row !important;
        align-items: baseline !important;
        justify-content: flex-start !important;
        padding-bottom: 14px !important;
        gap: 12px !important;
        flex-wrap: wrap !important;
    }

    .bo-text__title {
        font-size: 1.4rem !important;
    }

    .bo-text__count {
        font-size: 12px !important;
        margin-top: 0 !important;
    }

    .bo-text__write-btn {
        padding: 6px 14px !important;
        font-size: 11px !important;
        flex-shrink: 0;
        margin-top: 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        margin-left: auto !important; /* Push write button to the right */
    }


    /* 제목 폰트 — px 단위로 강제 (Safari rem 이슈 방지) */
    .bo-text__subject {
        font-size: 13px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .bo-text__link {
        flex-direction: row !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 12px 8px !important;
    }

    /* 메타 고정 너비 — 항상 같은 위치 */
    .bo-text__meta {
        flex-shrink: 0 !important;
        gap: 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .bo-text__hit {
        display: none !important;
    }

    .bo-text__badge {
        font-size: 10px !important;
        padding: 1px 5px !important;
        margin-right: 4px !important;
    }

    .bo-text__comment {
        font-size: 11px !important;
    }

    .bo-text__footer {
        gap: 8px;
    }

    .bo-text__pages a,
    .bo-text__pages strong {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 12px;
    }

    .bo-text__search {
        flex-wrap: wrap;
    }

    .bo-text__search select,
    .bo-text__search input[type="text"] {
        font-size: 16px !important;
        /* Safari 자동확대 방지 */
    }

    .bo-text__search input[type="text"] {
        width: 100%;
    }
}