/* ============================================================
   jobs.css — 일자리 카드 · 검색 · 필터 · 정렬 공통 스타일
   ------------------------------------------------------------
   사용처: jobs.html(랜딩) / jobs-all.html(전체목록) / test-card.html(검증)
   값은 기존 jobs.html 의 카드·검색·필터 스타일에서 그대로 승계했다.

   ⚠️ 이 파일에는 페이지 골격(body, 헤더, 푸터, 테스트 페이지 전용 UI)을
      넣지 않는다. 여러 페이지가 공유하는 컴포넌트 스타일만 둔다.
   ============================================================ */

/* ============================================================
   1. 디자인 토큰
   ============================================================ */
:root {
  /* 브랜드 */
  --brand:            #1e6091;   /* 메인 브랜드색 */
  --brand-light:      #2d8bc9;   /* 밝은 브랜드 파랑 */
  --brand-dark:       #174d77;   /* 검색 버튼 hover */
  --brand-tint:       #f0f7ff;   /* 연한 브랜드 배경 */
  --brand-tint-border:#d0e3f5;

  /* 검색 · 필터 */
  --input-bg:         #f8f9fa;   /* 검색 입력창 배경 */
  --chip-border:      #e9ecef;   /* 국가 칩 테두리 */
  --chip-text:        #495057;   /* 국가 칩 글자 */

  /* 지원하기 전용 오렌지 (다른 곳에는 쓰지 않는다) */
  --accent:           #ff6b35;
  --accent-end:       #f7931e;
  --accent-hover:     #e55a2b;
  --accent-hover-end: #e08319;

  /* 중립색 */
  --surface:          #ffffff;
  --page-bg:          #f4f7fa;
  --border:           #e8ecf1;
  --text:             #1a1a2e;
  --text-muted:       #555555;
  --text-subtle:      #666666;
  --tag-bg:           #f0f4f8;
  --tag-text:         #444444;
  --logo-bg:          #f8f9fa;

  /* D-day */
  --dday-urgent:      #dc3545;   /* 3일 이하 */
  --dday-normal-bg:   #ffc045;   /* 그 외 */
  --dday-normal-text: #333333;
  --dday-closed-bg:   #eceff1;   /* 마감 */
  --dday-closed-text: #78848c;

  /* NEW 배지 */
  --new-bg:           #e8f5e9;
  --new-text:         #2e7d32;

  /* 형태 */
  --radius-card:      16px;
  --radius-logo:      12px;
  --radius-btn:       10px;
  --radius-pill:      20px;
  --radius-tag:       16px;

  --shadow-card:      0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-card-hover:0 8px 30px rgba(0, 0, 0, 0.12);

  /* 간격 */
  --gap-xs:  4px;
  --gap-sm:  8px;
  --gap-md:  12px;
  --gap-lg:  16px;
  --gap-xl:  20px;

  /* 타이포 */
  --font-stack: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
                'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   2. 검색 + 국가 빠른 필터
   ============================================================ */
.search-filter {
  padding: 25px;
  margin-bottom: var(--gap-xl);
  background-color: var(--surface);
  border-radius: 15px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.search-bar {
  display: flex;
  margin-bottom: 25px;
  border-radius: var(--radius-btn);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.search-input {
  position: relative;
  flex-grow: 1;
  min-width: 0;
}

/* 두 입력창 사이 경계선 */
.search-input + .search-input { border-left: 1px solid var(--border); }

.search-input input {
  width: 100%;
  padding: 14px 20px 14px 45px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background-color: var(--input-bg);
  border: 2px solid transparent;
  transition: border-color .3s, background-color .3s;
}

.search-input input:focus {
  outline: none;
  border-color: var(--brand);
  background-color: var(--surface);
}

.search-input .icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
  pointer-events: none;
}

.search-btn {
  min-width: 100px;
  padding: 0 25px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: var(--brand);
  border: none;
  cursor: pointer;
  transition: background-color .3s;
}

.search-btn:hover { background-color: var(--brand-dark); }

.search-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* --- 국가 빠른 필터 칩 --- */
.country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.country-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--chip-text);
  white-space: nowrap;
  background: var(--surface);
  border: 2px solid var(--chip-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
}

.country-btn:hover {
  color: var(--brand);
  background: var(--brand-tint);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 96, 145, 0.15);
}

