/* ===== JOBS PAGE STYLES ===== */
:root {
  --primary-color: #ef5c48;
  --text-dark: #22272b;
  --text-light: #8590a2;
  --bg-light: #f7f8f9;
  --bg-white: #ffffff;
  --border-color: #dee4ea;
  --category-bg: #ffedeb;
  --button-bg: #161a1d;
  --button-text: #ffedeb;
  --transition: all 0.3s ease;
}

/* Base Styles */
.jobs-page {
  width: 100%;
  min-height: auto;
  background-color: #f7f8f9;
  font-family: 'Roboto', sans-serif;
  color: #22272b;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0 0;
  margin-bottom: 0;
}

/* Ensure footer sits directly against jobs page */
#menu_footer {
  margin-top: 0 !important;
}

/* Add a container for the jobs content to control spacing */
.jobs-content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Headings */
.current-job-openings {
  width: 100%;
  text-align: center;
  font-size: 48px;
  font-weight: 700 !important;
  margin: 0 0 60px;
  padding: 0 20px;
  font-family: 'Roboto';
  color: #22272b;
}

/* Dropdowns */
.dropdowns {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 0.5rem;
  display: flex;
  gap: 16px;
  white-space: nowrap;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 10;
  justify-content: center;
  flex-wrap: wrap;
}

.dropdown {
  position: relative;
  min-width: 200px;
}

.dropdown-button {
  position: relative;
  width: 100%;
  height: 56px;
  border-radius: 100px;
  background-color: #f1f2f4;
  border: 1px solid #22272b;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: 'Inter', sans-serif;
  top: -30px; 
}

.arrow-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
  flex-shrink: 0;
  margin-left: 16px;
}

.dropdown.active .arrow-icon {
  transform: rotate(180deg);
}

/* Dropdown options */
.dropdown-options {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee4ea;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}

.dropdown-options.show {
  display: block;
}

.dropdown-option {
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  color: #22272b;
}

.dropdown-option:hover {
  background-color: #f7f8f9;
}

select::-ms-expand {
  display: none;
}

