/* importing fonts */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  /* global colors */
  --primary-color: #205781;
  --secondary-color: #dce6ff;
  --text-color: #585858;
  --dark-text-color: #050315;
  --accent-color: #154344;
  --gray-background-color: #fdfdfd;
  --whhite-background-color: #ffffff;

  /* global fonts */
  --primary-font-family: "Bricolage Grotesque", sans-serif;
  --primary-font-size: 54px;
  --primary-font-weight: 700;

  --secondary-font-family: "Bricolage Grotesque", sans-serif;
  --secondary-font-size: 20px;
  --secondary-font-weight: 700;

  --text-font-family: "Open Sans", sans-serif;
  --text-font-size: 14px;
  --text-font-weight: 500;

  --accent-font-family: "Open Sans", sans-serif;
  --accent-font-size: 14px;
  --accent-font-weight: 600;

  /* border */
  --border: solid 1px #d9d9d9;

  /* box shadow */
  --box-shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --box-shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#jobListing {
  width: 100%;
  max-width: 1280px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#jobListing * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

#jobListing .row {
  display: flex;
  flex-direction: row;
  flex: 1;
  column-gap: 10px;
}

#jobListing .col {
  display: flex;
  flex-direction: column;
  flex: 1;
  row-gap: 10px;
}

#jobListing a {
  text-decoration: none;
  display: inline-block;
}

#jobListing .container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  gap: 30px;
}

/* sidebar */
#jobListing .sidebar {
  flex: 1;
  gap: 20px;
}
#jobListing .jobs-content {
  flex: 4;
}
#jobListing .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: var(--border);
  border-color: var(--accent-color);
  margin-top: 10px;
}
#jobListing .sidebar-heading {
  color: var(--accent-color);
  font-family: var(--primary-font-family);
  font-weight: 600 !important;
  font-size: 18px;
  margin: 0;
}
#jobListing .reset-button {
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 500;
  font-size: 14px;
  transition: ease 0.3s;
}
#jobListing .reset-button:hover {
  color: var(--accent-color);
}
#jobListing .filter-group {
  padding-bottom: 15px;
  border-bottom: var(--border);
}
#jobListing .filter-group:nth-of-type(2),
#jobListing .filter-group:last-of-type {
  border: none;
  margin: 0;
  padding: 0;
}
#jobListing .search {
  width: 100%;
  display: flex;
  align-items: center;
  color: var(--accent-color);
  font-weight: 500;
  font-size: 18px;
}
#jobListing .search ion-icon {
  margin-left: 13px;
  margin-right: -30px;
}
#jobListing .search input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  background-color: #fff;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 14px;
  outline: none;
  border: var(--border);
  border-radius: 5px;
}
#jobListing .search input:focus {
  border-color: var(--accent-color);
}
#jobListing .filter-heading {
  color: var(--dark-text-color);
  font-family: var(--primary-font-family);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  margin-bottom: 15px;
}
#jobListing .filter-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#jobListing .filter-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
}
#jobListing .filter-item input {
  accent-color: var(--accent-color);
}
#jobListing .filter-item label {
  width: 100%;
}

/* content */
/* View toggle icons */
#jobListing .job-count,
#jobListing .sort-by,
#jobListing .view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
#jobListing .job-count select,
#jobListing .sort-by select {
  width: inherit !important;
}
#jobListing .view-icon {
  cursor: pointer;
  font-size: 20px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

#jobListing .view-icon.active {
  color: var(--accent-color);
}

/* List view styles */
#jobListing .jobs.list-view {
  flex-direction: column;
}
#jobListing .jobs.list-view .jobs {
  gap: 10px;
}

#jobListing .jobs.list-view .job {
  max-width: 100%;
  display: flex;
  flex-direction: row;
  gap: 15px;
  padding: 10px 15px;
  height: auto;
}

#jobListing .jobs.list-view .job img {
  width: 200px;
  height: 150px;
  object-fit: cover;
}

#jobListing .jobs.list-view .job .body {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#jobListing .content-header {
  border-bottom: var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
