.page-template-individual-portfolio-page-simple .project-description-rich-text.contracted {
    max-height: 25rem;
    -webkit-mask-image: linear-gradient(0deg,transparent,#fff 25%);
    mask-image: linear-gradient(0deg,transparent,#fff 25%);
}

.page-template-individual-portfolio-page-simple .project-description-rich-text {
    margin-bottom: 2rem;
    max-height: 100rem;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.page-template-individual-portfolio-page-simple .portfolio_detail .client {
  display: none;
}

.page-template-individual-portfolio-page-simple .portfolio_detail .client a {
  text-decoration: none;
}

.page-template-individual-portfolio-page-simple .portfolio_detail .client a::after { 
  display: none;
}

.page-template-individual-portfolio-page-simple .portfolio_right_column {
    padding-bottom: 1rem;
}

/*Repeater rows styling*/

.page-template-individual-portfolio-page-simple .grid-row .grid-images {
  padding-bottom: 20px;
}

.page-template-individual-portfolio-page-simple .grid-row .right-col-bottom {
  padding-top: 20px;
}

.page-template-individual-portfolio-page-simple .grid-row .right-col-top img, .page-template-individual-portfolio-page-simple .grid-row video {
  display: block;
}

@media screen and (max-width: 599px) {
  .page-template-individual-portfolio-page-simple .grid-row .grid-images {
    padding-bottom: 0;
  }
  
  .page-template-individual-portfolio-page-simple .grid-row .three-photo-column {
    padding-bottom: 20px;
  }
  
  .page-template-individual-portfolio-page-simple .grid-row .right-col-top, .page-template-individual-portfolio-page-simple .grid-row .right-col-bottom {
    padding-bottom: 0;
  }
}

/* Video Styling */

/* Layouts 1, 2 & 4 ACF field */
/* Modern browsers */
.page-template-individual-portfolio-page-simple .grid-image-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1950 / 1300;
}

/* Fallback for browsers without aspect-ratio */
@supports not (aspect-ratio: 1) {
  .page-template-individual-portfolio-page-simple .grid-image-video-container {
    padding-top: 66.67%; /* 1300 ÷ 1950 × 100% */
  }
}

.page-template-individual-portfolio-page-simple .grid-image-video-inner-container {
  position: relative;
  width: 100%;
  height: 100%;
}


.page-template-individual-portfolio-page-simple .portfolio-row-cell-video-background {
  position: absolute;
  top: 0;    /* match .grid-image padding */
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.page-template-individual-portfolio-page-simple .portfolio-row-cell-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Layouts 3 ACF field */

.page-template-individual-portfolio-page-simple.portfolio-row-cell-video-foreground {
  width: 100%;
}

.page-template-individual-portfolio-page-simple .portfolio-row-cell-video-foreground video {
  width: 100%;
  pointer-events: none;
}
