/* ===== CAREERS PAGE STYLES ===== */

/* Page Header */
.page-header {
  background: linear-gradient(rgba(6, 50, 137, 0.7), rgba(6, 50, 137, 0.7)), url(../img/carousel-1.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 60px 0 !important;
}

.page-header h1 {
  font-weight: 700 !important;
  color: #ffffff !important;
}

.page-header p {
  color: #f0fbfc !important;
  font-size: 18px;
}

/* Job Card Styles */
.job-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.job-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(6, 50, 137, 0.15);
}

.job-card-header {
  background: linear-gradient(135deg, #063289 0%, #0d47a1 100%);
  color: #fff;
  padding: 20px;
  border-bottom: 4px solid #FF6600;
}

.job-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
}

.job-department {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.job-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.job-detail {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 10px;
}

.job-detail i {
  color: #FF6600;
  font-size: 18px;
  margin-top: 2px;
}

.job-detail span {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

.job-detail strong {
  color: #063289;
}

.job-description {
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 12px 0;
  flex-grow: 1;
}

.job-description p {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.apply-btn {
  align-self: flex-start;
  margin-top: 12px;
  padding: 10px 24px;
  background-color: #063289;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.apply-btn:hover {
  background-color: #FF6600;
  transform: translateX(4px);
}

/* Career Modal Styles */
.career-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.career-modal[aria-hidden="false"] {
  display: flex;
}

.career-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 240ms ease-in-out;
}

.career-modal[aria-hidden="false"] .career-modal-backdrop {
  opacity: 1;
}

.career-modal-dialog {
  position: relative;
  background: #fff;
  width: 96%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 30px;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease-in-out;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.career-modal[aria-hidden="false"] .career-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.career-modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #063289;
  transition: color 0.3s ease;
}

.career-modal-close:hover {
  color: #FF6600;
}

.career-modal-dialog h2 {
  color: #063289;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Career Form Styles */
.career-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  padding-top: 12px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  color: #063289;
  margin-bottom: 6px;
}

.form-group .form-control,
.form-group .form-control-file {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
}

.form-group .form-control:focus,
.form-group .form-control-file:focus {
  border-color: #063289;
  box-shadow: 0 0 0 3px rgba(6, 50, 137, 0.1);
  outline: none;
}

.form-group textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

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

.form-row .form-group {
  margin-bottom: 0;
}

/* File Input Styling */
.file-input-wrapper {
  position: relative;
  border: 2px dashed #063289;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-input-wrapper:hover {
  background: #f0fbfc;
  border-color: #FF6600;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: block;
  color: #063289;
  font-weight: 600;
  margin-bottom: 4px;
}

.file-input-size {
  display: block;
  color: #999;
  font-size: 12px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-submit,
.btn-cancel {
  flex: 1;
  padding: 12px 20px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-submit {
  background-color: #063289;
  color: #fff;
}

.btn-submit:hover {
  background-color: #FF6600;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-cancel {
  background-color: #f0fbfc;
  color: #063289;
  border: 1px solid #ddd;
}

.btn-cancel:hover {
  background-color: #e8f4f8;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 30px 20px;
}

/* Submission Loader */
.submission-loader {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 200px;
}

.submission-loader.active {
  display: flex;
}

.loader-content {
  text-align: center;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f0fbfc;
  border-top: 4px solid #063289;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-content p {
  color: #063289;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.success-message {
  text-align: center;
  padding: 30px 20px;
}

.success-icon {
  width: 70px;
  height: 70px;
  background: #2ecc71;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  margin: 0 auto 20px;
  animation: scaleIn 0.4s ease-out;
}

.success-message h3 {
  color: #063289;
  font-size: 22px;
  margin-bottom: 10px;
}

.success-message p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.success-message .btn-aime {
  width: 100%;
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 30px 20px;
}

.error-icon {
  width: 70px;
  height: 70px;
  background: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  margin: 0 auto 20px;
  animation: scaleIn 0.4s ease-out;
}

.error-message h3 {
  color: #063289;
  font-size: 22px;
  margin-bottom: 10px;
}

.error-message p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.error-message #retryBtn {
  width: 100%;
}

/* Animations */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .career-modal-dialog {
    padding: 20px;
  }

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

  .form-actions {
    flex-direction: column;
  }

  .job-card-header {
    padding: 16px;
  }

  .job-title {
    font-size: 18px;
  }

  .job-card-body {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 40px 0 !important;
  }

  .page-header h1 {
    font-size: 28px !important;
  }

  .career-modal-dialog {
    width: 98%;
    padding: 16px;
    margin: 10px;
  }

  .career-modal-close {
    right: 10px;
    top: 10px;
    font-size: 28px;
  }

  .file-input-wrapper {
    padding: 16px 12px;
  }
}

/* Field Error Messages */
.field-error {
  display: block;
  color: #dc3545;
  font-size: 13px;
  margin-top: 4px;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control.has-error,
.form-control-file.has-error {
  border-color: #dc3545 !important;
  background-color: #fff5f5;
}

.form-control.has-error:focus,
.form-control-file.has-error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
