/**
 * Job List Section Styles
 *
 * @package Dioqa_UI_Kit
 */

/* ============================================
   Section Header
   ============================================ */

.job-list-section .section-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: var(--display-sm, 42px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--bs-dark, #212529);
  margin-bottom: 1rem;
}

.job-list-section .section-description {
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-lg, 18px);
  line-height: 1.6;
  color: var(--text-gray, #6b687d);
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================
   Filters
   ============================================ */

.job-filters {
  display: flex;
  justify-content: flex-start;
}

.job-filters-form {
  width: 100%;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.filter-group {
  position: relative;
}

/* Custom Select Styling */
.custom-select {
  position: relative;
}

.custom-select-button {
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: var(--bs-border-radius, 6px);
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-base, 16px);
  font-weight: 500;
  color: var(--bs-dark, #212529);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.custom-select-button:hover {
  border-color: var(--bs-secondary, #ff6b35);
}

.custom-select.is-open .custom-select-button {
  border-color: var(--bs-secondary, #ff6b35);
}

.custom-select-arrow {
  color: var(--bs-secondary, #ff6b35);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bs-white, #ffffff);
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.custom-select.is-open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.custom-select-option {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-base, 16px);
  color: var(--bs-dark, #212529);
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-select-option:hover {
  background: var(--bs-gray-100, #f8f9fa);
}

.custom-select-option.is-selected {
  background: var(--bs-secondary-light, #ffe8e0);
  color: var(--bs-secondary, #ff6b35);
  font-weight: 600;
}

/* ============================================
   Job List Grid
   ============================================ */

.job-list {
  display: grid;
  gap: 1.5rem;
}

.job-list-cols-1 {
  grid-template-columns: 1fr;
}

.job-list-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.job-list-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   Job Card
   ============================================ */

.job-card {
  height: 100%;
}

.job-card-inner {
  height: 100%;
  padding: 2rem 0;
  background: var(--bs-white, #ffffff);
  border-top: 1px solid var(--bs-gray-200, #e9ecef);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

/* Job Categories */
.job-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-category-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--bs-primary-light, #e6eeff);
  color: var(--bs-primary, #002baa);
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  border-radius: 100px;
}

/* Job Content */
.job-card-content {
  flex: 0 0 80%;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: var(--text-xl, 20px);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.job-card-title a {
  color: var(--bs-dark, #212529);
  text-decoration: none;
  transition: color 0.2s ease;
}

.job-card-title a:hover {
  color: var(--bs-primary, #002baa);
}

.job-card-excerpt {
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-base, 16px);
  line-height: 1.6;
  color: var(--text-gray, #6b687d);
  margin: 0;
}

/* Job Tags */
.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bs-white, #ffffff);
  color: var(--bs-dark, #212529);
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: 100px;
}

/* Job Footer */
.job-card-footer {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.job-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: var(--text-base, 16px);
  font-weight: 500;
  color: var(--bs-dark, #212529);
  background: transparent;
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.job-card-link svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.job-card-link:hover {
  border-color: var(--bs-secondary, #ff6b35);
  background: var(--bs-secondary, #ff6b35);
  color: var(--bs-white, #ffffff);
}

.job-card-link:hover svg {
  transform: translateX(4px);
}

.job-card-link:hover svg path {
  fill: var(--bs-white, #ffffff);
}

/* ============================================
   Pagination Bootstrap
   ============================================ */

nav[aria-label*='navigation'] {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 1rem;
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-base, 16px);
  font-weight: 500;
  color: var(--bs-dark, #212529);
  background: white;
  border: 1px solid var(--bs-gray-300, #dee2e6);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-item .page-link:hover {
  background: var(--bs-secondary, #ff6b35);
  color: white;
  border-color: var(--bs-secondary, #ff6b35);
}

.page-item.active .page-link {
  background: var(--bs-secondary, #ff6b35);
  color: white;
  border-color: var(--bs-secondary, #ff6b35);
}

.page-item.disabled .page-link {
  color: var(--bs-gray-400, #ced4da);
  cursor: not-allowed;
  opacity: 0.6;
}

.page-link svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   No Jobs Found
   ============================================ */

.no-jobs-found {
  font-family: var(--font-body, 'Work Sans', sans-serif);
  font-size: var(--text-lg, 18px);
  color: var(--text-gray, #6b687d);
}

/* ============================================
   Loader AJAX
   ============================================ */

.job-list-results {
  position: relative;
  min-height: 400px;
  transition: opacity 0.3s ease;
}

.job-list-results.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.job-list-results.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid var(--bs-gray-300, #dee2e6);
  border-top-color: var(--bs-secondary, #ff6b35);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ============================================
   Responsive
   ============================================ */

/* Tablettes */
@media (max-width: 991.98px) {
  .job-list-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .job-list-section .section-title {
    font-size: var(--display-xs, 36px);
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .filters-row {
    grid-template-columns: 1fr;
  }

  .job-list-cols-2,
  .job-list-cols-3 {
    grid-template-columns: 1fr;
  }

  .job-card-inner {
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
  }

  .job-card-footer {
    justify-content: flex-start;
  }

  .job-card-link {
    width: 100%;
    justify-content: center;
  }

  .job-list-section .section-title {
    font-size: var(--text-3xl, 30px);
  }
}
