/* =========================================================
   검색 폼 전용 스타일 (style.css 다음에 로드)
   - .search-form 안에서만 적용되므로 다른 페이지에는 영향 없음
   ========================================================= */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

.search-form {
  --sf-navy: #0b2a6b;
  --sf-navy-2: #123b8f;
  --sf-teal: #0f8fa8;
  --sf-teal-soft: #e3f4f7;
  --sf-ink: #1b2433;
  --sf-muted: #5b6678;
  --sf-line: #e1e7f0;
  --sf-bg: #f6f8fc;
  --sf-chip: #eef3fb;

  width: 96%;
  margin: 14px auto 28px;
  padding: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 28px rgba(16, 24, 40, .08);
  overflow: hidden;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.45;
  color: var(--sf-ink);
}

/* ---------- 헤더 ---------- */
.search-form .sf-head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 24px;
  color: #fff;
  background: linear-gradient(120deg, #0a2463 0%, #123b8f 55%, #0f8fa8 100%);
  overflow: hidden;
}
.search-form .sf-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C 150 0 300 60 450 30 S 750 0 900 30 S 1100 55 1200 25 V60 H0Z' fill='white' fill-opacity='.10'/%3E%3Cpath d='M0 42 C 200 18 350 62 600 40 S 1000 20 1200 44 V60 H0Z' fill='white' fill-opacity='.10'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.search-form .sf-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  opacity: .75;
}
.search-form .sf-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.search-form .sf-sub {
  margin: 0;
  font-size: 12.5px;
  opacity: .88;
}

/* ---------- 단계 공통 ---------- */
.search-form .form-section {
  margin: 0;
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--sf-line);
}
.search-form .sf-head + .form-section { border-top: none; }

.search-form .sf-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--sf-ink);
}
.search-form .sf-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sf-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.search-form .sf-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.search-form .sf-step-head .sf-step-title { margin: 0; }

/* 네이티브 라디오/체크박스는 숨기고 라벨로 표시 (키보드 접근은 유지) */
.search-form .sf-pills input,
.search-form #sourceOptions input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- 1. 자료 항목 (알약 버튼) ---------- */
.search-form .sf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-form .sf-pills label {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 14px;
  border: 1.5px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sf-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.search-form .sf-pills label:hover {
  border-color: #a9bbdd;
  color: var(--sf-navy);
}
.search-form .sf-pills label:has(input:checked) {
  background: var(--sf-navy);
  border-color: var(--sf-navy);
  color: #fff;
  box-shadow: 0 3px 8px rgba(11, 42, 107, .22);
}
.search-form .sf-pills label:has(input:focus-visible),
.search-form #sourceOptions label:has(input:focus-visible) {
  outline: 2px solid var(--sf-teal);
  outline-offset: 2px;
}

/* ---------- 2. 자료 소스 (칩) ---------- */
.search-form #sourceOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}
.search-form #sourceOptions label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px 4px 8px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: var(--sf-chip);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.search-form #sourceOptions label::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid #9aa8c0;
  border-radius: 4px;
  background: #fff center / 9px no-repeat;
  transition: background-color .15s, border-color .15s;
}
.search-form #sourceOptions label:hover { background: #e4ecf8; }
.search-form #sourceOptions label:has(input:checked) {
  background: var(--sf-teal-soft);
  border-color: var(--sf-teal);
  color: #0b5566;
}
.search-form #sourceOptions label:has(input:checked)::before {
  border-color: var(--sf-teal);
  background-color: var(--sf-teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.search-form .sf-ghost {
  padding: 4px 10px;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sf-navy);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.search-form .sf-ghost:hover {
  background: var(--sf-chip);
  border-color: #c5d3ea;
}

/* ---------- 3·4 단계 2열 배치 ---------- */
.search-form .sf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--sf-line);
}
.search-form .sf-row > .form-section { border-top: none; }
.search-form .sf-row > .form-section + .form-section { border-left: 1px solid var(--sf-line); }

/* ---------- 3. 기간 ---------- */
.search-form .date-selection {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 10px;
}
.search-form .date-selection label,
.search-form .sf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--sf-muted);
}
.search-form input[type="month"],
.search-form .coordinate-input input[type="text"] {
  font: inherit;
  font-size: 14px;
  color: var(--sf-ink);
  background: #fff;
  border: 1.5px solid var(--sf-line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-form input[type="month"] {
  min-width: 170px;
  padding: 8px 12px;
}
.search-form input[type="month"]:focus,
.search-form .coordinate-input input[type="text"]:focus {
  border-color: var(--sf-teal);
  box-shadow: 0 0 0 3px rgba(15, 143, 168, .15);
}
.search-form .sf-arrow {
  padding-bottom: 8px;
  font-size: 18px;
  color: #9aa8c0;
}

.search-form .sf-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.search-form .sf-presets button {
  padding: 5px 12px;
  border: 1px dashed #b9c6dd;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.search-form .sf-presets button:hover,
.search-form .sf-presets button.is-on {
  border-style: solid;
  border-color: var(--sf-teal);
  background: var(--sf-teal-soft);
  color: #0b5566;
}
.search-form .sf-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--sf-muted);
}

/* 연/월 드롭다운 */
.search-form .sf-ym {
  display: flex;
  gap: 6px;
}
.search-form .sf-ym select {
  font: inherit;
  font-size: 14px;
  color: var(--sf-ink);
  padding: 8px 30px 8px 12px;
  border: 1.5px solid var(--sf-line);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235b6678' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 12px no-repeat;
  transition: border-color .15s, box-shadow .15s;
}
.search-form .sf-ym select.sf-y { min-width: 104px; }
.search-form .sf-ym select.sf-m { min-width: 80px; }
.search-form .sf-ym select:focus {
  border-color: var(--sf-teal);
  box-shadow: 0 0 0 3px rgba(15, 143, 168, .15);
}
.search-form .sf-ym select.is-invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
}
.search-form .sf-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--sf-muted);
}

