.portfolio-section {
  background: linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    url("../../assets/im.png"),
    var(--bg);
  background-repeat: no-repeat, repeat, no-repeat;
  background-size: auto, auto, auto;
  padding: 62px 0 64px;
}

.portfolio-wrap {
  width: min(1220px, calc(100% - (var(--page-pad) * 2)));
  margin-inline: auto;
}

.portfolio-title {
  margin: 0;
  text-align: center;
  color: #151b2a;
  font-size: 44px;
  line-height: 1.06;
  letter-spacing: -0.7px;
}

.portfolio-subtitle {
  margin: 14px auto 32px;
  max-width: 760px;
  text-align: center;
  color: #666f80;
  font-size: 16px;
  line-height: 1.45;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portfolio-card {
  background: #f3f4f6;
  border: 1.25px solid #d2d8e2;
  border-radius: 20px;
  width: 100%;
  max-width: 397.3333435058594px;
  height: 486.6666564941406px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  justify-self: center;
}

.portfolio-card h3 {
  margin: 0 0 10px;
  color: #1a2132;
  font-size: 28px;
  line-height: 1.2;
}

.portfolio-card p {
  margin: 0 0 14px;
  color: #666e7f;
  font-size: 16px;
  line-height: 1.45;
}

.portfolio-image {
  width: 100%;
  height: 154px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  margin-top: auto;
  border: 1px solid #d2d8e2;
}

.portfolio-card:nth-child(2) .portfolio-image {
  border: 2px solid #f0c82e;
}

.portfolio-btn {
  margin-top: 12px;
  min-height: 44px;
  border: 1px solid #c9d0de;
  border-radius: 11px;
  text-decoration: none;
  color: #33469f;
  background: #e9ecf4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
}

.portfolio-help {
  margin-top: 20px;
  background: #f3f4f6;
  border: 1px solid #d3d9e3;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portfolio-help h4 {
  margin: 0 0 8px;
  color: #1d2435;
  font-size: 16px;
  line-height: 1.1;
}

.portfolio-help h4 span {
  color: #2f419d;
}

.portfolio-help p {
  margin: 0;
  color: #667082;
  font-size: 12px;
}

.portfolio-help a {
  text-decoration: none;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 11px;
  background: #2f419d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .portfolio-title {
    font-size: 42px;
  }

  .portfolio-subtitle {
    font-size: 16px;
  }

  .portfolio-card h3 {
    font-size: 28px;
  }

  .portfolio-card p {
    font-size: 12px;
  }

  .portfolio-btn {
    font-size: 12px;
  }

  .portfolio-help h4 {
    font-size: 16px;
  }

  .portfolio-help p {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portfolio-card {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .portfolio-help {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .portfolio-section {
    padding: 38px 0 42px;
  }

  .portfolio-title {
    font-size: 30px;
  }

  .portfolio-subtitle {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .portfolio-card {
    min-height: 0;
    padding: 12px;
    border-radius: 12px;
  }

  .portfolio-card h3 {
    font-size: 22px;
  }

  .portfolio-card p {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .portfolio-image {
    height: 130px;
    border-radius: 10px;
  }

  .portfolio-btn {
    min-height: 38px;
    font-size: 14px;
    border-radius: 9px;
  }

  .portfolio-help {
    margin-top: 14px;
    padding: 12px;
  }

  .portfolio-help h4 {
    font-size: 24px;
  }

  .portfolio-help p {
    font-size: 13px;
  }

  .portfolio-help a {
    width: 100%;
    min-height: 42px;
    font-size: 14px;
  }
}
