/* 빈집에 관심 - Custom Styles */

/* ---- Base ---- */
body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  color: #222;
}

/* ---- Header / Nav ---- */
.site-header {
  background-color: #1e3a5f;
  background-image: linear-gradient(rgba(30,58,95,0.55), rgba(30,58,95,0.55)), url('../images/hero-illustration.svg');
  background-size: cover;
  background-position: center 62%;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  text-decoration: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
}

/* ---- Dropdown ---- */
.dropdown-menu {
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: #1e3a5f;
  font-size: 0.88rem;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: #f0f5fb;
}

/* ---- Post cards ---- */
.post-card {
  border: 1px solid #e8edf2;
  border-radius: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}

.post-card:hover {
  box-shadow: 0 6px 24px rgba(30, 58, 95, 0.12);
  transform: translateY(-2px);
}

/* ---- Category badge ---- */
.badge-category {
  background: #e8f0fb;
  color: #1e3a5f;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.badge-type {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.badge-type-보고서 { background: #fef3c7; color: #92400e; }
.badge-type-소식   { background: #dcfce7; color: #166534; }
.badge-type-정보   { background: #ede9fe; color: #5b21b6; }

/* ---- Sidebar ---- */
.sidebar-widget {
  border: 1px solid #e8edf2;
  border-radius: 10px;
  background: #fff;
}

.sidebar-widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a5f;
  border-bottom: 2px solid #1e3a5f;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

/* ---- Post content (markdown rendered) ---- */
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #1e3a5f;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose h2 { font-size: 1.35rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.3rem; }
.prose h3 { font-size: 1.15rem; }

.prose p {
  line-height: 1.85;
  margin-bottom: 1em;
  color: #333;
}

.prose a { color: #1e6aba; text-decoration: underline; }
.prose a:hover { color: #1e3a5f; }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1em;
}

.prose li { line-height: 1.8; margin-bottom: 0.25em; }

.prose blockquote {
  border-left: 4px solid #1e3a5f;
  padding: 0.5rem 1rem;
  color: #555;
  background: #f7f9fc;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.prose th, .prose td {
  border: 1px solid #dde3ea;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose th { background: #f0f5fb; font-weight: 600; color: #1e3a5f; }
.prose tr:hover td { background: #fafbfd; }

.prose code {
  background: #f3f4f6;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.85em;
  color: #c0392b;
}

.prose pre {
  background: #1e2d3d;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ---- Prev/Next nav ---- */
.post-nav-link {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: background 0.2s;
  display: block;
}

.post-nav-link:hover {
  background: #f0f5fb;
}

/* ---- Admin sidebar ---- */
.admin-sidebar {
  width: 220px;
  min-height: 100vh;
  background: #1e3a5f;
  flex-shrink: 0;
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---- Status badges in admin ---- */
.status-published { background: #dcfce7; color: #166534; }
.status-draft      { background: #f3f4f6; color: #6b7280; }

/* ---- Mobile hamburger ---- */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ---- Footer ---- */
.site-footer {
  background: #1e3a5f;
  color: rgba(255,255,255,0.7);
}

/* ---- EasyMDE tweaks ---- */
.EasyMDEContainer .CodeMirror {
  min-height: 340px;
  font-size: 0.95rem;
}
