/* =========================================================
   FairPay — 공통 스타일시트
   외국인 노동자 임금체불 민원 지원 플랫폼
   ========================================================= */

/* ---- 다국어 폰트 ----------------------------------------
   한글(KR) + 라틴/베트남어(Noto Sans) + 태국어(Thai) + 크메르어(Khmer)
   브라우저가 글자별로 알맞은 폰트를 자동 선택합니다.            */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Sans:wght@400;500;700&family=Noto+Sans+Thai:wght@400;500;700&family=Noto+Sans+Khmer:wght@400;500&family=Noto+Sans+Devanagari:wght@400;500;700&family=Noto+Sans+Myanmar:wght@400;500;700&display=swap');

:root {
  /* 브랜드 색 */
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-50:     #eff6ff;
  --blue-100:    #dbeafe;

  --green:       #059669;
  --green-50:    #ecfdf5;
  --amber:       #ea580c;
  --amber-50:    #fff7ed;
  --purple:      #7c3aed;
  --purple-50:   #f5f3ff;

  /* 중립 */
  --ink:         #0f172a;
  --ink-2:       #475569;
  --ink-3:       #94a3b8;
  --line:        #e2e8f0;
  --line-2:      #cbd5e1;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --page:        #f8fafc;

  /* ---- 서브페이지 히어로 톤 ----
     진중한 다크 네이비 (사업소개·민원서류·노동법영상 등 서브페이지 공통).
     밝은 블루로 되돌리려면 아래 다크 3줄을 주석 처리하고 밝은 버전 주석을 해제하세요. */
  --hero-bg:     linear-gradient(135deg, #102347 0%, #0a1730 55%, #0e2142 100%);
  --hero-text:   #ffffff;
  --hero-sub:    #b6c2d9;
  /* 밝은 히어로 버전 ↓
  --hero-bg: var(--blue-50); --hero-text: var(--ink); --hero-sub: var(--ink-2);
  */

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg:   0 10px 30px rgba(15,23,42,.08);
  --ease:        .2s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans KR', 'Noto Sans', 'Noto Sans Thai', 'Noto Sans Khmer', 'Noto Sans Devanagari', 'Noto Sans Myanmar', sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- 헤더 ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.logo .name { font-size: 19px; font-weight: 700; line-height: 1.05; }
.logo .tag  { font-size: 10px; color: var(--ink-3); letter-spacing: .04em; background: none; padding: 0; border-radius: 0; backdrop-filter: none; }

.nav { display: flex; align-items: stretch; align-self: stretch; gap: 28px; }
.nav a {
  display: flex; align-items: center;
  font-size: 15px; color: var(--ink-2); font-weight: 500;
  position: relative; transition: color var(--ease);
}
.nav a:hover { color: var(--blue); }
.nav a.active { color: var(--blue); }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--blue);
  transform: scaleX(0); transition: transform var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* ---- 언어 전환 드롭다운 ---- */
.lang { position: relative; align-self: center; }
.lang-btn {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-dark);
  border: 1px solid var(--blue-100); font-size: 14px; font-weight: 500;
  transition: background var(--ease);
}
.lang-btn:hover { background: var(--blue-100); }
.lang-btn img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 200px; display: none;
}
.lang-menu.open { display: block; }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px;
  transition: background var(--ease);
}
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu img { width: 22px; height: 15px; border-radius: 2px; object-fit: cover; }

