/* =========================================
   1. VARIABLES & BASE STYLES
   ========================================= */
:root {
  /* Typography */
  font-size: 10px;
  /* Base font size for easy rem calculations */
}

body {
  margin: 0;
  color: var(--color-black);
  font-size: 1.6rem;
  /* Default font size */
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

.job-details {
  font-family: freight-sans-pro-1, sans-serif;
  background-color: #F0F0F0;
}

/* =========================================
   2. JOB DETAILS HEADER
   ========================================= */
.job-details__header {
  background-color: var(--color-blue);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  box-sizing: border-box;
}

.job-details__breadcrumb {
  width: 100%;
  max-width: 144rem;
  padding: 1.6rem 2rem;
  margin-left: auto;
  margin-right: auto;
}

.breadcrumb__link {
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 160%;
}

.breadcrumb__separator,
.breadcrumb__current {
  font-weight: 400;
}

.job-details__title {
  color: var(--color-white);
  width: 100%;
  max-width: 144rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
  font-size: 3.6rem;
  font-style: normal;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: 0;
  word-break: break-word;
}

/* =========================================
   3. MAIN LAYOUT CONTAINER
   ========================================= */
.job-details__container {
  padding: 3rem 2rem;
  width: 100%;
  max-width: 144rem;
  margin-left: auto;
  margin-right: auto;
}

.job-details__section {
  margin: 0 auto;
}

.job-details__layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 4.8rem;
}

/* =========================================
   4. JOB DESCRIPTION (Left Column)
   ========================================= */
.job-description {
  width: 100%;
  overflow: hidden;
}

.job-description .apply-button {
  margin-top: 2.8rem;
}

.job-description__meta {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 2.4rem;
}

.job-description__location {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.job-description__location-icon {
  flex-shrink: 0;
}

.job-description__heading,
.job-description__content h2.title {
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: 0;
  /* margin-bottom: 2.4rem; */
}

.job-description__content h2.title:nth-of-type(n + 2) {
  margin-top: 4rem;
}

.job-description__content {
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 150%;
}

.job-description__content p {
  margin-bottom: 1.5rem;
}

.job-description__content ul {
  list-style-position: inside;
  padding-left: 1rem;
}

/* =========================================
   5. JOB SUMMARY (Right Column)
   ========================================= */
.job-summary {
  width: 100%;
  flex-shrink: 0;
}

.job-summary__card {
  padding: 2.4rem;
  border-radius: 1.6rem;
  background-color: var(--color-white);
}

.job-summary__title {
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: 0;
  margin-bottom: 1.2rem;
}

.job-summary__list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.job-summary__list-divider {
  width: 100%;
  height: 0.1rem;
  background-color: #DCDCDC;
}

.job-summary__item {
  display: flex;
  flex-direction: row;
  gap: 3.2rem;
}

/* Hide item if value is empty */
.job-summary__item:has(.job-summary__value:empty) {
  display: none;
}

.job-summary__label {
  margin: 0;
  letter-spacing: 0.02rem;
  width: 36%;
  flex-shrink: 0;
  color: var(--color-dark-blue);
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 160%;
}

.job-summary__value {
  margin: 0;
  color: var(--color-dark-blue);
  letter-spacing: 0.02rem;
  word-break: break-word;
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 160%;
}

.job-summary__actions {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 1.6rem;
}

/* Hide desktop buttons on mobile */
.job-summary .btn {
  display: none;
}

.job-summary__contact {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}

.job-summary__share {
  margin-top: 2.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.job-summary__share-title {
  font-size: 2rem;
  /* h6 equivalent */
  margin-bottom: 1.2rem;
}

.job-summary__share-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.job-summary__share-links a svg {
  width: 2.8rem;
  height: 2.8rem;
}

.job-summary__share-links a.btn-facebook svg {
  color: #0866FF;
}

.job-summary__share-links a.btn-linkedin svg {
  color: #0077B5;
}

/* =========================================
   6. INTERACTIVE ELEMENTS (Buttons & Overlays)
   ========================================= */
.apply-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  background-color: var(--color-dark-blue);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  color: var(--color-white);
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 160%;
  width: max-content;
}

.share-button-container {
  position: relative;
  /* width: 100%; */
}

.job-share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  background-color: var(--color-light-blue);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  color: var(--color-dark-blue);
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 500;
  line-height: 160%;
  width: max-content;
}

.apply-button svg,
.job-share-button svg {
  width: 1.4rem;
  height: 1.4rem;
}

.share-overlay {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: .8rem;
  overflow: hidden;
  display: flex;
  /* Flex is defined but set to none below, assuming toggled via JS */
  flex-direction: column;
  width: 100%;
  height: auto;
  background-color: #ffffff;
  border: 0.1rem solid var(--color-gray);
  display: none;
  min-width: 24rem;
}

.share-links-wrapper {
  display: flex;
  flex-direction: column;
}

.share-link-item {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  padding-left: 2.4rem;
  padding-right: 2.4rem;
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 2.4rem;
  letter-spacing: 0.02rem;
  cursor: pointer;
}

.share-link-item:hover {
  background-color: var(--color-blue);
  color: #ffffff;
}

/* =========================================
   7. RESPONSIVE STYLES (Tablet - 768px+)
   ========================================= */
@media (min-width: 768px) {

  /* Header & Layout */
  .job-details__header {
    padding: 3rem 0 6rem;
    gap: 2rem;
  }

  .job-details__header .job-details__title {
    font-size: 6.4rem;
    /* h4 equivalent */
    gap: 5.6rem;
    padding: 0 6rem;
  }

  .job-details__breadcrumb {
    padding: 1.6rem 6rem;
  }

  .job-details__container {
    padding: 5rem 8rem;
  }

  /* Headings */
  .job-description__heading,
  .job-description__content h2.title,
  .job-summary__title {
    font-size: 2.4rem;
  }

  .job-summary__card {
    position: sticky;
    top: 13rem;
  }

  /* Buttons */
  .btn--mobile-only {
    display: none;
  }

  .job-summary .btn {
    display: flex;
  }
}

/* =========================================
   8. RESPONSIVE STYLES (Desktop - 1024px+)
   ========================================= */
@media (min-width: 1024px) {
  .job-details__layout {
    flex-direction: row;
  }

  /* Sidebar/Summary */
  .job-summary {
    width: 39.7rem;
  }

  /* Header & Layout */
  .job-details__header .job-details__title {
    /* padding: 0 6rem; */
  }

  .job-details__breadcrumb {
    /* padding: 1.6rem 6rem; */
  }

  /* Content Spacing */
  .job-description {
    margin-bottom: 0;
  }

  .job-description__meta {
    margin-bottom: 4.7rem;
  }

  .job-summary__title {
    margin-bottom: 2.4rem;
  }

  .job-summary__list {
    margin-bottom: 2.4rem;
  }
}

.job-summary__item ul li {
  margin: 0;
  color: var(--color-dark-blue);
  font-size: 1.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 2.4rem;
  letter-spacing: 0.02rem;
  word-break: break-word;
}