/* main.css */

body {
  background: #f4f6f9;
}

.container {
  max-width: 1100px;
  margin: 28px auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* ── 상단 탭 ── */
.top-nav {
  display: flex;
  justify-content: flex-end;
  border-bottom: 2px solid #2c3e50;
  padding: 14px 24px 0;
  gap: 4px;
}

.top-nav a {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 18px;
  color: #888;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.top-nav a.active             { color: #2980b9; border-bottom-color: #2980b9; }
.top-nav a:hover:not(.active) { color: #1e293b; }

/* ── 본문 레이아웃 ── */
.main-wrapper {
  display: flex;
  gap: 0;
}

/* ── 사이드바 ── */
.sidebar {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid #eee;
  padding: 20px 16px;
}

.sidebar h3 {
  font-size: 15px;
  color: #444;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.sidebar ul { list-style: none; padding: 0; }
.sidebar li { padding: 8px 0; }

.sidebar a {
  text-decoration: none;
  color: #777;
  font-size: 14px;
  display: block;
  transition: color 0.15s;
}

.sidebar a:hover   { color: #2980b9; font-weight: bold; }
.sidebar a.current { color: #2980b9; font-weight: bold; }

/* ── 게시판 ── */
.content {
  flex: 1;
  min-width: 0; 
  padding: 20px 24px;
  overflow-wrap: break-word;
}

.content-header h2 {
  margin: 0 0 4px;
  color: #2c3e50;
  font-size: 18px;
}

.content-header p {
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* (수정!) 보드 크기 통일 */
}

.board-table th {
  background: #f8f9fa;
  border-top: 2px solid #333;
  border-bottom: 1px solid #ddd;
  padding: 12px;
  font-size: 14px;
  text-align: center;
}

.board-table td {
  border-bottom: 1px solid #eee;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  color: #1e293b;
}

/* (수정!) 컬럼 공간 크기 수정 */

/* 번호 */
.board-table th:nth-child(1),
.board-table td:nth-child(1) {
  width: 80px;
}

/* 구분 (핵심!) */
.board-table th:nth-child(2),
.board-table td:nth-child(2) {
  width: 150px;
}

/* 날짜 */
.board-table th:nth-child(4),
.board-table td:nth-child(4) {
  width: 150px;
}

/* 제목 */
.board-table td:nth-child(3) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.title-cell { text-align: left !important; }

.title-cell a {
  text-decoration: none;
  color: #34495e;
}

.title-cell a:hover {
  text-decoration: underline;
  color: #2980b9;
}

@media (max-width: 660px) {
  .main-wrapper { flex-direction: column; }
  .sidebar      { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid #eee; }
}