.country-btn[hidden] { display: none; }

/* 국기 — 이모지는 윈도우에서 'AU' 두 글자로 깨져서 SVG 이미지를 쓴다 */
.country-btn .flag {
  flex-shrink: 0;
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.country-btn .flag--all {
  width: auto;
  height: auto;
  font-size: 15px;
  box-shadow: none;
}

/* 공고 0건인 나라 — 눌러볼 수는 있게 두되 덜 도드라지게 */
.country-btn[data-count="0"] { opacity: .55; }

/* 칩 '더보기' */
.country-more {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: 2px dashed var(--chip-border);
  border-radius: 8px;
  cursor: pointer;
}

.country-more:hover { border-color: var(--brand); background: var(--brand-tint); }

.country-btn[aria-pressed="true"] {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(30, 96, 145, 0.3);
}

.country-btn[aria-pressed="true"]:hover {
  background: #0d5a8f;
  transform: translateY(-2px);
}

.country-btn .flag { font-size: 20px; }

.country-btn .count {
  font-size: 13px;
  font-weight: 400;
  opacity: .75;
  font-variant-numeric: tabular-nums;
}

.country-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ============================================================
   3. 상세 필터 사이드바 + 목록 2단 레이아웃
   ============================================================ */
.jobs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--gap-lg);
  align-items: start;
}

/* 랜딩은 3단 [필터 | 목록 | 우측 사이드바] */
.jobs-layout--3col { grid-template-columns: 232px minmax(0, 1fr) 260px; }

.filters {
  padding: 18px;
  background-color: var(--surface);
  border-radius: 15px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: var(--gap-lg);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-lg);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--border);
}

.filters-head strong { font-size: 16px; }

.link-btn {
  padding: 4px 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.link-btn:hover { background-color: var(--brand-tint); }

.link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.filter-section {
  margin-bottom: 25px;
  padding-bottom: var(--gap-xl);
  border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: normal;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .3s;
}

.checkbox-group label:hover { background-color: var(--input-bg); }

/* 조건상 0건인 항목 — 사라지지 않고 자리를 지키되 흐리게 (쇼핑몰 필터 방식) */
.checkbox-group label.is-empty { opacity: .45; }

.checkbox-group input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: var(--brand);
}

.checkbox-group .facet-label {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkbox-group .facet-count {
  flex-shrink: 0;
  margin-left: var(--gap-sm);
  font-size: 12px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

/* 지역 select · 급여 입력 */
.filter-field {
  width: 100%;
  padding: 12px 15px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color .3s, background-color .3s;
}

.filter-field:focus {
  outline: none;
  border-color: var(--brand);
  background-color: var(--surface);
}

.salary-range {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.salary-range .filter-field { width: 100%; }

.salary-range .dash { color: var(--text-subtle); }

.salary-unit {
  margin: var(--gap-sm) 0 0;
  font-size: 12px;
  color: var(--text-subtle);
}

/* 모바일 필터 토글 (jobs.html 의 .filter-toggle-btn 승계) */
.filter-toggle-btn {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--gap-xl);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  background-color: var(--surface);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: box-shadow .3s;
}

.filter-toggle-btn:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12); }

.filter-toggle-btn .icon { font-size: 20px; transition: transform .3s; }

.filter-toggle-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }

.filter-toggle-btn .badge {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  color: #fff;
  background-color: var(--brand);
  border-radius: 12px;
}

.filter-toggle-btn .badge[hidden] { display: none; }

/* 좁은 화면: 사이드바를 접이식으로 (jobs.html 과 같은 방식) */
@media (max-width: 900px) {
  .jobs-layout { grid-template-columns: minmax(0, 1fr); }

  .filter-toggle-btn { display: flex; }

  .filters {
    position: static;
    max-height: none;
    margin-bottom: var(--gap-xl);
  }

  .filters[hidden] { display: none; }
}