/* Explore Jobs Button */
.explore-jobs-cta {
  background-color: #e34935;
  border: none;
  border-radius: 100px;
  padding: 10px 32px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.explore-jobs {
  font-size: 20px;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  color: #fff;
  line-height: 24px;
}

.explore-jobs-cta:hover {
  background-color: #f15b48;
}

/* Job Listings */
.all-jobs {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.job-listings-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  box-sizing: border-box;
  min-height: auto; /* Ensure it doesn't force a minimum height */
}

.job-listings-grid.empty {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px; /* Reasonable height when no jobs */
  color: var(--text-light);
  font-size: 18px;
  text-align: center;
  padding: 40px 20px;
}

.job-category-group {
  width: 100%;
  max-width: 980px;
  background: #ffffff;
  border: 1px solid #dee4ea;
  border-radius: 16px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.job-category-header {
  position: relative;
  margin: 32px 0 16px 32px;
  border-radius: 8px;
  background-color: #ffedeb;
  width: auto;
  display: inline-flex;
  padding: 8px 16px;
  box-sizing: border-box;
  text-align: left;
  font-size: 16px;
  color: #ef5c48;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

.job-category-list {
  padding: 0;
}

.job-card {
  width: 100%;
  min-height: 100px;
  padding: 20px 32px;
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.job-card:last-child {
  border-bottom: none;
}

.job-card:hover {
  background-color: #fafbfc;
}

.job-category {
  display: none;
}

.job-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
}

.job-details {
  flex: 1;
  padding-right: 20px;
}

.job-title {
  font-size: 20px !important;
  font-weight: 500 !important;
  font-family: Roboto !important;
  color: #22272b;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.job-type {
  font-size: 16px;
  color: #8590a2;
  font-family: Roboto !important;
  margin: 0;
}

/* Apply Button */
.apply-cta {
  background: #000000;
  color: #ffedeb;
  border: 1px solid #000000;
  border-radius: 100px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 100px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.apply-cta:hover {
  background: #333333;
  border-color: #333333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none !important;
}

/* Job Listings Grid */
.job-listings-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.job-listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
  padding: 0 20px;
}

.pagination-btn {
  padding: 10px 20px;
  background-color: #ffffff;
  border: 2px solid #ef5c48;
  border-radius: 100px;
  color: #ef5c48;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #ef5c48;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 92, 72, 0.2);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #cccccc;
  color: #cccccc;
}

.page-info {
  font-size: 14px;
  color: #5f6b7c;
  min-width: 120px;
  text-align: center;
}

/* Mobile Responsive Pagination */
@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    gap: 12px;
    margin: 32px 0;
    padding: 0 16px;
  }
  
  .pagination-btn {
    width: 100%;
    max-width: 200px;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }
  
  .page-info {
    order: -1;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    margin: 28px 0;
    padding: 0 12px;
  }
  
  .pagination-btn {
    height: 42px;
    font-size: 14px;
    max-width: 180px;
  }
  
  .page-info {
    font-size: 13px;
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .jobs-page {
    padding-top: 80px;
  }
  
  .dropdowns {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    margin-top: 0;
    position: relative;
    top: -30px;  /* Move up without affecting flow */
  }
  
  .dropdown {
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .dropdown-button {
    height: 48px;
    font-size: 15px;
    padding: 0 20px;
    margin: 0 auto;
    width: 100%;
    top: -15px;
  }
  
  .arrow-icon {
    right: 16px;
    width: 30px !important;  
    height: 30px !important;  
    margin-left: 12px; 
  }
  
  .job-listings-container {
    margin-top: 10px;
    position: relative;
    top: -20px;  /* Compensate for the dropdown movement */
  }
  
  .current-job-openings {
    font-size: 20px;
    margin-bottom: 20px;
    margin-top: 0;
    padding: 0 16px;
    position: relative;
    top: -40px;  
    font-family: Montserrat;
    font-weight: 800 !important;
  }
  
  .jobs-content-container {
    padding: 0 16px 40px;
  }
  
  .job-category-group {
    border-radius: 12px;
    width: 100%;
    max-width: 980px;
    background: #ffffff;
    border: 1px solid #dee4ea;
    border-radius: 16px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .job-category-header {
    margin: 24px 0 12px 16px;
    padding: 6px 14px;
    font-size: 15px;
  }
  
  .job-card {
    position: relative;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .job-info {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }
  
  .job-details {
    flex: 1;
    min-width: 0; /* Allows text to truncate properly */
    padding-right: 16px;
  }
  
  .job-title {
    font-size: 18px !important;
    margin-bottom: 4px;
    word-break: break-word; /* Ensure long words break */
  }
  
  .apply-cta {
    margin: 12px 0 0 0;
    width: 100%;
    max-width: 120px;
    height: 40px;
    flex-shrink: 0;
    align-self: flex-end;
  }
  
  /* For job cards with very long titles */
  .job-card:has(.job-title:not(:first-child)) .job-info {
    flex-direction: column;
  }
  
  .job-card:has(.job-title:not(:first-child)) .apply-cta {
    margin-top: 12px;
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .dropdown {
    width: 100%;
    max-width: 280px;
  }
  
  .dropdown-button {
    height: 46px;
    font-size: 14px;
    top: -5px;
  }
  
  .arrow-icon {
    width: 18px;  /* Even smaller for very small screens */
    height: 18px;  /* Even smaller for very small screens */
    margin-left: 10px;  /* Reduced margin for very small screens */
    right: 12px;  /* Adjust position for smaller screens */
  }
  
  .dropdown-options {
    width: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 280px;
  }
  
  .current-job-openings {
    font-size: 22px;
    margin-bottom: 24px;
  }
  
  .job-title {
    font-size: 16px !important;
  }
  
  .job-type {
    font-size: 14px;
  }
  
  .job-card {
    padding: 14px 12px;
  }
  
  .apply-cta {
    height: 38px;
    font-size: 13px;
    padding: 0 16px;
  }
  
  .view-all-cta {
    height: 48px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .apply-cta {
    display: flex;
    width: 59px;
    height: 40px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: var(--Colors-Dark-Neutrals-0, #161A1D);
    margin-top: -20px;
  }
}


