/*-- -------------------------- -->
<---          Portfolio         -->
<--- -------------------------- -*/
/* Base Styles */
@media (min-width: 0rem) {
  #portfolio {
    background-color: #f7f7f7;
    padding: var(--sectionPadding);
    overflow: hidden;
  }

  #portfolio .cs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    max-width: 34.375rem;
    width: 100%;
    gap: clamp(3rem, 6vw, 4rem);
  }

  #portfolio .cs-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 80rem;
    text-align: left;
  }

  #portfolio .cs-flex {
    max-width: 40rem;
    width: 100%;
    text-align: left;
  }

  #portfolio .cs-title {
    max-width: 20ch;
    margin: 0;
  }

  #portfolio .cs-text {
    position: relative;
    max-width: 40rem;
    z-index: 1;
  }

  #portfolio .cs-text::after {
    content: "";
    display: block;
    margin-top: 1.5rem;
    height: 1px;
    width: 100%;
    background: var(--primary);
    opacity: 0.2;
  }

  #portfolio .cs-card-group {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    row-gap: 2rem;
    margin: 0;
    padding: 0;
  }

  #portfolio .cs-item {
    list-style: none;
    grid-column: span 12;
    position: relative;
  }

  #portfolio .cs-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
  }

  #portfolio .cs-link:hover {
    text-decoration: none;
  }

  #portfolio .cs-picture {
    position: relative;
    display: block;
    height: clamp(12.5rem, 25vw, 16.875rem);
    width: 100%;
    overflow: hidden;
    z-index: -1;
    border-radius: 0.5rem;
  }

  #portfolio .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
    padding: 0;
    transition: transform 1.5s ease;
    z-index: -1;
  }

  #portfolio .cs-item:hover .cs-picture img {
    transform: translateY(-140px);
  }

  #portfolio .cs-h3 {
    margin: 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2em;
    color: var(--headerColor);
  }

  #portfolio .cs-item-text {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.5em;
    color: var(--bodyTextColor);
    margin-bottom: 1.5rem;
    text-align: inherit;
  }

  #portfolio .cs-button-solid {
    margin-top: auto;
    align-self: flex-start;
  }
}

/* Medium & Up */
@media (min-width: 48rem) {
  #portfolio .cs-container {
    max-width: 80rem;
  }

  #portfolio .cs-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #portfolio .cs-flex {
    width: 40vw;
    flex: none;
  }

  #portfolio .cs-text {
    padding: 0.75rem 0 0.75rem 1.5rem;
  }

  #portfolio .cs-text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 1px;
    margin: 0 1.5rem 0 0;
    background: var(--primary);
    opacity: 0.2;
  }

  #portfolio .cs-item {
    grid-column: span 4;
  }
}

/* Dark Mode */
@media (min-width: 0rem) {
  body.dark-mode #portfolio {
    background-color: var(--dark);
  }

  body.dark-mode #portfolio .cs-title,
  body.dark-mode #portfolio .cs-topper,
  body.dark-mode #portfolio .cs-h3,
  body.dark-mode #portfolio .cs-item-text,
  body.dark-mode #portfolio .cs-text {
    color: var(--bodyTextColorWhite);
  }

  body.dark-mode #portfolio .cs-text::after {
    background: var(--bodyTextColorWhite);
  }
}

/*-- -------------------------- -->
<---            CTA             -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #cta-51 {
    padding: var(--sectionPadding);
    position: relative;
  }

  #cta-51 .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 48px - 64px */
    gap: clamp(3rem, 6vw, 4rem);
  }

  #cta-51 .cs-content {
    /* set text align to left if content needs to be left aligned */
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: center;
  }

  #cta-51 .cs-topper,
  #cta-51 .cs-title,
  #cta-51 .cs-text {
    color: var(--bodyTextColorWhite);
  }

  #cta-51 .cs-text {
    margin-bottom: 1rem;
  }

  #cta-51 .cs-text:last-of-type {
    margin-bottom: 2rem;
  }

  #cta-51 .cs-picture {
    height: 100%;
    width: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }

  #cta-51 .cs-picture:before {
    /* black color overlay */
    content: '';
    position: absolute;
    display: block;
    height: 100%;
    width: 100%;
    background: #000;
    opacity: .8;
    top: 0;
    left: 0;
    z-index: 1;
  }

  #cta-51 .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}