/* ============================================================
   VI Feerie — Trang Tuyển dụng
   Tiền tố class: cr
   ============================================================ */

/* --- Phần mở đầu --- */
.cr-intro {
  text-align: center;
}

.cr-intro .section__title {
  max-width: 620px;
  margin: 0 auto;
}

.cr-intro .section__desc {
  max-width: 580px;
  margin: 10px auto 0;
}

/* --- Quyền lợi --- */
.cr-perks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.cr-perk {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cr-perk:hover {
  border-color: var(--brand-light);
  box-shadow: 0 4px 20px rgba(143, 107, 132, 0.08);
}

.cr-perk__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-deep);
  margin-bottom: 16px;
}

.cr-perk__icon svg {
  width: 22px;
  height: 22px;
}

.cr-perk__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cr-perk__desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* --- Danh sách vị trí --- */
.cr-jobs {
  background: var(--bg-soft);
}

.cr-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cr-job:last-child {
  margin-bottom: 0;
}

.cr-job:hover {
  border-color: var(--brand-light);
  box-shadow: 0 2px 12px rgba(143, 107, 132, 0.07);
}

.cr-job__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cr-job__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cr-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-tint);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brand-deep);
}

.cr-job__btn {
  flex-shrink: 0;
}

/* --- Modal ứng tuyển --- */
.cr-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.cr-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.cr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(56, 34, 19, 0.45);
}

.cr-modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  transform: translateY(20px);
  transition: transform 0.3s var(--ease);
}

.cr-modal.is-open .cr-modal__panel {
  transform: translateY(0);
}

.cr-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cr-modal__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.cr-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background 0.2s var(--ease);
}

.cr-modal__close:hover {
  background: var(--bg-soft);
}

.cr-modal__close svg {
  width: 20px;
  height: 20px;
}

/* Advanced Forms renders the fields and the real submit button. */
.vifeerie-careers .cr-modal .af-form .acf-fields {
  border: 0;
  background: transparent;
}

.vifeerie-careers .cr-modal .af-form .acf-field {
  padding: 0;
  margin: 0 0 16px;
  border: 0;
  float: none;
  width: 100%;
}

.vifeerie-careers .cr-modal .af-form .acf-label {
  margin: 0 0 6px;
}

.vifeerie-careers .cr-modal .af-form .acf-label label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.vifeerie-careers .cr-modal .af-form .acf-input input,
.vifeerie-careers .cr-modal .af-form .acf-input textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  color: var(--text);
}

.vifeerie-careers .cr-modal .af-form .acf-input input:focus,
.vifeerie-careers .cr-modal .af-form .acf-input textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(201, 171, 189, 0.18);
}

.vifeerie-careers .cr-modal .af-form .acf-input textarea {
  min-height: 100px;
  resize: vertical;
}

.vifeerie-careers .cr-modal .af-form .af-submit {
  padding: 0;
  margin: 4px 0 0;
}

.vifeerie-careers .cr-modal .af-form .af-submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-deep);
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.vifeerie-careers .cr-modal .af-form .af-submit-button:hover {
  background: var(--brand-deeper);
}

.vifeerie-careers .cr-modal .af-form .af-success,
.vifeerie-careers .cr-modal .af-form .acf-notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.cr-jobs__heading {
  margin-bottom: 32px;
}

.cr-jobs__empty {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}

.cr-jobs__empty p {
  margin-bottom: 18px;
  color: var(--muted);
}

.cr-jobs__empty .btn,
.cr-cta__inner .btn {
  margin: 24px auto 0;
}

.cr-perks {
  padding-top: 0;
}

/* --- CTA cuối trang --- */
.cr-cta__inner {
  text-align: center;
  padding: 56px 32px;
  background: var(--brand-tint);
  border-radius: var(--radius);
}

.cr-cta__inner .section__desc {
  margin-left: auto;
  margin-right: auto;
}

/* ============== Responsive ============== */

/* Tablet */
@media screen and (max-width: 900px) {
  .cr-perks__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cr-job {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
  }
}

/* Phablet */
@media screen and (max-width: 620px) {
  .cr-perks__grid {
    grid-template-columns: 1fr;
  }

  .cr-intro .section__title {
    font-size: 28px;
  }

  .cr-cta__inner {
    padding: 40px 20px;
  }

  .cr-modal__panel {
    padding: 24px 20px;
  }
}

/* Mobile nhỏ */
@media screen and (max-width: 480px) {
  .cr-intro .section__title {
    font-size: 24px;
  }

  .cr-job {
    padding: 16px;
  }

  .cr-cta__inner {
    padding: 32px 16px;
  }

  .cr-modal__panel {
    padding: 20px 16px;
  }
}
