/* ===========================
   공지사항 페이지
   =========================== */

.news-section {
  background: var(--bg);
}

.news-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 24px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.news-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.news-table thead {
  background: var(--primary);
}

.news-table th {
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-align: left;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.th-num { width: 80px; }
.th-cat { width: 80px; }
.th-date { width: 120px; }

.news-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

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

.news-table tbody tr {
  transition: var(--transition);
}

.news-table tbody tr:hover {
  background: var(--gray-light);
}

.td-num {
  font-size: 13px;
  color: var(--gray);
}

.cat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.cat-badge.notice {
  background: var(--accent);
  color: var(--primary);
}

.cat-badge.news-cat {
  background: var(--primary);
  color: var(--white);
}

.td-title a {
  font-size: 15px;
  color: var(--text);
  display: block;
}

.td-title a:hover {
  color: var(--accent);
}

.td-date {
  font-size: 13px;
  color: var(--gray);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* MODAL */
.post-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.post-modal.open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,20,0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--white);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  border-radius: 8px;
  overflow-y: auto;
  margin: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 36px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 8px;
}

.modal-date {
  font-size: 13px;
  color: var(--gray);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray);
  cursor: pointer;
  padding: 4px;
  margin-left: 20px;
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 32px 36px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.modal-footer {
  padding: 20px 36px 32px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .news-table .th-num,
  .news-table .td-num {
    display: none;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}
