/* Header Section */
.header-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

.header-text {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.header-text h1 {
  flex: 1;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-light);
  line-height: 36px;
}

.header-text p {
  flex: 2;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-light);
  text-align: justify;
  min-width: 250px;
}

.header-image {
  width: 100%;
  margin-top: 20px;
}

.header-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
  margin-bottom: 40px;
}

.intro {
  background: var(--green-500);
  padding: 40px 0;
}

#intro-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.intro-text {
  text-align: left;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  color: var(--text-black);
}

.intro-image img {
  width: 100%;
  height: auto;
}

#open-positions h2 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  margin-bottom: 24px;
  margin-top: 24px;
}

.job-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 16px;
  background: transparent;
  border: 2px solid var(--green-500);
  border-radius: 24px;
  padding: 20px 24px;
  margin-bottom: 16px;

  align-items: center;
  transition: all 0.3s ease;
}

.job-description,
.job-type,
.job-location,
.buttons {
  display: flex;
  align-items: center;
}

.job-description h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  color: var(--text-light);
}

.job-description p {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--text-400);
}

.job-type,
.job-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-400);
  font-size: 14px;
  font-weight: 400;
  line-height: 28px;
}

.job-location img {
  width: 24px;
  height: 24px;
  filter: invert(41%) sepia(3%) saturate(211%) hue-rotate(174deg)
    brightness(97%) contrast(88%);
}
.buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.apply-btn {
  display: flex;
  padding: 4px 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--green-800);
  background-color: transparent;
  line-height: 24px;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--green-800);
  border-radius: 8px;
}

.doc-btn {
  display: flex;
  padding: 12px 16px;
  background-color: transparent;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1.5px solid var(--green-800);
  border-radius: 14px;
}

.doc-btn img {
  width: 12px;
  height: 12px;
}

/* Form */

.form-group {
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
  background-color: var(--text-white);
}

.form-input:focus {
  outline: none;
  border-color: var(--green-500);
  background-color: var(--text-white);
}

.form-input::placeholder {
  color: var(--grey-300);
}

.file-upload-area {
  border: 2px dashed var(--grey-400);
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  background-color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 24px;
}

.file-upload-area:hover {
  border-color: var(--green-500);
}

.file-upload-area.dragover {
  border-color: var(--green-500);
}

.upload-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-400);
  margin-bottom: 8px;
}

.upload-subtext {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-200);
}

.file-list {
  margin-bottom: 24px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background-color: var(--grey-100);
  border-radius: 12px;
  margin-bottom: 8px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 32px;
  height: 32px;
  background-color: var(--red-100);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 12px;
  font-weight: bold;
}

.file-details h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-500);
  margin-bottom: 2px;
}

.file-details p {
  font-size: 12px;
  font-size: 400;
  color: var(--text-300);
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background-color: var(--red-200);
}

.submit-btn {
  background-color: var(--green-1000);
  color: var(--text-white);
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  float: right;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--green-200);
  color: var(--green-1000);
}

.submit-btn:active {
  transform: translateY(0);
}

.hidden-input {
  display: none;
}

/* Required field design */

.required-asterisk {
  color: var(--red-100);
  margin-left: 5px;
}

.error-message {
  color: var(--red-100);
  font-size: 0.85em;
  margin-top: 5px;
  display: none;
}
.error-message:not(:empty) + input {
  border: 1px solid red;
}

.input-error {
  border: 1px solid red;
}

.form-input.invalid {
  border-color: var(--red-100);
}

.drop-area.invalid {
  border-color: var(--red-100);
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-container {
    padding: 24px;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
    float: none;
  }
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.modal {
  background: var(--background-white);
  border-radius: 12px;
  padding: 16px 24px;
  width: 90%;
  max-width: 600px;
  position: relative;
  border: 1px solid var(--grey-200);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background-color: var(--grey-200);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  margin-bottom: 30px;
  color: var(--text-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-input {
  padding: 16px 12px;
  border: 1px solid var(--grey-300);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.3s ease;
  background-color: transparent;
}

.form-input:focus {
  outline: none;
  border-color: var(--green-1000);
  background-color: var(--text-white);
}

.form-input::placeholder {
  color: var(--grey-300);
}

.submit-btn {
  background-color: var(--green-1000);
  color: var(--text-white);
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  float: right;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: var(--green-200);
  color: var(--green-1000);
}

/* Success Modal */
.success-modal {
  text-align: center;
  padding: 50px 40px;
}

#successModal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
}

.success-title {
  color: var(--text-light);
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}

.success-message {
  color: var(--text-light);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .header-text {
    gap: 12px;
    margin-top: 20px;
  }

  #intro-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .intro-image {
    margin-top: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 30px 20px;
    max-width: 600px;
  }
}

@media (max-width: 480px) {
  .header-text {
    gap: 12px;
    margin-top: 10px;
  }

  .header-image img {
    margin-bottom: 0;
  }

  .intro {
    margin-top: 20px;
  }
  .job-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  .job-description h3 {
    font-size: 16px;
    line-height: 24px;
  }

  .job-description p,
  .job-type,
  .job-location {
    font-size: 13px;
    line-height: 20px;
  }

  .job-location img {
    width: 20px;
    height: 20px;
  }

  .apply-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 6px;
  }

  .apply-btn img {
    width: 20px;
    height: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-input {
    font-size: 14px;
    padding: 12px;
  }

  .file-upload-area {
    padding: 32px 16px;
    font-size: 14px;
  }

  .upload-text {
    font-size: 14px;
  }

  .upload-subtext {
    font-size: 12px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }

  .file-icon {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .file-details h4 {
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
  .file-details {
    max-width: 100%;
  }

  .file-details p {
    font-size: 11px;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
    float: none;
    padding: 14px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
}

.apply-btn.closed {
  display: flex;
  padding: 4px 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--red-400);
  background-color: transparent;
  line-height: 24px;
  align-items: center;
  gap: 6px;
  text-align: center;
  border: 1.5px solid var(--red-100);
  border-radius: 8px;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .job-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .buttons {
    justify-content: flex-start;
  }
}