* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  background-color: #f4f6f9;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background-color: #1a3a5c;
  color: white;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .logo {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  letter-spacing: -0.5px;
}

header .logo span {
  color: #64b5f6;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

nav ul li a {
  display: block;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  color: #cfe3f8;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: rgba(255,255,255,0.15);
  color: white;
}

/* ── Hero (index only) ── */
.hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2e6da4 100%);
  color: white;
  text-align: center;
  padding: 4rem 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.85;
}

/* ── Main layout ── */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.2rem;
  color: #1a3a5c;
  border-left: 4px solid #2e6da4;
  padding-left: 0.75rem;
}

.section-header a.more-btn {
  font-size: 0.85rem;
  color: #2e6da4;
  text-decoration: none;
  border: 1px solid #2e6da4;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.section-header a.more-btn:hover {
  background-color: #2e6da4;
  color: white;
}

/* ── Index: two-column panels ── */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 700px) {
  .panels { grid-template-columns: 1fr; }
  nav ul { gap: 0; }
  nav ul li a { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
}

.panel {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* ── Post list ── */
.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eee;
  gap: 0.5rem;
}

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

.post-list li .post-title {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
  transition: color 0.15s;
}

.post-list li .post-title:hover { color: #2e6da4; }

.post-list li .post-date {
  font-size: 0.8rem;
  color: #999;
  flex-shrink: 0;
}

/* ── Board page ── */
.page-title {
  font-size: 1.5rem;
  color: #1a3a5c;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #2e6da4;
}

.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  gap: 0.5rem;
}

.search-wrap input {
  padding: 0.45rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  width: 200px;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input:focus { border-color: #2e6da4; }

.search-wrap button,
.btn {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s;
}

.search-wrap button { background: #2e6da4; color: white; }
.search-wrap button:hover { background: #1a3a5c; }

.btn-primary { background-color: #2e6da4; color: white; }
.btn-primary:hover { background-color: #1a3a5c; }

/* ── Table ── */
.board-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.board-table thead th {
  background-color: #1a3a5c;
  color: white;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.board-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}

.board-table tbody tr:last-child { border-bottom: none; }
.board-table tbody tr:hover { background-color: #f0f6ff; }

.board-table tbody td {
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  text-align: center;
}

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

.board-table tbody td.td-title a {
  text-decoration: none;
  color: #333;
  transition: color 0.15s;
}

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

/* Notice badge */
.badge-notice {
  display: inline-block;
  background-color: #e53935;
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
  font-weight: 700;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.4rem 0.85rem;
  border: 1px solid #ccc;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.pagination button:hover { border-color: #2e6da4; color: #2e6da4; }
.pagination button.current { background: #2e6da4; color: white; border-color: #2e6da4; }

/* ── Footer ── */
footer {
  background-color: #1a3a5c;
  color: #aac4e4;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.85rem;
}
