{# ============================== #}
{#            CARD BASE           #}
{# ============================== #}

.flexi-card-outer {
  height: 100%;
}

.c-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
  padding-bottom: 10px;
}

.c-card img {
  display: block;
  margin: auto;
  flex-shrink: 0;
}

.c-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  h5 {
    color: #1f508f;
  }
}

.filter-card {
  display: flex;
  flex-direction: column;
}

.c-card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;

  > [class*="hs_cos_wrapper"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  h5:first-child {
    min-height: 2.5em;
    margin: 0 0 0.35em;
  }

  p {
    margin: 0;
  }

  p + p {
    margin-top: 0.5em;
  }

  [class*="hs_cos_wrapper"] > a.cta-tertiary,
  [class*="hs_cos_wrapper"] > p:has(a.cta-tertiary) {
    margin-top: 2.5em;
    align-self: flex-start;
  }

  [class*="hs_cos_wrapper"] > p:has(a.cta-tertiary) {
    margin-bottom: 0;
  }

  a.cta-tertiary {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 10px 25px !important;
  }
}

.c-card-content blockquote {
  margin: 0 0 25px 0;
  padding-left: 0;
  border-left: 0;
}

{# ============================== #}
{#        TEAM CARD LAYOUT        #}
{# ============================== #}

.c-card-mod {
  position: relative;
  z-index: 1;
}

.c-card-mod .c-social-team-con {
  position: absolute;
  bottom: 25px;
  display: inline-flex;
}

.c-card-mod .c-social-team-con a {
  padding-left: 0;
  padding-right: 10px;
}

{# ============================== #}
{#            BUTTONS             #}
{# ============================== #}

.c-card-btn-con {
  padding-top: 30px;
  margin-top: auto;
}

.load-more-row {
  margin-top: 25px;
}

.load-more-btn {
  cursor: pointer;
}

{# ============================== #}
{#         FILTER + SEARCH        #}
{# ============================== #}

.filter-row {
  display: flex;
  flex-wrap: nowrap;
  flex-flow: nowrap !important;
  margin-bottom: 15px;
}

.search-bar {
  margin-left: 15px;
  width: 360px;
}

{# ============================== #}
{#        MOBILE RESPONSIVE       #}
{# ============================== #}

@media (max-width: 575px) {
  .filter-row {
    flex-direction: column;
    flex-flow: wrap !important;
    width: 100%;
    padding-right: 15px;
  }

  .filter-container {
    width: auto !important;
    flex-direction: column;
  }

  .filter-container .select-container {
    width: 100%;
  }

  .search-bar {
    width: auto;
    margin-bottom: 10px;
  }
}

{# ============================== #}
{#    EQUAL-HEIGHT OPACITY CLOAK  #}
{# ============================== #}

.portfolio-grid:not(.vc-heights-ready) .c-card {
  opacity: 0;
}
.portfolio-grid.vc-heights-ready .c-card {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

.portfolio-grid.vc-space-between {
  .c-card-text {
    > [class*="hs_cos_wrapper"] {
      justify-content: space-between;
      align-items: stretch;
    }

    h5:first-child {
      flex-shrink: 0;
      min-height: 0;
      margin: 0;
    }

    h5:has(> img) {
      line-height: 0;
    }

    h5 img {
      display: block;
      flex-shrink: 0;
      margin-inline: auto;
    }

    p {
      flex-shrink: 0;
    }

    [class*="hs_cos_wrapper"] > a.cta-tertiary,
    [class*="hs_cos_wrapper"] > p:has(a.cta-tertiary) {
      margin-top: 0;
      flex-shrink: 0;
    }
  }
}
