.hero {
  margin-top: 100px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
  min-height: calc(100vh - 140px);
  box-sizing: border-box;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
}

.hero::before {
  content: "";
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
}

.right {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

.right h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  text-shadow: 0 10px 10px rgba(0, 0, 0, 0.08);
  color: var(--text-color);
}

.right p {
  font-size: 22px;
  line-height: 1.5;
  margin-top: -20px;
  color: var(--text-muted);
  text-align: left;
}

.main-img {
  width: 550px;
  max-width: 100%;
  border-radius: 20px;
  margin-left: 50px;
  flex-shrink: 0;
}

.btn {
  display: flex;
  gap: 20px;
}

.btn a {
  font-size: 22px;
  background-color: var(--primary-color);
  color: var(--background-color);
  border-radius: 25px;
  border: 2px solid var(--primary-color);
  padding: 18px 36px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.13);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: fit-content;
  white-space: nowrap;
  text-decoration: none;
}

.btn a:last-child {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
}

.btn a:hover {
  background-color: var(--box-color);
  color: var(--primary-color);
  transform: translateY(-6px);
}

.btn a:last-child:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.learners {
  display: flex;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.learners > img:first-child {
  margin-left: 0;
}

.learners > img {
  pointer-events: none;
  border-radius: 50%;
  margin-left: -25px;
  width: 60px;
  height: 60px;
  object-fit: cover;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--background-color);
}

.learners > div {
  font-size: 18px;
  font-weight: 500;
  margin-left: 20px;
  color: var(--text-color);
  text-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}
.learners-span {
  font-weight: 700;
  color: var(--primary-color);
}

.mid-nav a.currentPage {
  opacity: 1;
}

