/* ===== Current Openings section ===== */
.jobs {
  --jobs-text: #000;
  --jobs-muted: #5b5b5b;
  --jobs-line: #cfcfcf;
  --jobs-bg: #f5f7fa;

  background: var(--jobs-bg);
  padding: 64px 0 56px;
  font-family:"Inter", sans-serif;
  color: var(--jobs-text);
}

.jobs-title {
  margin: 0 0 26px;
  text-align: center;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.jobs-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1240px;
  width: 100%;
}

/* one row = role | experience | location | button */
.jobs-row {
  display: grid;
  grid-template-columns: 2.2fr 2fr 1.5fr 1fr;
  align-items: center;
  column-gap: 22px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--jobs-line);
}
.jobs-row:last-child { border-bottom: 0; }

.jobs-role {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.jobs-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  color: var(--jobs-muted);
}

.jobs-icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: #222;
}

.jobs-btn {
  justify-self: end;
  display: inline-block;
  min-width: 140px;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--jobs-text);
  background: #fff;
  border: 1.5px solid #111;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.jobs-btn:hover,
.jobs-btn:focus-visible {
  background: #111;
  color: #fff;
  outline: none;
}

/* =========================================================
   APPLY MODAL
   ========================================================= */

.ap-modal[hidden] { display: none; }

.ap-modal {
  /* the modal is a sibling of .jobs, not a descendant, so it does not
     inherit the .jobs custom properties — declare them again here */
  --jobs-text: #000;
  --jobs-muted: #5b5b5b;
  --jobs-line: #cfcfcf;
  --jobs-bg: #fff;

  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ap-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 61, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.ap-dialog {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;

  background: #ffffff;
  border-radius: 20px;
  padding: clamp(26px, 3.5vw, 40px);

  box-shadow: 0 30px 70px rgba(7, 20, 61, 0.3);
}

/* Fallbacks everywhere the tokens are used, so the form is
   self-sufficient if this file is ever loaded on its own. */
.ap-close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;

  border: 1px solid var(--jobs-line, #cfcfcf);
  border-radius: 50%;
  background: #ffffff;
  color: var(--jobs-text, #000);
  cursor: pointer;

  transition: background 0.2s ease, color 0.2s ease;
}

.ap-close svg { width: 17px; height: 17px; }

.ap-close:hover {
  background: var(--iki-deep, #07143d);
  color: #ffffff;
  border-color: var(--iki-deep, #07143d);
}

/* ---------- Header ---------- */

.ap-head { margin-bottom: 26px; }

.ap-title {
  margin: 0 0 8px;
  font-family: "Geist", "Inter", sans-serif;
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--jobs-text);
}

.ap-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jobs-muted);
}

/* ---------- Fields ---------- */

.ap-form { display: flex; flex-direction: column; gap: 18px; }

.ap-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ap-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ap-label {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--jobs-text, #000);
}

.ap-input {
  width: 100%;
  padding: 11px 14px;

  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  color: var(--jobs-text, #000);

  background: #ffffff;
  border: 1px solid var(--jobs-line, #cfcfcf);
  border-radius: 10px;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ap-input:focus {
  outline: none;
  border-color: var(--iki-cyan, #27b9d5);
  box-shadow: 0 0 0 3px rgba(39, 185, 213, 0.16);
}

.ap-select { cursor: pointer; }

.ap-textarea { resize: vertical; min-height: 96px; }

.ap-input[aria-invalid="true"] {
  border-color: #d64545;
}

.ap-error {
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  color: #d64545;
  min-height: 0;
}

.ap-error:empty { display: none; }

/* ---------- File uploader ---------- */

.ap-file {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;

  padding: 14px;
  border: 1px dashed #c3cad6;
  border-radius: 12px;
  background: #fafbfd;
}

.ap-file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ap-file-btn {
  display: inline-block;
  padding: 9px 18px;

  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;

  background: var(--iki-deep, #07143d);
  border-radius: 8px;
  cursor: pointer;

  transition: background 0.2s ease;
}

.ap-file-btn:hover { background: var(--iki-blue, #142766); }

.ap-file input[type="file"]:focus-visible + .ap-file-btn {
  outline: 3px solid var(--iki-cyan, #27b9d5);
  outline-offset: 2px;
}

.ap-file-name {
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  color: var(--jobs-muted, #5b5b5b);
  word-break: break-all;
}

.ap-file.has-file .ap-file-name { color: var(--jobs-text, #000); }

/* ---------- Status ---------- */

.ap-status {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
}

.ap-status:empty { display: none; }
.ap-status.is-error { color: #d64545; }
.ap-status.is-success { color: #1a7f52; }

/* ---------- Actions ---------- */

.ap-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.ap-btn {
  padding: 12px 26px;

  font-family: "Inter", sans-serif;
  font-size: 14.5px;
  font-weight: 500;

  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;

  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ap-btn-ghost {
  background: #ffffff;
  border-color: var(--jobs-line, #cfcfcf);
  color: var(--jobs-text, #000);
}

.ap-btn-ghost:hover { background: #f2f4f8; }

.ap-btn-primary {
  background: var(--iki-deep, #07143d);
  color: #ffffff;
}

.ap-btn-primary:hover {
  background: var(--iki-blue, #142766);
  box-shadow: 0 10px 22px rgba(7, 20, 61, 0.24);
}

/* ---------- Modal responsive ---------- */

@media (max-width: 600px) {
  .ap-modal { padding: 0; align-items: flex-end; }

  .ap-dialog {
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  .ap-row { grid-template-columns: 1fr; }

  .ap-actions { flex-direction: column-reverse; }

  .ap-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-close,
  .ap-input,
  .ap-btn,
  .ap-file-btn {
    transition: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .jobs-row {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
    padding: 22px 26px;
  }
  .jobs-role { grid-column: 1 / -1; }
  .jobs-btn { justify-self: end; min-width: 130px; }
  .jobs-role { font-size: 1.15rem; }
  .jobs-meta { font-size: 0.95rem; }
}

@media (max-width: 600px) {
  .jobs { padding: 36px 0 24px; }
  .jobs-row {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }
  .jobs-btn { justify-self: start; width: 100%; }
}