/* Notice pages common styles */
:root{
  --fz-xxl: 40px; /* 가장 큰 제목 */
  --fz-xl: 30px;  /* 섹션 타이틀 */
  --fz-lg: 22px;  /* 블록 타이틀 */
  --fz-md: 16px;  /* 본문, 메타 */
}

/* Typographic scale helpers */
.fz-xxl{ font-size: var(--fz-xxl); }
.fz-xl{ font-size: var(--fz-xl); }
.fz-lg{ font-size: var(--fz-lg); }
.fz-md{ font-size: var(--fz-md); }
.notice-header { padding: 32px 0; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.notice-header .page-title { margin: 0; font-size: var(--fz-xl); font-weight: 700; color: #0f172a; }
.notice-header .page-subtitle { margin: 6px 0 0; color: #64748b; }
.notice-header .header-actions { margin-top: 12px; display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; border: 1px solid #1d4ed8; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: #0f172a; border: 1px solid #e5e7eb; }
.btn-outline:hover { background: #f9fafb; }

.notice-tabs { background: #ffffff; border-bottom: 1px solid #eef2f7; }
.notice-tabs .tab-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.notice-tabs .tab-item { padding: 12px 16px; cursor: pointer; color: #475569; border-bottom: 2px solid transparent; }
.notice-tabs .tab-item.active { color: #111827; border-bottom-color: #2563eb; font-weight: 600; }

.notice-search { display: flex; justify-content: end; padding: 16px 0; }
.search-form { display: flex; gap: 8px; }
.search-select, .search-input { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; }
.btn-search { padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: var(--color-main); cursor: pointer; }

.notice-list { margin-top: 8px; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.notice-item { display: grid; grid-template-columns: 80px 1fr 120px 100px; align-items: center; padding: 14px 16px; border-top: 1px solid #f1f5f9; }
.notice-item:first-child { border-top: 0; }
.notice-item:hover { background: #fafafa; }
.notice-item .notice-number { color: #64748b; text-align: center; font-weight: 600; }
.notice-item .notice-title { color: #0f172a; font-weight: 600; }
.notice-item .notice-date, .notice-item .notice-views { color: #64748b; text-align: center; }
.notice-item.notice-important { background: #f8fafc; }
.notice-item .notice-badge { margin-left: 8px; padding: 2px 6px; border-radius: 9999px; background: #fee2e2; color: #991b1b; font-size: 12px; font-weight: 700; }

.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 16px 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid #e5e7eb; align-items: center; justify-content: center; color: #0f172a; text-decoration: none; background:#fff; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.pagination .current { background: #2563eb; border-color: #2563eb; color: #fff; }
.pagination a:hover { background: #f8fafc; }
.pagination .prev, .pagination .next { font-weight: 700; }

/* View pagination (이전/다음 네비) */
.view-pagination, #boards-view-pagination {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap;
}
.view-pagination a, #boards-view-pagination a{
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid #e5e7eb; background:#fff; color:#0f172a; text-decoration: none;
}
.view-pagination a:hover, #boards-view-pagination a:hover{ background: #f8fafc; }

@media (max-width: 768px) {
  .notice-item { grid-template-columns: 60px 1fr; gap: 6px; }
  .notice-item .notice-date, .notice-item .notice-views { text-align: left; }
}

/* Table-style board (공지/뉴스 공통) */
.board-wrap { margin-top: 16px; background: #fff;  border-radius: 10px; overflow: hidden; }
.board-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.board-table thead th { background: #f8fafc; color: #0f172a; font-weight: 700; padding: 12px 10px; border-bottom: 1px solid #e5e7eb; font-size: var(--fz-md); }
.board-table tbody td { padding: 12px 10px; border-top: 1px solid #f1f5f9; font-size: var(--fz-md); color: #0f172a; }
.board-table tbody tr:hover { background: #fafafa; }
.board-col-no { width: 80px; text-align: center; color: #64748b; font-weight: 600; }
.board-col-title { width: auto; }
.board-col-writer { width: 140px; color: #475569; text-align: center; }
.board-col-views { width: 110px; color: #475569; text-align: center; }
.board-col-date { width: 140px; color: #475569; text-align: center; }
.board-badge-important { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 9999px; background: #fee2e2; color: #991b1b; font-size: 12px; font-weight: 700; vertical-align: middle; }
.board-notice { background: #f8fafc; }
.board-title-link { color: #0f172a; text-decoration: none; }
.board-title-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .board-col-writer { display: none; }
  .board-col-views { display: none; }
  .board-col-date { width: 120px; }
}

/* Boards scoped containers (IDs supplied in templates) */
#boards-header { padding: 36px 0; }
#boards-header .board-title { font-size: var(--fz-xl); font-weight: 800; color:#0f172a; margin: 0; }
#boards-header .board-subtitle { font-size: var(--fz-md); color:#64748b; margin-top: 6px; }
#boards-list-content { }
#boards-list-pagination { }
#boards-view-content { }
#boards-view-content .page-header .page-title { font-size: var(--fz-xl); font-weight: 800; color:#0f172a; margin: 0; }
#boards-view-content .page-header .page-subtitle { font-size: var(--fz-md); color:#64748b; margin-top: 6px; }

/* support both misspelled and corrected IDs to avoid breakage */
#boards-search-contaier, /* legacy typo */
#boards-search-container { padding: 16px 0; }

#boards-list { }
#gallery-view { }

/* list pagination spacing */
#boards-list-pagination { margin-top: 8px; }

/* Article (view) styles */
.notice-article { background:#fff; border:1px solid #e5e7eb; border-radius: 12px; padding: 20px 20px 50px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); margin:3rem 0rem}
.article-header { border-bottom:1px solid #e5e7eb; padding-bottom: 12px; margin-bottom: 16px; }
.article-category { display:inline-flex; align-items:center; height: 26px; padding: 0 10px; border-radius: 9999px; background:#eef2ff; color:#3730a3; font-size: 12px; font-weight:700; }
.article-title { margin: 8px 0 4px; font-size: var(--fz-xl); font-weight: 800; color:#0f172a; }
.article-meta { color:#64748b; font-size: var(--fz-md); }
.article-content { font-size: var(--fz-md); color:#0f172a; line-height: 1.8; }
.article-content img { max-width:100%; height:auto; border-radius: 8px; }
.article-footer { margin-top: 18px; display:flex; gap:8px; }

/* Related (images) */
.related-articles { margin-top: 16px; }
.related-articles > h3 { margin:0 0 10px 0; font-size: var(--fz-lg); color:#111827; }
.related-list { display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.related-item a { display:block; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; background:#f8fafc; }
.related-item img { width:100%; height:160px; object-fit:cover; display:block; }

/* Attachments */
#post-attachments { margin-top: 16px; }
#post-attachments h3 { margin:0 0 10px 0; font-size: var(--fz-lg); color:#111827; }
#post-attachments-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
#post-attachments-list li { border:1px solid #e5e7eb; border-radius:8px; background:#fff; }
#post-attachments-list a { display:flex; align-items:center; gap:10px; padding:10px 12px; text-decoration:none; color:#111827; }
