/* ==========================================================================
   Vacancies Page Styles (BIS Design System)
   ========================================================================== */

.vacancies-page {
  background: var(--bg);
  color: var(--text);
}

/* Benefits Section */
.vacancies-benefits-section {
  padding: 0 8vw 50px;
  background: #fff;
}

.vacancies-benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.vacancies-benefit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 32px 24px;
  transition: all 0.3s ease;
  position: relative;
}

.vacancies-benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.vacancies-benefit-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.vacancies-benefit-card:hover::before {
  transform: scaleX(1);
}

.vacancies-benefit-card__icon {
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.vacancies-benefit-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 12px;
}

.vacancies-benefit-card p {
  font-size: 14.5px;
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
}

/* Vacancies List */
.vacancies-list-section {
  padding: 70px 8vw 80px;
}

.vacancies-items {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
}

.vacancy-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 44px 48px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.vacancy-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.vacancy-card__meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.vacancy-card__tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-dark);
  background: rgba(112, 198, 212, 0.15);
  padding: 4px 12px;
  border-radius: 0;
}

.vacancy-card__date {
  font-size: 13px;
  color: var(--text-light);
}

.vacancy-card__title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 14px;
  line-height: 1.25;
}

.vacancy-card__salary {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.vacancy-card__salary-note {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  margin-left: 6px;
}

.vacancy-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.vacancy-chip {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dark);
}

.vacancy-card__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}

.vacancy-section-block__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vacancy-section-block__list {
  margin: 0;
  padding-left: 20px;
  list-style: square;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vacancy-section-block__list li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.vacancy-highlight {
  list-style: none;
  margin-left: -20px;
  margin-top: 6px;
  padding: 10px 14px;
  background: rgba(112, 198, 212, 0.1);
  border-left: 3px solid var(--primary);
}

.vacancy-card__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.vacancy-card__foot .btn {
  height: 50px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border-radius: 0 !important;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.vacancy-card__foot .btn-primary {
  border: 1px solid transparent;
}

.vacancy-card__foot .btn-outline {
  border: 1px solid var(--primary);
}

/* HR Contacts Section */
.vacancies-contacts-section {
  padding: 40px 8vw 90px;
}

.vacancies-contacts__box {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 0;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.vacancies-contacts__title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  color: var(--dark);
  margin: 12px 0;
}

.vacancies-contacts__desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 700px;
}

.vacancies-contacts__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.vacancies-contacts__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.vacancies-contacts__link:hover {
  color: var(--primary);
}

.vacancies-contacts__action {
  flex-shrink: 0;
}

/* Vacancy Modal Overlay & Box */
#vacancyOverlay {
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 17, 24, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10;
  padding: 20px;
  box-sizing: border-box;
}

#vacancyOverlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#vacancyOverlay.closing {
  opacity: 0;
  pointer-events: none;
}

#vacancyOverlay .vacancy-modal {
  transform: translateY(30px) scale(0.97);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#vacancyOverlay.active .vacancy-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#vacancyOverlay.closing .vacancy-modal {
  transform: translateY(30px) scale(0.95);
  opacity: 0;
}

.vacancy-modal {
  background: #ffffff;
  width: 100%;
  max-width: 560px;
  border-radius: 0 !important;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.vacancy-modal-content {
  padding: 22px 28px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.vacancy-form input,
.vacancy-form textarea {
  border-radius: 0 !important;
}

.vacancy-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.vacancy-close span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--dark);
}

.vacancy-close span:first-child {
  transform: rotate(45deg);
}

.vacancy-close span:last-child {
  transform: rotate(-45deg);
}

.vacancy-close:hover {
  background: rgba(112, 198, 212, 0.15);
}

.vacancy-modal-header {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.vacancy-modal-header .section-badge {
  font-size: 11px;
  padding: 2px 8px;
  margin-bottom: 4px;
}

.vacancy-modal-title {
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 800;
  color: var(--dark);
  margin: 4px 0 2px;
  line-height: 1.25;
}

.vacancy-modal-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
  margin: 0;
}

.vacancy-form .form-group {
  margin-bottom: 8px;
}

.vacancy-form label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
  align-items: center;
  display: flex;
}

.vacancy-form input[type="text"],
.vacancy-form input[type="tel"],
.vacancy-form input[type="email"] {
  height: 38px;
  padding: 6px 12px;
  font-size: 13.5px;
  box-sizing: border-box;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vacancy-file-hint {
  font-size: 11px;
  color: var(--text-light);
  font-weight: normal;
  margin-left: 4px;
}

.vacancy-file-input {
  display: none;
}

.vacancy-file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  box-sizing: border-box;
  padding: 0 10px;
  background: #ffffff;
  border: 1.5px dashed var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-light);
  font-size: 12.5px;
  overflow: hidden;
}

.vacancy-file-label:hover {
  border-color: var(--primary);
  color: var(--dark);
  background: rgba(112, 198, 212, 0.04);
}

.vacancy-file-label svg {
  color: var(--primary);
  flex-shrink: 0;
}

.vacancy-file-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vacancy-form textarea {
  height: 48px;
  min-height: 48px;
  max-height: 70px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.35;
  box-sizing: border-box;
  resize: vertical;
}

.vacancy-submit-btn {
  height: 44px;
  width: 100%;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 0 !important;
}

.vacancy-form .form-consent {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 6px;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
  .vacancies-benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .vacancies-contacts__box {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 28px;
  }
}

@media (max-width: 768px) {
  .vacancy-card {
    padding: 32px 20px;
  }
  .vacancies-benefits-section,
  .vacancies-list-section,
  .vacancies-contacts-section {
    padding-inline: 16px;
  }
  .vacancies-benefits__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .vacancy-modal-content {
    padding: 28px 18px;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .vacancy-card__foot {
    flex-direction: column;
    align-items: stretch;
  }
  .vacancy-card__foot .btn {
    width: 100%;
  }
}
