/* ===== 기본 설정 ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  background-color: #f2f4f7;
  color: #222;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 헤더 / 내비게이션 ===== */
.site-header {
  background-color: #2f6fed;
  color: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  opacity: 1;
}

.main-nav a.active {
  opacity: 1;
  border-bottom: 2px solid #fff;
}

/* ===== 본문 공통 ===== */
.content {
  padding: 36px 0 60px;
  min-height: calc(100vh - 64px - 64px);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

/* ===== 홈 화면 ===== */
.hero {
  background: linear-gradient(135deg, #2f6fed, #6a9bff);
  color: #fff;
  border-radius: 12px;
  padding: 48px 32px;
  margin-bottom: 32px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero p {
  margin: 0;
  opacity: 0.9;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
}

.section-title .more {
  font-size: 13px;
  color: #888;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

.preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.preview-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.preview-list li:last-child {
  border-bottom: none;
}

.preview-list .date {
  color: #999;
  font-size: 12px;
  white-space: nowrap;
  margin-left: 12px;
}

/* ===== 게시판 목록 ===== */
.board-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  background-color: #2f6fed;
  color: #fff;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #2459c9;
}

.btn-secondary {
  background-color: #fff;
  color: #444;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background-color: #f5f5f5;
}

table.board-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

table.board-table th {
  background-color: #f7f9fc;
  color: #555;
  font-weight: 600;
}

table.board-table td.title {
  text-align: left;
}

table.board-table td.title a:hover {
  color: #2f6fed;
}

table.board-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  background-color: #ffefe0;
  color: #d9682c;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination a {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 6px;
  font-size: 14px;
  color: #555;
}

.pagination a.current {
  background-color: #2f6fed;
  color: #fff;
}

/* ===== 글 상세보기 ===== */
.post-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.post-header h1 {
  font-size: 22px;
  margin: 0 0 10px;
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #888;
}

.post-body {
  min-height: 160px;
  font-size: 15px;
  color: #333;
  white-space: pre-line;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

/* ===== 글쓰기 폼 ===== */
.write-form .form-row {
  margin-bottom: 18px;
}

.write-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.write-form input[type="text"],
.write-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.write-form textarea {
  min-height: 280px;
  resize: vertical;
}

.write-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.hint {
  font-size: 13px;
  color: #999;
  margin-top: 16px;
  text-align: center;
}

/* ===== 푸터 ===== */
.site-footer {
  background-color: #fff;
  border-top: 1px solid #e6e6e6;
  text-align: center;
  padding: 22px 0;
  font-size: 13px;
  color: #999;
}