/* Featured in logos */
.featured-logos {
  margin: 80px auto 60px;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.featured-logos h2 {
  font-size: 2rem;
  color: var(--text-muted);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.logo-list img {
  width: 120px;
  height: auto;
  filter: brightness(0);
  opacity: 0.5;
  transition: all 0.4s ease;
}

.logo-list img:hover {
  filter: brightness(1);
  opacity: 1;
  transition: all 0.4s ease;
}

body.darkmode .logo-list img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

body.darkmode .logo-list img:hover {
  opacity: 1;
}

/* Why JobConnect */

.benefits {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 80px auto 60px;
  max-width: 1200px;
}
.benefits::before {
  content: "";
  width: 100%;
  height: 100%;
  border-top: 1px solid var(--text-muted);
}

.benefits h3 {
  font-size: 2.4rem;
  color: var(--primary-color);
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.benefits-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  scale: calc(0.85);
}
.benefit-item {
  background-color: var(--box-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 30px;
  flex: 1;
  min-width: 320px;

  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(2px);

  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease,
    box-shadow 0.3s ease;
}

.benefit-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.benefits-cards .benefit-item.show:nth-child(1) {
  transition-delay: 60ms;
}
.benefits-cards .benefit-item.show:nth-child(2) {
  transition-delay: 140ms;
}
.benefits-cards .benefit-item.show:nth-child(3) {
  transition-delay: 220ms;
}
.benefits-cards .benefit-item.show:nth-child(4) {
  transition-delay: 300ms;
}

.benefit-item:hover {
  box-shadow: 0 0 14px rgba(var(--primary-color-rgb), 0.35);
}

.benefit-item svg {
  margin-bottom: 20px;
  /* ensure both strokes and fills of internal shapes are colored (works for inline SVG) */
  stroke: var(--secondary-color);
}

/* Target common internal SVG elements (only works for inline SVG) */
.benefits-cards .benefit-item:nth-child(3) svg path,
.benefits-cards .benefit-item:nth-child(3) svg circle,
.benefits-cards .benefit-item:nth-child(3) svg rect,
.benefits-cards .benefit-item:nth-child(3) svg polygon,
.benefits-cards .benefit-item:nth-child(3) svg line,
.benefits-cards .benefit-item:nth-child(3) svg polyline,
.benefits-cards .benefit-item:nth-child(3) svg g {
  stroke: var(--secondary-color);
  fill: var(--secondary-color);
}

.benefit-item h3 {
  font-size: 1.5rem;
  color: var(--primary -color);
  margin-bottom: 10px;
}
.benefit-item p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Recent Jobs  */
.recent-jobs {
  background-color: var(--box-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding: 30px 20px 40px;
  margin: 60px auto 100px;
}

.recent-jobs h2 {
  font-size: 2.8rem;
  word-spacing: 3.5px;
  text-align: center;
  padding-top: 20px;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-list {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}
.job-item {
  background-color: var(--box-color);
  border-radius: 12px;
  padding: 20px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px);
  border: 1px solid transparent;
  transition: all 0.5s;
}

.job-item.show {
  opacity: 1;
  transform: translateY(0);
}

.job-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
  border: 1px solid var(--primary-color);
}

.job-item h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-detail-category {
  /* might add js to go the current category */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--primary-color);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 10px 0;
}
.job-location {
  font-size: 1.1rem;
}
.job-salary {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}
.job-view-details:link,
.job-view-details:visited {
  text-decoration: none;
  background-color: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  padding: 10px 20px;
  margin-top: 10px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.job-view-details:hover,
.job-view-details:active {
  background-color: var(--box-color);
  color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--primary-color);
}

.blurred {
  transition: filter 0.3s;
  filter: opacity(0.5);
}

/* How it works */
.how-it-works {
  display: flex;
  flex-direction: column;
}
.heading-how {
  text-align: center;
}
.heading-how h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.heading-how p {
  font-size: 1.2rem;
  color: var(--text-muted);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--text-muted);
}

.heading-how p span {
  font: bold;
  color: var(--text-color);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.step {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 60px;
  align-items: center;

  opacity: 0;
  transform: translateY(-60px) translateX(30px);
  transition: all 1s ease;
}

/* Even items slide from the opposite side */
.step:nth-child(even) {
  transform: translateY(60px) translateX(-30px);
}

.step.show {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.step-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
.step-text:nth-child(even) {
  margin-left: 20px;
}
.step-text span {
  font-size: 4rem;
  color: var(--text-muted);
  font-weight: bold;
}
.step-text h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.step-img {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.step-img::after {
  content: "";
  background-color: var(--primary-color);
  width: 350px;
  height: 350px;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  opacity: 0.15;
  pointer-events: none;
}
.step-img::before {
  content: "";
  background-color: var(--primary-color);
  width: 275px;
  height: 275px;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
}

.step-img img {
  width: 60%;
  max-width: 100%;
  height: auto;
}

@media (max-width: 1200px) {
  .right h1 {
    font-size: 56px;
  }
  .right p {
    font-size: 20px;
  }
  .hero {
    padding: 40px 30px;
    gap: 30px;
  }

  .main-img {
    width: 450px;
    margin-left: 30px;
  }

  .learners {
    display: flex;
    flex-wrap: nowrap;
  }
  .learners img {
    width: 50px;
    height: 50px;
    margin-left: -20px;
  }

  .btn button {
    font-size: 19px;
  }
  .btn a {
    font-size: 16px;
    padding: 14px 28px;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  .steps {
    gap: 50px;
  }
  .step {
    column-gap: 40px;
  }
  .step:nth-child(even) {
    column-gap: 40px;
  }
}

@media (max-width: 1025px) {
  .hero {
    flex-direction: column;
    margin-top: 50px;
    gap: 40px;
    text-align: center;
    padding: 40px 20px 80px;
  }

  .right {
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 18px;
  }

  .right > h1 {
    font-size: 48px;
  }

  .right p {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
  }

  .btn button {
    font-size: 14px;
    padding: 14px 28px;
    width: 100%;
    max-width: 300px;
  }
  .btn a {
    font-size: 14px;
    padding: 14px 28px;
    width: 100%;
    max-width: 300px;
  }

  .main-img {
    width: clamp(280px, 60vw, 520px);
    margin-left: 0;
  }

  .learners > img {
    width: 45px;
    height: 45px;
    margin-left: -12px;
  }

  .learners > img:first-child {
    margin-left: 0;
  }

  .learners > div {
    font-size: 16px;
    margin-left: 18px;
  }

  .steps {
    gap: 40px;
  }
  .step {
    column-gap: 30px;
  }
  .step:nth-child(even) {
    column-gap: 30px;
  }
  .step-img::after {
    width: 300px;
    height: 300px;
  }
  .step-img::before {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 800px) {
  .benefits h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .step {
    grid-template-columns: 1fr;
    column-gap: 20px;
    row-gap: 16px;
  }
  .step-img {
    grid-row: 1;
  }
  .step-text {
    grid-row: 2;
  }
  .step-text:nth-child(even) {
    margin-left: 0;
  }
  .step-img img {
    width: 75%;
  }
  .step-img::after {
    width: min(90vw, 420px);
    height: min(90vw, 420px);
  }
  .step-img::before {
    width: min(75vw, 360px);
    height: min(75vw, 360px);
  }
}

@media (max-width: 480px) {
  .hero {
    margin-top: 50px;
    padding: 20px 15px 100px;
    gap: 30px;
  }

  .right h1 {
    font-size: 40px;
  }

  .right p {
    font-size: 16px;
  }

  .btn a {
    font-size: 14px;
    padding: 14px 28px;
    width: 100%;
    max-width: 300px;
  }

  .learners > img {
    width: 40px;
    height: 40px;
    margin-left: -10px;
  }

  .learners > img:first-child {
    margin-left: 0;
  }

  .learners > div {
    font-size: 14px;
  }

  .featured-logos {
    margin: 0;
  }

  .benefits h3 {
    font-size: 1.5rem;
  }

  .steps {
    gap: 30px;
  }
  .step {
    column-gap: 16px;
    row-gap: 16px;
  }
  .step-img {
    grid-row: 1;
  }
  .step-text {
    grid-row: 2;
  }
  .step-img img {
    width: 85%;
  }
  .step-img::after {
    width: 300px;
    height: 300px;
  }
  .step-img::before {
    width: 250px;
    height: 250px;
  }
}
