#hero .wrapper {
  display: block;
  min-height: auto;
  text-align: center;
}

#hero {
  padding-top: 150px;
  margin-bottom: 150px;
  min-height: max-content;
}

#hero .heading {
  margin-bottom: 14px;
}

#hero .description {
  max-width: 80%;
  margin: 0 auto;
}

#hero.contact-us {
  margin-bottom: 0;
}

#delivered .heading-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.19);
  padding-bottom: 26px;
  margin-bottom: 44px;
}

#delivered .heading-wrap h2 {
  font-weight: bold;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 0;
}

#delivered .heading-wrap img {
  width: 29px;
  object-fit: contain;
}

.portfolio-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.portfolio-wrap.one {
  margin-bottom: 150px;
}

.portfolio-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.31);
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Deal card — mirrors the FBC profile deck: a white logo panel, a grey band
   naming the transaction type, then the ticket size underneath. Used by both
   Completed and In-Process so the two sections read as one set.
   --------------------------------------------------------------------------- */
.portfolio-card {
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.portfolio-card .img-wrap {
  width: 100%;
  height: 150px;
  padding: 26px 30px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card .img-wrap img {
  /* Logos arrive in wildly different aspect ratios — wide wordmarks and tall
     stacked marks alike. Cap both axes and let the narrow ones fill the height
     so a stacked logo isn't left tiny next to a wide one. */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease-in-out;
}

.portfolio-card:hover .img-wrap img {
  transform: scale(1.06);
}

/* Logos supplied as light artwork need the dark plate to stay legible. */
.portfolio-card.dark-bg .img-wrap {
  background: #0b0b0b;
}

.portfolio-card .stage {
  background: #7d7d7d;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
  padding: 10px 14px;
}

.portfolio-card .amount {
  background: #fff;
  color: #172b35;
  font-size: 19px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
  padding: 14px;
  margin-top: auto;
}



.modal .portfolio-card .text-wrap img {
  object-fit: contain;
  height: 100%;
}

.modal .portfolio-card .text-wrap {
  padding: 22px 21px 30px;
  background: #172b35;
  color: #fff;
  height: 100%;
}

.modal .portfolio-card .brand-link {
  font-size: 20px;
  line-height: 31px;
  color: #ffffff8f;
}

.modal .portfolio-card .heading {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1;
}


.modal .portfolio-card {
  border: none;
  overflow: visible;
}

.modal .modal-body {
  padding: 0;
}

.modal-content {
  border-radius: 20px;
  overflow: hidden;
}

.modal .portfolio-card .img-wrap img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #000;
  font-size: 24px;
  cursor: pointer;
  z-index: 20;
}

.portfolio-card .btn-close {
  width: 35px;
  height: 35px;
  object-fit: contain;
  opacity: 1;
  background: none;
}

.modal .portfolio-card .img-wrap {
  height: 233px;
}

.modal .portfolio-card .heading {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  margin-bottom: 23px;
  font-size: 22px;
}

.modal .portfolio-card .description {
  font-size: 20px;
  line-height: 32px;
  font-weight: 500;
}

.modal .portfolio-card li {
  margin-bottom: 9px;
}

.modal .portfolio-card ul {
  padding-left: 1rem;
}

@media only screen and (max-width: 1440px) {
  .portfolio-wrap {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 1199px) {
  .portfolio-card .stage {
    font-size: 15px;
  }

  .portfolio-card .amount {
    font-size: 17px;
  }

  .portfolio-card .img-wrap {
    height: 130px;
    padding: 22px 24px;
  }

  .modal .portfolio-card .heading {
    font-size: 20px;
  }

  #delivered .heading-wrap h2 {
    font-weight: bold;
    font-size: 24px;
  }

  #hero .heading {
    font-size: 46px;
  }

  #hero {
    margin-bottom: 120px;
    padding-bottom: 0;
  }

  #hero .description {
    max-width: 90%;
  }

  .description {
    font-size: 18px;
    line-height: 26px;
  }

  .section-heading {
    font-size: 32px;
    line-height: 50px;
  }
}

@media only screen and (max-width: 991px) {
  .portfolio-wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 575px) {
  #hero .description {
    max-width: 100%;
  }

  .description {
    font-size: 16px;
  }

  #hero {
    padding-block: 130px 0;
  }

  .portfolio-wrap {
    display: grid;
    grid-template-columns: 100%;
    gap: 20px;
  }

  .modal-content {
    height: 100vh;
    width: 100vw;
    border-radius: 0;
  }

  .modal.show .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
}