/* ---- 히어로 (서브페이지) ---- */
.hero {
  background: var(--hero-bg); color: var(--hero-text);
  text-align: center; padding: 64px 24px;
  min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.hero .badge {
  display: inline-block; font-size: 13px; font-weight: 500;
  color: #93c5fd; background: rgba(96,165,250,.16);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 38px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.hero p  { font-size: 16px; color: var(--hero-sub); }

/* ---- 섹션 헤더 (가운데) ---- */
.section-head { text-align: center; margin-bottom: 28px; }
.section-head .badge {
  display: inline-block; font-size: 13px; font-weight: 500;
  color: var(--blue-dark); background: var(--blue-50);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 12px;
}
.section-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.section-head p  { font-size: 15px; color: var(--ink-2); }

/* ---- 카드 ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.card.link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg); border-color: var(--line-2);
}

/* 아이콘 배지 */
.ibadge {
  width: 46px; height: 46px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
}
.ibadge.blue   { background: var(--blue-50);   color: var(--blue); }
.ibadge.green  { background: var(--green-50);  color: var(--green); }
.ibadge.amber  { background: var(--amber-50);  color: var(--amber); }
.ibadge.purple { background: var(--purple-50); color: var(--purple); }

/* 서비스 카드 그리드 */
.svc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.svc-card { padding: 26px; }
.svc-card .ibadge { margin-bottom: 16px; }
.svc-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.svc-card p  { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.svc-card .go {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 16px; font-size: 14px; font-weight: 500; color: var(--blue);
}
.svc-card .go i { transition: transform var(--ease); }
.svc-card.link:hover .go i { transform: translateX(4px); }

/* 통계 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; text-align: center;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--blue); }
.stat .lbl { font-size: 14px; color: var(--ink-2); margin-top: 4px; }

/* ---- 푸터 ---- */
.disclaimer {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; text-align: center;
  font-size: 14px; color: var(--ink-2);
}
.site-footer {
  text-align: center; padding: 32px 24px 48px;
  font-size: 13px; color: var(--ink-3); letter-spacing: .02em;
  border-top: 1px solid var(--line); background: var(--surface);
}
/* 운영·후원 기관 로고 */
.ft-logos { display: flex; align-items: center; justify-content: center; gap: 36px; margin-bottom: 22px; flex-wrap: wrap; }
.ft-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ft-cap { font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; }
.ft-logo img { display: block; width: auto; }
.ft-logo img.yiutsari { height: 52px; }
.ft-logo img.babo { height: 28px; margin: 12px 0; }
.ft-sep { width: 1px; height: 48px; background: var(--line); }
.ft-logos.intro { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 32px; box-shadow: var(--shadow); }
@media (max-width: 480px) {
  .ft-logos { gap: 24px; }
  .ft-logo img.yiutsari { height: 44px; }
  .ft-logo img.babo { height: 24px; margin: 10px 0; }
}

/* ---- 히어로 위로 걸치는 카드 ---- */
.overlap { margin-top: -52px; position: relative; z-index: 2; }

/* ---- 서류 작성 절차 ---- */
.process { padding: 24px 28px; }
.process .h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.process .h i { color: var(--blue); font-size: 20px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-50); color: var(--blue); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step.done .n { background: var(--green-50); color: var(--green); }
.step .t { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.step .d { font-size: 12.5px; color: var(--ink-2); }

/* ---- 서류 카드 ---- */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.doc-card { padding: 24px; display: flex; flex-direction: column; }
.doc-card .top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.doc-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.doc-card .desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; flex: 1; }
.doc-card .time { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-3); margin: 16px 0; }
.prio { font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px; }
.prio.req  { color: #dc2626; background: #fef2f2; }
.prio.rec  { color: var(--amber); background: var(--amber-50); }
.prio.opt  { color: var(--ink-2); background: var(--surface-2); }
.prio.ref  { color: var(--ink-3); background: var(--surface-2); }

.btn-primary {
  display: block; width: 100%; text-align: center; cursor: pointer;
  padding: 13px; border-radius: var(--radius-sm); border: none;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 700;
  font-family: inherit; transition: background var(--ease), transform var(--ease);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ---- 날짜 입력(type=date) 공통 ----
   ko 로케일에서 붙는 빈 요일 괄호 "( )" 제거 + 달력 아이콘 확대.
   ※ 괄호와 '-' 구분자가 같은 요소(::-webkit-datetime-edit-text)라
      괄호 제거 시 구분자는 공백으로 표시됩니다(연도 월 일). */
input[type="date"]::-webkit-datetime-edit-text { display: none; }
input[type="date"]::-webkit-calendar-picker-indicator {
  transform: scale(1.45);
  margin-left: 6px;
  cursor: pointer;
  opacity: .6;
  transition: opacity var(--ease);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ---- 언어 필터 ---- */
.filter-bar { padding: 18px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-bar .lbl { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.filter-bar .lbl i { color: var(--blue); }
.chip {
  cursor: pointer; padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: all var(--ease); font-family: inherit;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip .code { font-size: 11px; opacity: .6; margin-right: 4px; }
.chip.active .code { opacity: .85; }

/* ---- 영상 카드 ---- */
.vid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.vid-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.thumb { aspect-ratio: 16/10; position: relative; display: flex; align-items: center; justify-content: center; }
.thumb.t-blue   { background: #1e3a8a; }
.thumb.t-green  { background: #14543e; }
.thumb.t-amber  { background: #7c3a12; }
.thumb.t-purple { background: #4c1d95; }
.thumb.t-pink   { background: #831843; }
.thumb.t-teal   { background: #134e5a; }
.thumb .play {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  font-size: 24px; transition: transform var(--ease);
}
.vid-card.link:hover .play { transform: scale(1.1); }
.thumb .tags { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 500; color: #fff; background: rgba(0,0,0,.45);
  padding: 3px 9px; border-radius: 6px; backdrop-filter: blur(4px);
}
.vid-body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.vid-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.vid-body .desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; flex: 1; }
.vid-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.vid-meta span { display: flex; align-items: center; gap: 4px; }

/* ---- 반응형 ---- */
@media (max-width: 860px) {
  .svc-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .doc-grid, .vid-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .doc-grid, .vid-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .logo .tag { display: none; }
  .hero h1 { font-size: 30px; }
  .hero { padding: 48px 20px; }
}
@media (max-width: 480px) {
  .nav a:not(.active) { display: none; }
}

/* ---- 민원 접수 전송 (submit.js) ---- */
.fp-consent { margin-top: 10px !important; font-weight: 500 !important; align-items: flex-start !important; }
.fp-consent input { margin-top: 3px; flex-shrink: 0; }
.fp-consent-note { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0 28px; padding-left: 16px; line-height: 1.7; }
.fp-consent.need { color: #dc2626; }
.fp-consent.need input { outline: 2px solid #fca5a5; outline-offset: 2px; }
.fp-submit-status { margin: 16px auto 0; max-width: 560px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.7; text-align: left; }
.fp-submit-status.hidden { display: none; }
.fp-submit-status.wait { background: var(--blue-50); color: var(--blue-dark); }
.fp-submit-status.ok   { background: var(--green-50); color: #047857; border: 1px solid #a7f3d0; }
.fp-submit-status.ok span { font-size: 13px; color: var(--ink-2); }
.fp-submit-status.err  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.fp-submit-status .fp-retry { margin-left: 6px; padding: 3px 10px; border-radius: 6px; border: 1px solid #fca5a5; background: #fff; color: #b91c1c; font: inherit; font-size: 12.5px; cursor: pointer; }
.fp-submit-status .spin { display: inline-block; animation: fp-spin 1s linear infinite; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
@media print { .fp-submit-status { display: none !important; } }

/* ---- 관할 고용노동관서 (진정서 폼 · 관할 노동청 찾기) ---- */
.office-note { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.office-note:empty { display: none; }
.office-note i { color: var(--blue); margin-right: 3px; }
.office-note a { color: var(--blue); text-decoration: underline; }
.office-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--blue-100); background: var(--blue-50); border-radius: var(--radius); text-align: left; }
.office-card.hidden { display: none; }
.office-card .oc-ic { font-size: 26px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.office-card .oc-h { font-size: 12.5px; font-weight: 600; color: var(--blue-dark); }
.office-card .oc-name { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.office-card .oc-name small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); }
.office-card .oc-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--ink-2); }
.office-card .oc-meta a { color: var(--blue); font-weight: 700; }
.office-card .oc-find { display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; font-size: 13px; color: var(--blue); }
.office-card .muted { color: var(--ink-3); }
.office-card.compact { max-width: 560px; margin: 0 auto 16px; }
@media print { .office-card, .office-note { display: none !important; } }

/* ---- 개인정보 처리방침 링크 ---- */
.ft-links { margin-bottom: 8px; }
.ft-links a { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ft-links a:hover { color: var(--blue); text-decoration: underline; }
.fp-pp-link { display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 0 28px; font-size: 12.5px; color: var(--blue); text-decoration: underline; }
.intro-pp { font-size: 12.5px; color: var(--ink-3); text-decoration: underline; margin-top: -12px; }

/* ⚠️ 임시: 개인정보 처리방침(privacy.html) 공개 전까지 링크 숨김 — 처리방침 배포할 때 이 블록 삭제 */
.ft-links, .fp-pp-link, .intro-pp { display: none !important; }

/* ---- 관서 연락처 (팩스·이메일·주소) ---- */
.oc-ct { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 8px; font-size: 13px; }
.oc-ct dt { color: var(--ink-3); white-space: nowrap; }
.oc-ct dd { color: var(--ink-2); word-break: break-all; }
.oc-ct a { color: var(--blue); }
.office-card.compact .oc-ct { text-align: left; }

/* ---- 모바일 공식 양식 미리보기: A4 폭으로 그려 화면에 맞춰 축소 (docpdf.js) ---- */
.pv-fit { position: relative; }
.pv-fit.is-scaled { overflow: hidden; }
.pv-fit.is-scaled > .doc-paper { transform-origin: top left; max-height: none !important; overflow: visible !important; }
.pv-fit.is-zoom { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.pv-fit.is-zoom > .doc-paper { max-height: none !important; overflow: visible !important; border: none; box-shadow: none; }
.pv-zoom-btn { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 999px; cursor: pointer; }
.pv-zoom-btn.hidden { display: none; }
@media print {
  .pv-zoom-btn { display: none !important; }
  .pv-fit { height: auto !important; overflow: visible !important; border: none !important; }
  .pv-fit > #preview { transform: none !important; width: auto !important; }
}
/* 증빙 업로드 영역: label 이 inline 이면 줄바꿈 시 점선 테두리가 줄마다 끊김 → block */
.drop { display: block; line-height: 1.5; }