/* ---------- 4. 영역 (북·남·서·동 방향 배치) ---------- */
.search-form #periodSection {
  display: block;
  width: auto;
}
.search-form .coordinates {
  display: grid;
  grid-template-columns: 110px 60px 110px;
  grid-template-rows: auto auto auto;
  gap: 4px 8px;
  align-items: center;
  justify-items: center;
  width: auto;
  margin: 0;
}
.search-form .north      { grid-column: 2; grid-row: 1; }
.search-form .west       { grid-column: 1; grid-row: 2; }
.search-form .east       { grid-column: 3; grid-row: 2; }
.search-form .south      { grid-column: 2; grid-row: 3; }

.search-form .coordinate-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.search-form .coordinate-input label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--sf-ink);
}
.search-form .coordinate-input label small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--sf-muted);
}
.search-form .coordinate-input input[type="text"] {
  width: 84px;
  margin: 0;
  padding: 7px 8px;
  text-align: center;
}
.search-form .coordinate-input input.is-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

/* ---------- 검색 버튼 (맨 아래 줄) ---------- */
.search-form .form-section.search-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 18px;
  background: var(--sf-bg);
}
.search-form .sf-buttons {
  display: flex;
  gap: 8px;
}
.search-form .sf-summary {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--sf-muted);
}
.search-form .sf-summary b {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  color: var(--sf-ink);
}
.search-form .sf-summary b.is-empty { color: #b45309; border-color: #f5d0a0; background: #fff8ef; }
.search-form .search-button {
  flex: 0 0 260px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, #0a2463, #123b8f 60%, #0f8fa8);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(18, 59, 143, .28);
  transition: transform .12s, box-shadow .12s;
}
.search-form .search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 59, 143, .34);
}
.search-form .search-button:active { transform: translateY(0); }
.search-form .search-button svg { width: 18px; height: 18px; }

.search-form .reset-button {
  flex: 0 0 110px;
  width: auto;
  margin: 0;
  padding: 12px;
  border: 1.5px solid var(--sf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--sf-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.search-form .reset-button:hover { background: var(--sf-chip); }


/* =========================================================
   상단 헤더 · 소개 영역 (.nwp-header, .nwp-intro)
   ========================================================= */
header.nwp-header {
  display: flex;
  align-items: center;
  width: 96%;
  height: auto;
  margin: 0 auto 14px;
  padding: 14px 24px;
  text-align: left;
  color: #fff;
  background: linear-gradient(120deg, #071a4a 0%, #0b2a6b 45%, #123b8f 75%, #0f8fa8 100%);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 6px 18px rgba(11, 42, 107, .18);
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.3;
}
.nwp-header .nwp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nwp-header .nwp-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
}
.nwp-header .nwp-logo svg { width: 24px; height: 24px; }
.nwp-header h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
}
.nwp-header p {
  margin: 2px 0 0;
  font-size: 12.5px;
  opacity: .82;
}

.description-container.nwp-intro {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 14px;
  width: 96%;
  margin: 0 auto 14px;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.5;
}

/* 왼쪽 소개 카드 */
.nwp-intro .service-description {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  border: none;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(15, 143, 168, .14) 0%, rgba(15, 143, 168, 0) 55%),
    linear-gradient(160deg, #f3f7ff 0%, #e8f0fe 100%);
  box-shadow: inset 0 0 0 1px #dbe5f6;
  overflow: hidden;
}
.nwp-intro .nwp-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #0f8fa8;
}
.nwp-intro .service-description h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  color: #0b2a6b;
}
.nwp-intro .nwp-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: #334155;
}
.nwp-intro .nwp-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d4def0;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6678;
}

/* 오른쪽 서비스 카드 */
.nwp-intro .right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nwp-intro .nwp-services {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nwp-intro .nwp-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 16px rgba(16, 24, 40, .06);
  color: inherit;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.nwp-intro .nwp-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #0b2a6b;
}
.nwp-intro .nwp-card p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #5b6678;
}
.nwp-intro .nwp-card-links {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.nwp-intro .nwp-card-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  background: #eef3fb;
  color: #0b2a6b;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nwp-intro .nwp-card-links a:hover {
  background: #0b2a6b;
  color: #fff;
}
.nwp-intro .nwp-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 24px rgba(16, 24, 40, .10);
}
.nwp-intro .nwp-card-go {
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f8fa8;
}

/* 분석자료 동영상 버튼 */
.nwp-intro .custom-btn.nwp-video-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 12px;
  background: linear-gradient(120deg, #0a2463, #123b8f 60%, #0f8fa8);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(18, 59, 143, .22);
  transition: transform .12s, box-shadow .12s;
}
.nwp-intro .custom-btn.nwp-video-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 59, 143, .30);
}
.nwp-intro .nwp-video-btn svg { width: 16px; height: 16px; }
