/* ========================================
   CAREERS PORTAL STYLES
   ======================================== */

/* Hero Section */
.careers-hero {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1a1a2e 100%);
  padding: 4rem 2rem;
  text-align: center;
  margin-top: -2rem; /* Offset default page margin */
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-medium);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Filter Section */
.filter-section {
  background: #f8f9fa;
  padding: 2rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.filter-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.filter-dropdown {
  min-width: 200px;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--color-bg-dark);
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

.filter-dropdown:hover {
  border-color: #0066CC;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.filter-dropdown:focus {
  outline: none;
  border-color: #0066CC;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Jobs Section */
.jobs-section {
  background: #f5f5f5;
  padding: 4rem 2rem;
  min-height: 60vh;
}

.category-section {
  margin-bottom: 4rem;
}

.category-section:last-child {
  margin-bottom: 0;
}

/* Category Header */
.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.category-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #0066CC 0%, #0052a3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.category-icon i {
  font-size: 1.75rem;
  color: white;
}

.category-name {
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--color-bg-dark);
  margin: 0;
}

/* Jobs List */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Job Row */
.job-row {
  background: white;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-normal);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 2rem;
  align-items: center;
}

.job-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.job-row.hidden {
  display: none;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0066CC;
  margin: 0;
  line-height: 1.3;
}

.job-experience,
.job-location,
.job-type {
  font-size: 1rem;
  color: var(--color-text-dark);
  font-weight: 400;
}

.job-apply-btn {
  background: #0066CC;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.job-apply-btn:hover {
  background: #0052a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

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

/* Responsive Job Rows */
@media (max-width: 968px) {
  .job-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }

  .job-title {
    font-size: 1.15rem;
  }

  .job-experience,
  .job-location,
  .job-type {
    font-size: 0.9rem;
  }

  .job-apply-btn {
    width: 100%;
    justify-self: stretch;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  overflow: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  animation: slideInUp 0.4s ease-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-normal);
  z-index: 10002;
  line-height: 1;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-view {
  padding: 2.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-title {
  font-size: 2rem;
  font-weight: 600;
  color: #0066CC;
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.modal-category-badge {
  background: #e6f2ff;
  color: #0066CC;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.modal-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-job-meta span {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding-right: 1rem;
  border-right: 1px solid #e0e0e0;
}

.modal-job-meta span:last-child {
  border-right: none;
  padding-right: 0;
}

.modal-body {
  color: var(--color-bg-dark);
  line-height: 1.8;
}

.modal-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-bg-dark);
  margin: 2rem 0 1rem;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 1.5rem;
}

.modal-body ul {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
}

.modal-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.modal-footer {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: center;
}

.modal-apply-btn {
  background: #0066CC;
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.modal-apply-btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

/* Application Form Styles */
.form-heading {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-bg-dark);
  margin: 0 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-bg-dark);
}

.required {
  color: #d9534f;
}

.optional {
  color: #999;
  font-weight: 400;
  font-size: 0.875rem;
}

.form-input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--color-bg-dark);
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}

.form-input:focus {
  outline: none;
  border-color: #0066CC;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input.error {
  border-color: #d9534f;
}

.error-message {
  font-size: 0.875rem;
  color: #d9534f;
  display: none;
}

.error-message.show {
  display: block;
}

/* File Upload Styles */
.file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-input {
  display: none;
}

.file-upload-btn {
  background: white;
  color: #0066CC;
  border: 2px solid #0066CC;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.file-upload-btn:hover {
  background: #0066CC;
  color: white;
}

.file-name {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-submit-btn {
  background: #0066CC;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-top: 1rem;
}

.form-submit-btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.form-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .filter-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-dropdown {
    width: 100%;
    min-width: unset;
  }

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

  .category-name {
    font-size: 1.75rem;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-view {
    padding: 2rem 1.5rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-upload-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-upload-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .careers-hero {
    padding: 3rem 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .category-header {
    gap: 1rem;
  }

  .category-icon {
    width: 50px;
    height: 50px;
  }

  .category-icon i {
    font-size: 1.25rem;
  }

  .category-name {
    font-size: 1.5rem;
  }

  .job-card {
    padding: 1.5rem;
  }

  .job-title {
    font-size: 1.25rem;
  }
}

/* Hidden State for Job Cards (for filtering) */
.job-card.hidden {
  display: none;
}

.category-section.hidden {
  display: none;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
  font-size: 1.25rem;
}
