/* board-style.css */


:root {
    --color-bg: #151515;
    --color-surface: #222;
    --color-header: #333;
    --color-border: #616161;
    --color-text-primary: #ffffff;
    /*--color-text-secondary: #ccc;*/
    --color-accent: #b50000;
    --color-accent-hover: #c62828;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: #ccc;
}


.board-main {
    width: 100%;
}

.board-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    margin-top:100px;
    margin-bottom:100px;
}


.board-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.board-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.board-header p {
    margin-top: 0.5rem;
    font-size: 1.1rem;    
    color: #ccc;
}

/* 모바일 화면용 (768px 미만) */
@media (max-width: 767px) {
    .board-container {
    margin-top:50px;
    }
    .board-header h1 {
        font-size: 2.5rem;
    }

}


.search-wrapper {
    width: 250px;
    margin: 20px auto;
    position: relative; /* 아이콘을 내부에 배치하기 위해 position 변경 */
}

.search-input {
    padding: 10px 40px 10px 15px;
    border-radius: 20px;
    border: 1px solid #555;
    background-color: #222;
    color: #fff;
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--color-accent);
}

.search-button {
    position: absolute; /* 버튼을 wrapper 내부에 절대 위치로 변경 */
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    background-color: transparent;
    color: #ccc;
    border: none;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.search-button:hover {
    color: var(--color-text-primary);
}

.search-button .icon {
    width: 1.25rem;
    height: 1.25rem;
}


.tab-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 20px;
    font-weight: 500;
    font-size:1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #333;
    color: #fff;
    border-radius: 8px;
}

.tab-button:hover {
 background-color: #b50000; 
}

.tab-button.active {
    background-color: #b50000; 
    color: #ffffff;
    font-weight: 700;
}

/* --- Table (Original Design) --- */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
}

.post-table {
    width: 100%;
    font-size: 0.875rem;
    text-align: center;
    border-collapse: collapse;
    table-layout: fixed;
}

.post-table thead tr {
    background-color: var(--color-header);
}

.post-table th, .post-table td {
    padding: 0.9rem 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-table th {
    font-weight: 500;
    color: #ccc;
}


/* ▼▼▼▼▼ [추가] PC 화면 테이블 컬럼 너비 ▼▼▼▼▼ */
.post-table th:nth-child(1) { width: 15%; } /* No */
.post-table th:nth-child(2) { width: 70%; } /* 제목 */
.post-table th:nth-child(3) { width: 15%; } /* 작성자 */
/* ▲▲▲▲▲ [추가] PC 화면 테이블 컬럼 너비 ▲▲▲▲▲ */


.post-table tbody tr {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-table tbody tr:hover {
    background-color: var(--color-header);
}

.post-table .post-title {
    color: var(--color-text-primary);
    font-weight: 500;
    text-align: left;
    padding-left: 1.5rem;
}

.post-table .no-posts td {
    padding: 2.5rem;
}

/* 모바일 화면용 (768px 미만) */
@media (max-width: 767px) {
    .table-container {
    margin:0px 10px;
}
    /* ▼▼▼▼▼ [추가] 모바일 화면 테이블 컬럼 너비 조정 ▼▼▼▼▼ */
    .post-table th:nth-child(1) { width: 20%; } /* No */
    .post-table th:nth-child(2) { width: 60%; } /* 제목 */
    .post-table th:nth-child(3) { width: 20%; } /* 작성자 */
    /* ▲▲▲▲▲ [추가] 모바일 화면 테이블 컬럼 너비 조정 ▲▲▲▲▲ */
}


/* --- 페이지네이션 --- */
.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.75rem;
}

.board-pagination button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    border: none;
    background-color: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.board-pagination button:hover {
    color: var(--color-accent);
}

.board-pagination button.active {
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.25rem; /* 네모 모양 */
}

.board-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


.detail-view.hidden {
    display: none;
}
.detail-view {
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
    padding: 5rem;
    background-color: var(--color-surface);
}

/* 모바일 화면용 (768px 미만) */
@media (max-width: 767px) {
    .detail-view {
    margin:0px 10px;
    padding: 2rem;
}
}



.detail-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #ccc;
    margin-top: 0.5rem;
}

.detail-content {
    color: #ccc;
    line-height: 1.7;
    min-height: 200px;
    overflow-wrap: break-word;
}
.detail-content p {
    margin-bottom: 1rem;
}

.detail-footer {
    text-align: center;
    margin-top: 2rem;
}

.button-primary {
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button-primary:hover {
    background-color: var(--color-accent-hover);
}


.menu-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    flex-wrap: wrap;
    gap: 20px;
}

.button-write {
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.button-write:hover {
    background-color: var(--color-accent-hover);
}

.detail-footer .admin-button-group {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle; /* 목록 버튼과 세로 정렬 */
}

.button-secondary, .button-danger {
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.button-secondary {
    background-color: #555;
    color: #fff;
}
.button-secondary:hover {
    background-color: #666;
}

.button-danger {
    background-color: transparent;
    border-color: #555;
    color: #ccc;
}
.button-danger:hover {
    background-color: var(--color-surface);
    color: #fff;
    border-color: #777;
}


/* ▼▼▼▼▼ 게시물 상세 뷰 이미지 스타일 ▼▼▼▼▼ */

.post-table .pinned-post:hover {
    background-color: #383838;
}

.post-table .pinned-post .post-title {
    font-weight: 700;
    color: #efefef;
}

.pinned-text {
    font-weight: 700;
    color: var(--color-accent);
}

/* listView 와 detailView를 숨기기 위한 스타일 */
.hidden {
    display: none !important;
}

/* 게시물 내부 이미지 스타일 */
.detail-image {
    max-width: 100%;
    height: auto;
    display: block; 
    margin: 3rem 0;  
}

.detail-image-link {
    display: inline-block;   
    line-height: 0;
    margin: 3rem auto; 
}

.detail-image-link .detail-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.detail-content a:not(.detail-image-link) {
    display: inline;    
    line-height: 1.7;   
    margin: 0;
    text-decoration: none;
}

/* ▼▼▼▼▼ 리뷰 게시판 특수 스타일 ▼▼▼▼▼ */

#detailView.review .detail-content p {
    text-align: center;
}

#detailView.review .detail-image{
    margin: 3rem auto; 
}

#detailView.review .detail-image-link {
    display: table;
    margin: 3rem auto; 
}

#detailView.review .detail-image-link .detail-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* ▲▲▲▲▲ 리뷰 게시판 특수 ▲▲▲▲▲ */

.detail-file-attachment{
    margin-top: 30px;
    padding: 20px; 
    border: 1px solid #fcfaf8; 
    border-radius: 8px; 
    background-color: #fcfaf8; 
}


.detail-file-attachment a{
    text-decoration:none;    
}
.detail-file-attachment a span{
    text-decoration:none !important;    
}

/* --- 게시판 상세 뷰 (동영상 반응형) --- */
.detail-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 20px 0; /* 위아래 여백 */
}

.detail-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.detail-content a:not(.detail-image-link) {
    line-height: 1.7 !important; 
}