/* =====================================================================
   입찰정보 사이트 — 모듈 2 테마 스타일 (신뢰형 블루/네이비)
   허브 & 스포크 구조 공통 스타일시트
   ---------------------------------------------------------------------
   색상 토큰만 바꾸면 전체 톤 조정 가능. 나머지는 이 토큰을 참조.
   ===================================================================== */

:root {
  /* --- 신뢰형 블루/네이비 팔레트 --- */
  --bid-navy:        #0f2748;   /* 헤더·타이틀·강조 텍스트 */
  --bid-navy-deep:   #0a1c34;   /* 푸터·최고농도 */
  --bid-blue:        #1f5fbf;   /* 주 액션·링크 */
  --bid-blue-soft:   #eaf1fb;   /* 카드/배지 배경 */
  --bid-blue-line:   #cfe0f6;   /* 옅은 경계선 */
  --bid-accent:      #ffb020;   /* 마감임박 등 경고 포인트 (절제 사용) */
  --bid-danger:      #d9433f;   /* 오늘 마감 */
  --bid-ok:          #1f9d61;   /* 접수중 */

  --bid-ink:         #1b2733;   /* 본문 텍스트 */
  --bid-ink-soft:    #5a6b7b;   /* 보조 텍스트 */
  --bid-bg:          #ffffff;
  --bid-bg-alt:      #f6f8fb;   /* 섹션 교차 배경 */
  --bid-line:        #e3e9f0;

  --bid-radius:      10px;
  --bid-radius-sm:   6px;
  --bid-shadow:      0 1px 3px rgba(15,39,72,.08), 0 6px 18px rgba(15,39,72,.06);
  --bid-shadow-hover:0 4px 10px rgba(15,39,72,.12), 0 12px 30px rgba(15,39,72,.10);
  --bid-maxw:        1120px;
  --bid-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
              "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

/* --- 리셋 최소화 --- */
.bid-scope, .bid-scope * { box-sizing: border-box; }
.bid-scope { font-family: var(--bid-font); color: var(--bid-ink); line-height: 1.6; }
.bid-wrap { max-width: var(--bid-maxw); margin: 0 auto; padding: 0 20px; }
.bid-scope a { color: var(--bid-blue); text-decoration: none; }
.bid-scope a:hover { text-decoration: underline; }

/* =====================================================================
   1. 사이트 헤더 / 브랜드
   ===================================================================== */
.bid-topbar {
  background: var(--bid-navy);
  color: #dbe6f5;
  font-size: 13px;
}
.bid-topbar .bid-wrap { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.bid-topbar a { color: #dbe6f5; }

.bid-header {
  background: var(--bid-bg);
  border-bottom: 1px solid var(--bid-line);
  position: sticky; top: 0; z-index: 40;
}
.bid-header .bid-wrap { display: flex; align-items: center; gap: 28px; height: 66px; }
.bid-brand { font-size: 20px; font-weight: 800; color: var(--bid-navy); letter-spacing: -.4px; }
.bid-brand span { color: var(--bid-blue); }
.bid-nav { display: flex; gap: 20px; margin-left: auto; }
.bid-nav a { color: var(--bid-ink); font-weight: 600; font-size: 15px; }
.bid-nav a:hover { color: var(--bid-blue); text-decoration: none; }

/* =====================================================================
   2. 히어로 / 검색 (메인허브)
   ===================================================================== */
.bid-hero {
  background: linear-gradient(160deg, var(--bid-navy) 0%, var(--bid-navy-deep) 100%);
  color: #fff; padding: 54px 0 60px;
}
.bid-hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.5px; }
.bid-hero p { color: #b9cbe6; font-size: 16px; margin: 0 0 26px; max-width: 640px; }
.bid-search {
  display: flex; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: var(--bid-shadow); max-width: 680px;
}
.bid-search input { flex: 1; border: 0; padding: 16px 18px; font-size: 16px; outline: none; }
.bid-search button {
  border: 0; background: var(--bid-blue); color: #fff; font-weight: 700;
  padding: 0 26px; font-size: 16px; cursor: pointer;
}
.bid-search button:hover { background: #1a52a6; }
.bid-hero-stats { display: flex; gap: 26px; margin-top: 22px; color: #cdddf3; font-size: 14px; }
.bid-hero-stats b { color: #fff; font-size: 18px; }

/* =====================================================================
   3. 섹션 & 그리드
   ===================================================================== */
.bid-section { padding: 44px 0; }
.bid-section.alt { background: var(--bid-bg-alt); }
.bid-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.bid-section-head h2 { font-size: 21px; font-weight: 800; color: var(--bid-navy); margin: 0; letter-spacing: -.3px; }
.bid-section-head a.more { font-size: 14px; font-weight: 600; }

.bid-grid { display: grid; gap: 16px; }
.bid-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bid-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.bid-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px){ .bid-grid.cols-3,.bid-grid.cols-5{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 560px){ .bid-grid{grid-template-columns:1fr!important;} }

/* --- 기관유형 허브 카드 (5종) --- */
.bid-type-card {
  display: block; background: var(--bid-bg); border: 1px solid var(--bid-line);
  border-radius: var(--bid-radius); padding: 22px 18px; text-align: center;
  transition: .15s ease; box-shadow: var(--bid-shadow);
}
.bid-type-card:hover { transform: translateY(-2px); box-shadow: var(--bid-shadow-hover); text-decoration: none; border-color: var(--bid-blue-line); }
.bid-type-card .ic { font-size: 26px; }
.bid-type-card .nm { font-weight: 800; color: var(--bid-navy); margin: 8px 0 2px; font-size: 16px; }
.bid-type-card .ct { color: var(--bid-ink-soft); font-size: 13px; }

/* =====================================================================
   4. 공고 카드 / 리스트 (스포크 미리보기)
   ===================================================================== */
.bid-card {
  background: var(--bid-bg); border: 1px solid var(--bid-line);
  border-radius: var(--bid-radius); padding: 18px; box-shadow: var(--bid-shadow);
  transition: .15s ease; display: flex; flex-direction: column; gap: 10px;
}
.bid-card:hover { box-shadow: var(--bid-shadow-hover); border-color: var(--bid-blue-line); }
.bid-card .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.bid-card h3 { font-size: 16px; line-height: 1.45; margin: 0; }
.bid-card h3 a { color: var(--bid-navy); font-weight: 700; }
.bid-card .meta { color: var(--bid-ink-soft); font-size: 13px; display: flex; flex-wrap: wrap; gap: 12px; }
.bid-card .meta b { color: var(--bid-ink); font-weight: 600; }

/* 배지 */
.bid-badge {
  display: inline-block; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 999px; background: var(--bid-blue-soft); color: var(--bid-blue);
}
.bid-badge.type { background: #eef2f7; color: var(--bid-ink-soft); }
.bid-badge.deadline-ok    { background: #e5f6ee; color: var(--bid-ok); }
.bid-badge.deadline-soon  { background: #fff3dc; color: #b9791a; }
.bid-badge.deadline-today { background: #fbe6e5; color: var(--bid-danger); }
.bid-badge.deadline-closed{ background: #eef0f2; color: #97a2ad; }

/* 리스트형 (아카이브 기본) */
.bid-list { display: flex; flex-direction: column; gap: 12px; }

/* =====================================================================
   5. 개별공고 상세 (스포크)
   ===================================================================== */
.bid-single { padding: 30px 0 60px; }
.bid-breadcrumb { font-size: 13px; color: var(--bid-ink-soft); margin-bottom: 14px; }
.bid-breadcrumb a { color: var(--bid-ink-soft); }
.bid-single-head h1 { font-size: 25px; font-weight: 800; color: var(--bid-navy); line-height: 1.35; margin: 6px 0 14px; letter-spacing: -.4px; }
.bid-single-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.bid-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
@media (max-width: 900px){ .bid-layout{ grid-template-columns: 1fr; } }

/* 핵심정보 테이블 */
.bid-facts { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--bid-line); border-radius: var(--bid-radius); overflow: hidden; }
.bid-facts th, .bid-facts td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--bid-line); font-size: 15px; vertical-align: top; }
.bid-facts tr:last-child th, .bid-facts tr:last-child td { border-bottom: 0; }
.bid-facts th { width: 130px; background: var(--bid-bg-alt); color: var(--bid-ink-soft); font-weight: 700; white-space: nowrap; }
.bid-facts td b { color: var(--bid-navy); }

.bid-body { margin-top: 26px; font-size: 16px; }
.bid-body h2 { font-size: 18px; color: var(--bid-navy); margin: 26px 0 10px; }

.bid-attach { list-style: none; padding: 0; margin: 12px 0; }
.bid-attach li { padding: 10px 14px; border: 1px solid var(--bid-line); border-radius: var(--bid-radius-sm); margin-bottom: 8px; font-size: 14px; }
.bid-attach li::before { content: "📎 "; }

/* 원문 CTA */
.bid-cta-source {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bid-blue); color: #fff;
  font-weight: 700; padding: 13px 22px; border-radius: var(--bid-radius-sm); font-size: 15px;
}
.bid-cta-source:hover { background: #1a52a6; text-decoration: none; }
.bid-source-note { font-size: 12px; color: var(--bid-ink-soft); margin-top: 8px; }

/* --- 사이드바 --- */
.bid-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }
.bid-side-box { background: #fff; border: 1px solid var(--bid-line); border-radius: var(--bid-radius); padding: 18px; box-shadow: var(--bid-shadow); }
.bid-side-box h3 { margin: 0 0 12px; font-size: 15px; color: var(--bid-navy); font-weight: 800; }

/* 마감임박 문자알림 옵트인 (샌드랩스 배수관) */
.bid-alert-box { border: 1px solid var(--bid-blue-line); background: linear-gradient(180deg, #f4f8ff, #fff); }
.bid-alert-box .lead { font-size: 14px; color: var(--bid-ink); margin: 0 0 12px; }
.bid-alert-box .lead b { color: var(--bid-blue); }
.bid-alert-form input {
  width: 100%; border: 1px solid var(--bid-line); border-radius: var(--bid-radius-sm);
  padding: 11px 12px; font-size: 15px; margin-bottom: 8px; outline: none;
}
.bid-alert-form input:focus { border-color: var(--bid-blue); }
.bid-alert-form button {
  width: 100%; border: 0; background: var(--bid-blue); color: #fff; font-weight: 700;
  padding: 12px; border-radius: var(--bid-radius-sm); font-size: 15px; cursor: pointer;
}
.bid-alert-form button:hover { background: #1a52a6; }
.bid-alert-form .fine { font-size: 11px; color: var(--bid-ink-soft); margin: 8px 0 0; line-height: 1.5; }

/* 커뮤니티 유도 스레드 */
.bid-thread-cta { text-align: center; }
.bid-thread-cta p { font-size: 14px; color: var(--bid-ink-soft); margin: 0 0 12px; }
.bid-thread-cta a {
  display: inline-block; border: 1.5px solid var(--bid-blue); color: var(--bid-blue);
  font-weight: 700; padding: 10px 16px; border-radius: var(--bid-radius-sm); font-size: 14px;
}
.bid-thread-cta a:hover { background: var(--bid-blue-soft); text-decoration: none; }

/* =====================================================================
   6. 페이지네이션 / 필터 (아카이브)
   ===================================================================== */
.bid-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.bid-chip {
  border: 1px solid var(--bid-line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--bid-ink-soft); cursor: pointer;
}
.bid-chip.active, .bid-chip:hover { background: var(--bid-navy); color: #fff; border-color: var(--bid-navy); text-decoration: none; }
.bid-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.bid-pagination a, .bid-pagination span {
  min-width: 38px; text-align: center; padding: 8px 10px; border: 1px solid var(--bid-line);
  border-radius: var(--bid-radius-sm); font-size: 14px; font-weight: 600; color: var(--bid-ink);
}
.bid-pagination .current { background: var(--bid-blue); color: #fff; border-color: var(--bid-blue); }

/* =====================================================================
   7. 푸터
   ===================================================================== */
.bid-footer { background: var(--bid-navy-deep); color: #a8bcd6; padding: 40px 0 30px; font-size: 14px; margin-top: 40px; }
.bid-footer a { color: #cdddf3; }
.bid-footer .bid-wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.bid-footer h4 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.bid-footer ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
.bid-copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding-top: 18px; font-size: 12px; color: #7f93af; }

/* 유틸 */
.bid-muted { color: var(--bid-ink-soft); }
.bid-empty { text-align: center; padding: 50px 20px; color: var(--bid-ink-soft); }
