/* DIYING LAB — 공용 스타일 (index / notices / board) */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --card-bg: #ffffff;
  --text: #171a21;
  --sub: #667085;
  --border: #e7eaf0;
  --accent: #2f5fe0;
  --accent-soft: #eaf0ff;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-hover: 0 4px 10px rgba(16,24,40,.06), 0 16px 32px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

a { color: inherit; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav .logo {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-nav .logo .accent { color: var(--accent); }
.site-nav .links { display: flex; gap: 28px; }
.site-nav .links a {
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  color: var(--sub);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav .links a:hover,
.site-nav .links a.active {
  color: var(--text);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 20px 40px;
  background: radial-gradient(circle at 50% 0%, var(--accent-soft) 0%, rgba(255,255,255,0) 60%);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin: 0 0 16px;
  letter-spacing: -.03em;
  line-height: 1;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
}
.hero .sub { color: var(--sub); margin: 0; font-size: .95rem; }
@media (max-width: 560px) {
  .hero h1 { font-size: 2.15rem; }
}

/* ---------- Service cards (index) ---------- */
.grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 8px 0 56px;
}
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card .thumb {
  height: 140px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.card .thumb .emoji { font-size: 3rem; line-height: 1; }
.card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.card p { margin: 0; color: var(--sub); font-size: .88rem; line-height: 1.5; }
.card .tag {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Section shell (notices preview, page headers) ---------- */
.section {
  padding: 8px 0 56px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.section-head a.more { font-size: .85rem; color: var(--accent); text-decoration: none; font-weight: 600; }

.notice-list { border-top: 1px solid var(--border); }
.notice-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.notice-row .badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.notice-row .title { flex: 1; font-size: .92rem; font-weight: 500; }
.notice-row .date { flex-shrink: 0; font-size: .8rem; color: var(--sub); }

/* ---------- Page header (notices.html / board.html) ---------- */
.page-header { padding: 48px 20px 8px; }
.page-header h2 { margin: 0 0 6px; font-size: 1.8rem; font-weight: 900; letter-spacing: -.02em; }
.page-header p { margin: 0; color: var(--sub); font-size: .95rem; }

/* ---------- Notices page ---------- */
.notice-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.notice-card .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.notice-card .badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.notice-card .date { font-size: .8rem; color: var(--sub); }
.notice-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.notice-card p { margin: 0; color: var(--sub); font-size: .9rem; line-height: 1.7; }

/* ---------- Board (mockup) ---------- */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.btn-write {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.btn-write:hover { opacity: .9; }

.board-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.board-table thead th {
  text-align: left;
  color: var(--sub);
  font-weight: 600;
  font-size: .78rem;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.board-table thead th.num, .board-table thead th.views { text-align: center; width: 64px; }
.board-table tbody td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.board-table tbody td.num, .board-table tbody td.views { text-align: center; color: var(--sub); }
.board-table tbody tr:hover { background: var(--bg-soft); }
.board-table .post-title { display: flex; align-items: center; gap: 8px; }
.board-table .post-title:hover span:last-child { text-decoration: underline; }
.board-table .cat {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.board-table .comment-count { color: var(--accent); font-weight: 700; font-size: .78rem; }
.board-table .author { color: var(--sub); }

.pager {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-size: .85rem;
  color: var(--sub);
}
.pager span, .pager a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.pager span.active { background: var(--accent); color: #fff; font-weight: 700; }
.pager a:hover { background: var(--bg-soft); }

/* ---------- Write form ---------- */
.write-form { max-width: 640px; }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-row input,
.form-row select,
.form-row textarea {
  font-family: inherit;
  font-size: .92rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  resize: vertical;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-error { color: #dc2626; font-size: .85rem; margin: 0 0 14px; }
.form-actions { display: flex; gap: 10px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 22px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ---------- Post detail ---------- */
.post-detail { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 8px; }
.post-detail .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-detail .meta .cat {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 6px;
}
.post-detail .meta .date { font-size: .8rem; color: var(--sub); }
.post-detail h2 { margin: 0 0 10px; font-size: 1.4rem; font-weight: 800; }
.post-detail .author-line { color: var(--sub); font-size: .88rem; margin-bottom: 20px; }
.post-detail .post-content {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: .95rem;
  color: var(--text);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--sub);
  font-size: .8rem;
}
