@import "/src/styles/helpers";

.section {
  @include darkSection;
  @include regularFont;

  display: flex;
  flex-direction: column;
  text-align: center;
  padding-top: 2em;

  p {
    text-align: justify;
    text-justify: distribute-all-lines;
    margin: 0 auto 0 auto;
    width: 42em;
    max-width: 70vw;
    line-height: 1.7;
    font-size: 0.85rem;
  }
}

.cityGroupsContainer {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 3rem;
  width: 100%;
  position: relative;
}

.cityGroup {
  position: relative;
  padding: 3rem 2rem;
  border-radius: 8px;
  min-height: 400px;
  width: 65%;
  margin: 0 auto 6rem auto;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: bottom !important;

  > * {
    position: relative;
    z-index: 1;
  }

  &::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, transparent, $accent_colour, transparent);
    z-index: 1;
  }

  @media (max-width: 768px) {
    width: 90%;
    padding: 2rem 1rem;
    margin-bottom: 4rem;

    &::after {
      bottom: -2rem;
      width: 80%;
    }
  }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
  z-index: -1;
  border-radius: 8px;
}

.cityTitle {
  display: none;
}

.cityDescription {
  font-size: 1rem;
  color: rgba($white, 0.9);
  margin-bottom: 2rem;
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  line-height: 1.5;
}

.jobsContainer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.offsetLeft .jobsContainer {
  align-items: flex-start;
}

.offsetRight .jobsContainer {
  align-items: flex-end;
}

.locationMarker {
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translate(-50%, 50%);
  background: $accent_colour;
  color: $white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

  @media (max-width: 768px) {
    bottom: -2rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}

.job {
  @include lightSection;
  background-color: rgba(255, 255, 255, 0.95);
  width: 45%;
  padding: 0.75em;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

  .largerText {
    font-size: 1.1em;
  }

  .redText {
    color: $accent_colour;
  }

  .industry {
    margin-top: 8px;
    text-align: right;
    font-size: 0.9em;
  }

  @media (max-width: 1024px) {
    width: 60%;
  }

  @media (max-width: 768px) {
    width: 85%;
  }

  @media (max-width: 480px) {
    width: 95%;
  }
}

.showMoreBtn {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  color: $white;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.75rem;
  border: 1px solid rgba($white, 0.4);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(0, 0, 0, 0.5);
    color: $white;
    border-color: rgba($white, 0.6);
  }

  svg {
    font-size: 1rem;
  }
}