#jobListing .content-header .col:first-child {
  justify-content: flex-end;
  row-gap: 0;
}
#jobListing .content-header .showing-text {
  margin: 0;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 3px;
}
#jobListing .content-header .col:last-child {
  flex: 3;
}
#jobListing .content-header .col:last-child .row {
  justify-content: flex-end;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 14px;
  gap: 15px;
}
#jobListing .content-header .col:last-child select {
  outline: none;
  border: var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--dark-text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 12px;
}
#jobListing .content-header .col:last-child select:focus {
  border-color: var(--accent-color);
}
#jobListing .jobs {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
#jobListing .jobs-msg {
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 500;
  font-size: 16px;
}
#jobListing .job {
  width: 100%;
  max-width: calc(33.33% - 13.3px);
  background-color: #fff;
  border: var(--border);
  border-radius: 7px;
  overflow: hidden;
  transition: ease 0.3s;
}
#jobListing .jobs.list-view .job .head {
  display: none;
}
#jobListing .job:hover {
  border-color: var(--accent-color);
}
#jobListing .job .image-container {
  width: 100%;
  height: 200px;
}
#jobListing .job img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#jobListing .job .body {
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
#jobListing .jobs.list-view .job .body {
  flex-direction: row;
  align-items: center;
}
#jobListing .job h3,
#jobListing .job p {
  margin: 0;
}
#jobListing .job .title {
  color: var(--accent-color);
  font-family: var(--primary-font-family);
  font-weight: 600;
  font-size: 18px;
  transition: ease 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
#jobListing .job .title:hover {
  color: var(--primary-color);
}
#jobListing .job .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
#jobListing .job .skill {
  padding: 5px;
  border: var(--border);
  border-radius: 3px;
  background-color: #e8eff7;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 12px;
}
#jobListing .job .specs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-color);
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 14px;
}
#jobListing .jobs.list-view .job .specs {
  flex-direction: row;
  gap: 30px;
}
#jobListing .jobs.list-view .job .specs strong {
  display: none;
}
#jobListing .jobs.list-view .job .spec {
  width: 120px;
}

/* pagination */
#jobListing .pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
#jobListing .pagination a {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  border-radius: 50%;
  font-family: var(--accent-font-family);
  font-weight: 400;
  font-size: 16px;
  transition: ease 0.3s;
}
#jobListing .pagination .prev,
#jobListing .pagination .next {
  width: 50px;
  height: 50px;
  background-color: #e7eef7;
  font-size: 18px;
}
#jobListing .pagination .prev {
  margin-right: 10px;
}
#jobListing .pagination .next {
  margin-left: 10px;
}
#jobListing .pagination .prev:hover,
#jobListing .pagination .next:hover {
  background-color: var(--accent-color);
  color: #fff;
}
#jobListing .pagination .page:hover,
#jobListing .pagination .page.active {
  background-color: var(--accent-color);
  color: #fff;
}
/* Hide Sidebar and show filter toggle on small screens */
@media screen and (max-width: 1120px) {
  #jobListing .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
  }

  #jobListing .sidebar.active {
    transform: translateX(0);
  }

  #jobListing .mobile-filter-toggle {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #fff;
    color: var(--dark-text-color);
    cursor: pointer;
    font-family: var(--text-font-family);
    font-weight: 500;
    font-size: 12px;
    border: var(--border);
    border-radius: 5px;
  }
}

/* Show sidebar normally on wider screens */
@media screen and (min-width: 1121px) {
  #jobListing .mobile-filter-toggle {
    display: none;
  }
}
@media screen and (max-width: 1120px) {
  #jobListing .sidebar .close-sidebar {
    display: block;
    font-size: 24px;
    text-align: right;
    margin-bottom: 10px;
    cursor: pointer;
  }
}
@media screen and (max-width: 880px) {
  #jobListing .jobs {
    gap: 15px;
  }
  #jobListing .job {
    max-width: calc(33.33% - 10px);
  }
}
@media screen and (max-width: 725px) {
  #jobListing .job {
    max-width: calc(50% - 8px);
  }
}
@media screen and (max-width: 500px) {
  #jobListing .content-header .col:last-child {
    flex: 2;
  }
  #jobListing .job-count,
  #jobListing .sort-by {
    display: none;
  }
  #jobListing .jobs {
    justify-content: center;
  }
  #jobListing .job {
    max-width: 100%;
  }
}
@media screen and (max-width: 900px) {
  #jobListing .jobs.list-view .body {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
  }
  #jobListing .jobs.list-view .body .specs {
    gap: 10px !important;
    flex-wrap: wrap !important;
    row-gap: 0 !important;
  }
  #jobListing .jobs.list-view .body .spec {
    width: inherit;
    border-right: var(--border);
    padding-right: 10px;
  }
  #jobListing .jobs.list-view .body .spec:last-of-type {
    border: none;
  }
}

#jobListing .filter-group select.filter-select {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--accent-font-family);
  font-size: var(--accent-font-size);
  color: #6f6f6f;
  border: var(--border);
  border-radius: 5px;
  background: #fff;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%236f6f6f" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  cursor: pointer;
}
#jobListing .filter-group select.filter-select:hover,
#jobListing .filter-group select.filter-select:focus {
  border-color: var(--accent-color);
}
#jobListing .filter-group select.filter-select:disabled {
  background-color: #f5f5f5;
  color: #aaa;
  cursor: not-allowed;
}

#job-results-grid.grid-view {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

#job-results-list.list-view {
  flex-direction: column;
}
