/* ====================================================
   index.css  —  index.html 전용 스타일
   ==================================================== */

body { background: #f0f4f8; }

/* ── 헤더 (한 줄 통합, 스크롤 고정) ── */
.top-block {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #1a6cb5 0%, #0fa4c7 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.top-nav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 28px; height: 64px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img {
  height: 40px; width: 40px; object-fit: contain;
  border-radius: 8px; background: #fff; padding: 3px;
}
.hero-title { flex: 1; text-align: center; }
.hero-title h1 { font-size: 20px; font-weight: 700; letter-spacing: .3px; line-height: 1.2; }

/* ── 오른쪽 통계 뱃지 ── */
.right-controls { display: flex; align-items: center; gap: 6px; justify-self: end; }
.stat-badge {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.15); border-radius: 8px;
  padding: 4px 10px; cursor: pointer; transition: background .15s; min-width: 44px;
}
.stat-badge:hover { background: rgba(255,255,255,.25); }
.stat-badge.active { background: rgba(255,255,255,.3); outline: 1.5px solid rgba(255,255,255,.6); }
.stat-badge .num { font-size: 17px; font-weight: 700; line-height: 1.2; }
.stat-badge .lbl { font-size: 10px; color: rgba(255,255,255,.8); white-space: nowrap; }
.stat-sep { color: rgba(255,255,255,.3); font-size: 16px; padding: 0 2px; }

/* ── 검색 바 ── */
.filter-bar {
  background: #fff; border-bottom: 1px solid #dde3ea;
  display: flex; align-items: center; padding: 14px 32px;
}
.search-wrap { margin: 0 auto; position: relative; width: 100%; max-width: 280px; }
.search-wrap input {
  border: 1.5px solid #c8d5e8; border-radius: 24px;
  padding: 9px 18px 9px 40px; font-size: 14px; width: 100%;
  outline: none; background: #f8fafc;
}
.search-wrap input:focus { border-color: #1a6cb5; background: #fff; }
.search-wrap::before {
  content: '🔍'; position: absolute; left: 14px;
  top: 50%; transform: translateY(-50%); font-size: 13px;
}

/* ── 콘텐츠 영역 ── */
.content { max-width: 1280px; margin: 0 auto; padding: 28px 28px 48px; }

.section-head {
  display: flex; align-items: center; gap: 10px;
  margin: 32px 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid #1a6cb5;
}
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: 16px; font-weight: 700; color: #1a6cb5; }
.section-head .cnt {
  background: #1a6cb5; color: #fff;
  border-radius: 10px; padding: 1px 8px; font-size: 11px;
}

/* ── 카드 그리드 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.card {
  background: #fff; border: 1px solid #dde3ea; border-radius: 8px;
  overflow: hidden; transition: box-shadow .15s, transform .15s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: 0 4px 16px rgba(26,108,181,.15); transform: translateY(-2px); }
.card.empty { opacity: .4; filter: grayscale(20%); }
.card.empty:hover { opacity: .6; box-shadow: none; transform: none; }
.card.hidden { display: none; }

.card-head { padding: 14px 16px 10px; border-bottom: 1px solid #eef0f3; }
.card-head .name { font-size: 15px; font-weight: 700; color: #1a3a5c; }
.card-head .name small { display: block; font-size: 11px; font-weight: 400; color: #888; margin-top: 2px; }

.doc-links { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.doc-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 5px;
  font-size: 12px; color: #334; border: 1px solid #eaf0f8;
  background: #f8fafc; transition: background .12s;
}
.doc-link:hover { background: #dce8f5; border-color: #b0cce8; color: #1a6cb5; }
.doc-link.disabled { color: #bbb; pointer-events: none; background: #fafafa; border-color: #eee; }
.doc-link .icon { font-size: 14px; flex-shrink: 0; }
.doc-link .label { flex: 1; }
.doc-link .tag {
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: #e8f0f8; color: #1a6cb5; white-space: nowrap;
}
.doc-link .tag.pdf { background: #fde8e8; color: #9b1c1c; }

/* ── 모바일 반응형 ── */
@media (max-width: 640px) {
  .top-nav { padding: 0 14px; height: 56px; gap: 8px; }
  .hero-title h1 { font-size: 15px; }
  .stat-badge { padding: 3px 7px; min-width: 36px; }
  .stat-badge .num { font-size: 14px; }
  .stat-badge .lbl { font-size: 9px; }
  .stat-sep { display: none; }
  .filter-bar { padding: 10px 14px; }
  .content { padding: 14px 14px 80px; }
  .search-wrap input { font-size: 13px; }
  .grid { grid-template-columns: 1fr; }
}