/* ============================================================
   4. 결과 머리말 — 정렬 · 리스트/지도 전환 · 빈 상태
   ============================================================ */
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.results-tools {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.sort-options { display: flex; align-items: center; }

.sort-label {
  margin-right: 10px;
  font-size: 14px;
  color: var(--text-subtle);
}

.sort-select {
  padding: 10px 15px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .3s;
}

.sort-select:focus { outline: none; border-color: var(--brand); }

/* 리스트 / 지도 전환 */
.view-toggle {
  display: flex;
  padding: 3px;
  background-color: var(--input-bg);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  gap: 3px;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-subtle);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.view-btn:hover { color: var(--brand); background-color: var(--brand-tint); }

.view-btn[aria-pressed="true"] {
  color: var(--brand);
  background-color: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.view-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.result-count {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.result-count strong { color: var(--brand); font-size: 16px; }

.empty-state {
  padding: 56px 20px;
  text-align: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.empty-state p {
  margin: 0 0 var(--gap-lg);
  font-size: 15px;
  color: var(--text-muted);
}

/* --- 더보기 / 페이지 번호 (jobs.html 의 .pagination 값 승계) --- */
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: var(--gap-xl) auto 0;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  background-color: var(--surface);
  border: 2px solid var(--brand);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color .3s, color .3s;
}

.load-more-btn:hover { background-color: var(--brand); color: #fff; }

.load-more-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.pagination {
  display: flex;
  flex-wrap: nowrap;          /* 축약형이라 한 줄에 들어간다 */
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 8px;
}

.pagination-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination-item:hover {
  background-color: var(--brand-tint);
  color: var(--brand);
  border-color: var(--brand);
}

.pagination-item.active {
  background-color: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.pagination-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 첫/끝 페이지에서 이전·다음 */
.pagination-item[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-nav { font-size: 20px; line-height: 1; }

/* 생략 표시 — 버튼이 아니라 글자라 클릭되지 않는다 */
.pagination-ellipsis {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  color: var(--text-subtle);
  user-select: none;
}

@media (max-width: 576px) {
  /* 페이지 수가 많아도 줄바꿈 대신 이 줄 안에서만 스크롤되게 (본문은 안 밀림) */
  .pagination {
    gap: 5px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .pagination::-webkit-scrollbar { display: none; }

  .pagination-item {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 14px;
  }

  .pagination-ellipsis { width: 18px; }
}

/* 목록을 불러오는 중 / 불러오기 실패 (WJH.ui.renderStatus) */
.list-status {
  padding: 56px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.list-status.is-error { color: var(--dday-urgent); }

@media (max-width: 768px) {
  .search-filter { padding: 16px; }

  /* 입력창 2개 + 버튼을 세로로 */
  .search-bar {
    flex-direction: column;
    box-shadow: none;
    gap: var(--gap-sm);
    overflow: visible;
  }

  .search-input input {
    border: 2px solid var(--border);
    border-radius: var(--radius-btn);
    font-size: 15px;
  }

  .search-input + .search-input { border-left: none; }

  .search-btn {
    padding: 13px 25px;
    border-radius: var(--radius-btn);
  }

  .country-chips { gap: var(--gap-sm); }

  .country-btn {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .country-btn .flag { font-size: 17px; }
}

@media (max-width: 576px) {
  .results-head { align-items: stretch; }
  .results-tools { width: 100%; justify-content: space-between; }
  .sort-label { display: none; }          /* 좁은 화면에서는 select 자체로 충분 */
  .sort-select { max-width: 160px; }
  .view-btn { padding: 7px 10px; font-size: 13px; }
}

/* ============================================================
   4-2. 광고 슬롯 (브랜드관 · 인기 공고관 · 적극 채용중 · 검증 공고)
   ============================================================ */
.ad-slot { margin-bottom: 18px; }

.ad-slot:last-child { margin-bottom: 0; }

.ad-slot__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.ad-slot__title {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.ad-slot__tag {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
  background-color: var(--tag-bg);
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.ad-slot__nav { display: flex; gap: var(--gap-sm); }

.ad-slot__arrow {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  color: var(--text-subtle);
  background-color: var(--surface);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}

.ad-slot__arrow:hover {
  color: var(--brand);
  border-color: var(--brand);
  background-color: var(--brand-tint);
}

.ad-slot__arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 위 → 아래 → 다음 열 순서로 2줄 배치되는 가로 스크롤 */
.ad-slot__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--gap-md);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* ⚠️ scroll-behavior: smooth 를 여기 두지 않는다.
     애니메이션을 끈 환경(자동화 브라우저, 접근성 설정 등)에서는 부드러운 스크롤
     요청이 통째로 무시되어 화살표가 아예 안 먹는다.
     부드러움은 JS 에서 시도하고, 안 되면 즉시 이동으로 되돌린다. */
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.ad-slot__track > * { scroll-snap-align: start; }

/* --- 광고 카드 --- */
.ad-card {
  position: relative;               /* 순위 배지(.ad-card__rank) 기준 */
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

/* ── 슬롯별 변형 ── */

/* 브랜드관: 로고를 크게 강조 (브랜드 노출 중심) */
.ad-card--brand .ad-card__logo { width: 72px; height: 72px; font-size: 30px; }

/* 인기공고: 노출 순서 순위 번호. 트랙이 세로도 클립하므로 카드 안쪽에 둔다 */
.ad-card__rank {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background-color: var(--brand);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* 적극채용: "즉시 채용" 배지 (검증 배지와 같은 줄, 빨강 강조) */
.ad-card__urgent {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background-color: #e5484d;
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}

.ad-card__logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--brand);
  background-color: var(--logo-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.ad-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.ad-card__body { min-width: 0; flex-grow: 1; }

.ad-card__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ad-card__title a { color: inherit; text-decoration: none; }
.ad-card__title a:hover { color: var(--brand); }

.ad-card__company {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.ad-card__verified {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--new-text);
  background-color: var(--new-bg);
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.ad-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  font-size: 12px;
  color: var(--text-subtle);
}

.ad-card__salary { font-weight: 700; color: var(--brand); }

/* --- 광고주가 없을 때 --- */
/* 빈 슬롯 — 광고주가 없을 때. 한 줄짜리 컴팩트 배너(과한 여백 금지) */
.ad-slot__empty {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: 10px 14px;
  text-align: left;
  background-color: var(--input-bg);
  border: 1px dashed var(--chip-border);
  border-radius: 10px;
}

.ad-slot__empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.ad-slot__empty-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-slot__empty-link {
  display: inline-block;
  flex-shrink: 0;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;          /* <button> 은 폰트를 상속하지 않는다 */
  white-space: nowrap;
  cursor: pointer;
  color: var(--brand);
  text-decoration: none;
  background-color: var(--surface);
  border: 1px solid var(--brand);
  border-radius: var(--radius-btn);
  transition: background-color .2s, color .2s;
}

.ad-slot__empty-link:hover { background-color: var(--brand); color: #fff; }

/* 제휴·배너 광고 문의 — 광고 영역 하단, 눈에 띄지 않게 */
.ad-affiliate {
  margin: var(--gap-md) 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-subtle);
}
.ad-affiliate a { color: var(--text-muted); text-decoration: underline; }
.ad-affiliate a:hover { color: var(--brand); }

@media (max-width: 768px) {
  /* 좁은 화면은 손가락으로 넘긴다 */
  .ad-slot__nav { display: none; }
  .ad-slot__track { grid-auto-columns: minmax(220px, 80%); }
  .ad-slot__title { font-size: 15px; }
}

/* ============================================================
   5. 공고 카드
   ============================================================ */
.job-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 190px;
  gap: var(--gap-md);
  align-items: start;
  padding: var(--gap-md);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}

/* 만료된 공고는 채도를 낮춰 목록에서 구분되게 한다 */
.job-card.is-closed { opacity: .72; }
.job-card.is-closed:hover { opacity: 1; }

/* --- 로고 --- */
.job-card__logo {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--logo-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-logo);
  overflow: hidden;
  font-size: 20px;
  line-height: 1;
  color: var(--brand);
}

.job-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 로고 비율 유지 — 잘리거나 늘어나지 않게 */
  padding: 6px;
}

/* --- 본문 --- */
.job-card__main { min-width: 0; padding-right: 28px; }

.job-card__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  /* 아주 긴 제목이 카드를 밀어내지 않도록 */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-card__title a {
  color: inherit;
  text-decoration: none;
}

.job-card__title a:hover { color: var(--brand); }

.job-card__title a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.job-card__company {
  margin: 0 0 var(--gap-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* 검증 배지 자리 — verified 표시 기준이 정해지면 여기를 채운다 (현재 비움).
   verified(무료·영구·운영자 판정)와 exposure.verified(유료·노출 자리)는 별개다. */
.job-card__verified { display: none; }

.job-card__location {
  margin: 0 0 var(--gap-md);
  font-size: 13px;
  color: var(--text-subtle);
}

.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-tag {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--tag-text);
  background-color: var(--tag-bg);
  border-radius: var(--radius-tag);
  white-space: nowrap;
}

.job-tag--type {
  color: var(--brand);
  background-color: var(--brand-tint);
  border: 1px solid var(--brand-tint-border);
  font-weight: 600;
}

/* --- 오른쪽: 급여 · D-day · 버튼 --- */
.job-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding-top: 24px;   /* 우측 상단 찜 버튼(top 9 + 26px = 35, 카드패딩 12 제외)과 겹치지 않게 */
}

/* 급여는 배경 없는 평문으로 강조한다 (목업 기준) */
.job-salary {
  display: block;
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand);
  text-align: right;
  overflow-wrap: anywhere;
}

/* 외화 병기 — 본문보다 작고 연하게 (원화 환산값은 화면에 절대 표시하지 않는다) */
.job-salary-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-subtle);
  text-align: right;
  line-height: 1.4;
}

.job-dday {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.job-dday--urgent { background-color: var(--dday-urgent);    color: #fff; }
.job-dday--normal { background-color: var(--dday-normal-bg);  color: var(--dday-normal-text); }
.job-dday--closed { background-color: var(--dday-closed-bg);  color: var(--dday-closed-text); }

.job-badge-new {
  display: inline-block;
  margin-left: var(--gap-sm);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--new-text);
  background-color: var(--new-bg);
  border-radius: var(--radius-tag);
  vertical-align: middle;
  white-space: nowrap;
}

/* 목업대로 세로 스택. 대신 버튼 자체를 작게 해서 높이를 잡는다 */
.job-card__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}

.job-action-btn {
  display: block;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  border-width: 1px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color .3s, color .3s, transform .3s;
  color: var(--brand);
  background-color: transparent;
  border: 2px solid var(--brand);
}

.job-action-btn:hover {
  background-color: var(--brand);
  color: #fff;
}

.job-action-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 오렌지 그라디언트는 지원하기 버튼에만 사용한다 */
.job-action-btn--primary {
  color: #fff;
  border: none;
  padding: 5px 10px;   /* 테두리가 없어 1px 보정 */
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
}

.job-action-btn--primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-hover-end) 100%);
  transform: translateY(-1px);
}

/* --- 찜 버튼 --- */
.job-card__save {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: var(--text-subtle);
  background-color: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.job-card__save:hover,
.job-card__save[aria-pressed="true"] {
  color: var(--dday-urgent);
  border-color: var(--dday-urgent);
}

.job-card__save:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ============================================================
   6. 카드 반응형
   ============================================================ */
@media (max-width: 900px) {
  .job-card { grid-template-columns: 46px minmax(0, 1fr); }

  .job-card__logo { width: 46px; height: 46px; font-size: 20px; }

  /* 오른쪽 열을 카드 아래로 내리고 가로로 편다 */
  .job-card__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px var(--gap-md);
    border-top: 1px solid var(--border);
    margin-top: 2px;
    padding-top: var(--gap-md);
  }

  .job-salary,
  .job-salary-sub { text-align: left; }

  .job-card__actions {
    flex-direction: row;
    width: 100%;
    margin-top: 0;
  }

  .job-action-btn { flex: 1; }
}

@media (max-width: 576px) {
  .job-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: var(--gap-md);
    padding: var(--gap-md);
    border-radius: 12px;
  }

  .job-card__logo { width: 42px; height: 42px; font-size: 18px; }

  .job-card__main { padding-right: 30px; }

  .job-card__title { font-size: 14px; }
  .job-card__company { font-size: 12px; }
  .job-card__location { font-size: 11.5px; }
  .job-tag { font-size: 11px; padding: 3px 8px; }
  .job-salary { font-size: 13px; }
  .job-action-btn { font-size: 12px; padding: 7px 10px; }
  .job-action-btn--primary { padding: 11px 12px; }

  .job-card__save { width: 32px; height: 32px; font-size: 16px; }
}

/* 모션 최소화 선호 사용자 배려 */
@media (prefers-reduced-motion: reduce) {
  .job-card, .job-action-btn { transition: none; }
  .job-card:hover, .job-action-btn--primary:hover { transform: none; }
}
