* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;

  color: var(--main-text-color);
  background: var(--background-color);

  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.blind {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);

  white-space: nowrap;
  border: 0;
}

/* =========================
   메인 영역
========================= */

.jobs-main {
  width: min(calc(100% - 40px), 860px);
  margin: 0 auto;
  padding: 38px 0 100px;
}

.jobs-header-section {
  width: 100%;
}

.page-title {
  margin: 0;

  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -1.5px;
}

.page-description {
  margin: 15px 0 18px;

  font-size: 19px;
  letter-spacing: -0.4px;
}

.page-description strong {
  font-weight: 500;
}

/* =========================
   검색
========================= */

.search-form {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 10px;
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 22px;

  color: var(--main-text-color);
  background: var(--white-color);

  border: 1px solid var(--input-border-color);
  border-radius: 10px;

  font-size: 16px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: #b3b7c0;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(36, 81, 209, 0.1);
}

.search-button {
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--white-color);
  background: var(--primary-color);

  border-radius: 10px;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.search-button:hover {
  background: var(--primary-hover-color);
  transform: translateY(-1px);
}

.search-button svg {
  width: 30px;
  height: 30px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   필터
========================= */

.filter-area {
  margin-top: 17px;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 27px;
}

.filter-group {
  min-width: 0;
}

.filter-label {
  display: block;

  margin-bottom: 9px;

  font-size: 16px;
  font-weight: 600;
}

.filter-select {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;

  color: var(--main-text-color);
  background-color: var(--white-color);

  border: 1px solid var(--input-border-color);
  border-radius: 6px;

  font-size: 14px;
  font-weight: 600;

  outline: none;
  cursor: pointer;

  appearance: none;

  background-image:
    linear-gradient(
      45deg,
      transparent 50%,
      #c1c5ce 50%
    ),
    linear-gradient(
      135deg,
      #c1c5ce 50%,
      transparent 50%
    );

  background-position:
    calc(100% - 17px) 17px,
    calc(100% - 12px) 17px;

  background-size:
    5px 5px,
    5px 5px;

  background-repeat: no-repeat;
}

.filter-select:focus {
  border-color: var(--primary-color);
}

/* =========================
   공고 목록
========================= */

.job-list {
  margin-top: 30px;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.job-card {
  width: 100%;
  min-height: 220px;
  padding: 22px 20px 24px;

  background: var(--white-color);

  border: 1px solid #dfe2e8;
  border-radius: 12px;

  cursor: pointer;
  outline: none;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.job-card:hover {
  background: #ffffff;
  border-color: #b9c7eb;

  box-shadow: 0 8px 22px rgba(36, 81, 209, 0.08);

  transform: translateY(-2px);
}

.job-card:focus-visible {
  position: relative;
  z-index: 1;

  box-shadow:
    inset 0 0 0 2px var(--primary-color);
}

.company-name {
  width: fit-content;
  max-width: 420px;
  padding: 6px 12px;

  color: #5f6673;
  background: #f3f5f8;

  border-radius: 8px;

  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-card-content {
  margin-top: 16px;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    210px
    120px;
  align-items: start;
  column-gap: 28px;
}

.job-card-main {
  min-width: 0;
}

.job-title {
  margin: 0 0 14px;

  overflow: hidden;

  color: #17191d;

  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.6px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.job-card:hover .job-title {
  color: var(--primary-color);
}

.job-keyword-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  color: #758096;

  font-size: 14px;
  line-height: 1.5;
}

.job-keyword-item {
  display: inline-flex;
  align-items: center;
}

.job-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 12px;
}

.job-skill-item {
  padding: 6px 12px;

  color: #4d6db8;
  background: #f4f7ff;
  border: 1px solid #dfe7ff;
  border-radius: 7px;

  font-size: 13px;
  font-weight: 600;
}

.job-keyword-item:not(:last-child)::after {
  content: "|";

  margin: 0 7px;

  color: #ccd1da;
}

.job-info-list {
  width: 210px;
  min-width: 210px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;

  padding-top: 1px;

  align-self: start;
}

.job-info-item {
  width: 100%;
  min-width: 0;

  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;

  color: #596276;

  font-size: 14px;
  line-height: 1.3;
}

.job-info-item svg {
  width: 19px;
  height: 19px;

  display: block;

  fill: none;
  stroke: #8995aa;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job-info-item span {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.job-card-side {
  min-height: 100px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.bookmark-button {
  width: 40px;
  height: 40px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #9aa3b2;
  background: transparent;

  border: none;

  cursor: pointer;
}

.bookmark-icon {
  width: 27px;
  height: 27px;

  display: block;

  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;

  transition:
    fill 0.15s ease,
    stroke 0.15s ease,
    color 0.15s ease;
}

.bookmark-button:hover {
  color: #9aa3b2;
}

.bookmark-button.active {
  color: #f5b301;
}

.bookmark-button.active .bookmark-icon {
  fill: currentColor;
  stroke: currentColor;
}

.bookmark-button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
  border-radius: 6px;
}

.job-deadline {
  padding-top: 2px;

  color: #596276;

  font-size: 14px;
  white-space: nowrap;
}

.loading-message,
.empty-message,
.error-message {
  padding: 70px 20px;

  color: var(--sub-text-color);
  background: var(--white-color);

  border: 1px solid var(--border-color);
  border-radius: 20px;

  text-align: center;
}

.error-message {
  color: #d54e4e;
}

/* =========================
   페이지네이션
========================= */

.pagination {
  margin-top: 35px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;

  color: var(--main-text-color);
  background: var(--white-color);

  border: 1px solid var(--border-color);
  border-radius: 7px;

  font-size: 13px;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.page-button:hover,
.page-button.active {
  color: var(--white-color);
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.page-button:disabled {
  color: #b9bdc6;
  background: #f2f3f6;

  cursor: default;
}

/* =========================
   토스트
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 35px;
  z-index: 200;

  max-width: calc(100% - 40px);
  padding: 13px 22px;

  color: var(--white-color);
  background: rgba(20, 22, 27, 0.92);

  border-radius: 10px;

  font-size: 14px;
  font-weight: 600;

  opacity: 0;
  visibility: hidden;

  transform: translate(-50%, 20px);

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;

  transform: translate(-50%, 0);
}