#caseStudiesFilters {
    margin-bottom: 20px;
    padding: 6vh 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
#caseStudiesFilters .filter {
    -webkit-appearance: none;
    -moz-appearance: none;
         appearance: none;
    padding: 1em 70px 1em 1em;
    border-radius: var(--border-radius);
    background: transparent;
    border: 3px #9C84C1 solid;
    margin-left: 20px;
    cursor: pointer;
}
#caseStudiesFilters .filter:first-child {
    margin-left: 0;
}
#caseStudiesFilters .filter:hover {
    background: #9C84C1;
    border: 3px #9C84C1 solid;
    color: #fff;
}
.work-filter {
    background-image: url(../img/arrow.svg) !important;
    background-size: 18px !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 12px) center !important;
}
.work-filter:hover {
    background-image: url(../img/arrow.svg);
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
}
.filters-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 20px; /* Adjust the gap between filter items */
}

.filters-list .filter {
    cursor: pointer;
    padding: 10px 20px;
    position: relative;
}

.filters-list .filter:hover,
.filters-list .filter.active {
}

#caseStudiesGrid {
    display: -ms-grid;
    display: grid;
    grid-gap: 20px;
    -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    padding-bottom: 10vh;
}
#caseStudiesGrid .work-item,
#caseStudiesGrid .post-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
    aspect-ratio: 1/1;
}

#caseStudiesGrid .work-item-bg,
#caseStudiesGrid .post-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-color: black;
    -webkit-transition: opacity 1s ease, -webkit-transform 1s ease;
    transition: opacity 1s ease, -webkit-transform 1s ease;
    -o-transition: transform 1s ease, opacity 1s ease;
    transition: transform 1s ease, opacity 1s ease;
    transition: transform 1s ease, opacity 1s ease, -webkit-transform 1s ease;
    z-index: 0;
}
#caseStudiesGrid .work-item-bg .overlay,
#caseStudiesGrid .post-item-bg .overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.7)), color-stop(60%, rgba(0,0,0,0)), color-stop(80%, rgba(0,0,0,0)), to(rgba(0,0,0,0.7)));
    background: -o-linear-gradient(bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.7) 100%);
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.7) 100%);
}
.post-item-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 30px 40px;
}
.post-item-content span {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 0;
}
.post-item-content span svg {
  width: 1em;
  margin-right: 10px;
}
#caseStudiesGrid .work-item h3,
#caseStudiesGrid .post-item h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}
#caseStudiesGrid .work-item .button-arrow,
#caseStudiesGrid .post-item .button-arrow {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 30px;
    -webkit-transform: translate(0px, 3px);
        -ms-transform: translate(0px, 3px);
            transform: translate(0px, 3px);
    -webkit-transition: -webkit-transform 500ms;
    transition: -webkit-transform 500ms;
    -o-transition: transform 500ms;
    transition: transform 500ms;
    transition: transform 500ms, -webkit-transform 500ms;
  }
#caseStudiesGrid .work-item .button-arrow path,
#caseStudiesGrid .post-item .button-arrow path {
    stroke: #fff;
  }
#caseStudiesGrid .work-item:hover .button-arrow,
#caseStudiesGrid .post-item:hover .button-arrow {
      -webkit-transform: translate(10px, -7px);
          -ms-transform: translate(10px, -7px);
              transform: translate(10px, -7px);
      -webkit-transition: -webkit-transform 500ms;
      transition: -webkit-transform 500ms;
      -o-transition: transform 500ms;
      transition: transform 500ms;
      transition: transform 500ms, -webkit-transform 500ms;
  }

.loadmore {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding-bottom: 10vh;
}

.hero-content h1 {
    padding: 0;
    margin: 30px 0;
    font-weight: 600;
}
.hero-content .sub-title {
    font-size: clamp(1rem, 2vw, 3rem); /* Adjust the font size as needed */
    line-height: 1.4; /* Adjust the line height for better readability */
    font-weight: normal;
}
.testimonial-text-block {
    text-align: center;
    padding: 0 10% 10vh;
}
.testimonial-text-block .testimonial {
    font-size: clamp(1rem, 2vw, 3rem); /* Adjust the font size as needed */
    line-height: 1.6; /* Adjust the line height for better readability */
}
.testimonial-text-block .name {
    font-size: clamp(1rem, 1.2vw, 2rem); /* Adjust the font size as needed */
    line-height: 1.4; /* Adjust the line height for better readability */
    font-weight: normal;
}
.work-title-block {
    color: #FC7F04;
    font-size: clamp(1rem, 2vw, 3rem);
    font-weight: 700;
    text-align: center;
}
.work-text-block {
    padding: 0 6vw;
    font-size: clamp(1rem, 1.2vw, 2rem);
    text-align: center;
}
.video-block .overlay-container {
    width: 100%;
    height: 100%;
    position: absolute;
    background-size: cover;
    background-position: center;
  }
  .video-block {
    width: 100%;
    display: block;
    height: 0;
    padding-bottom: 56.5%;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 10vh;
  }
  
  .video-block iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .video-block video {
    width: 100%;
  }
/* Base styles for gallery images */
.gallery-block {
    display: -ms-grid;
    display: grid;
    grid-gap: 20px;
    min-height: 60vh;
    margin-bottom: 10vh;
}

.gallery-images {
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
	min-height: 60vh;
    width: 100%;
    height: auto; /* Adjust based on your needs */
}

/* 2 photos */
.gallery-2 {
    -ms-grid-columns: (1fr)[2];
    grid-template-columns: repeat(2, 1fr);
}

/* 3 photos */
.gallery-3 {
    -ms-grid-columns: 1fr 2fr 1fr;
    grid-template-columns: 1fr 2fr 1fr;
}

/* 4 photos */
.gallery-4 {
    -ms-grid-columns: (1fr)[4];
    grid-template-columns: repeat(4, 1fr);
}

/* 5 photos */
.gallery-5 {
    display: -ms-grid;
    display: grid;
    grid-gap: 20px; /* Space between images */
    height: 100%; /* Adjust based on your needs */
}

.gallery-5 .gallery-images {
    background-size: cover;
    background-position: center;
}

/* First image */
.gallery-5 .gallery-images:nth-child(1) {
    -ms-grid-column: 1;
    grid-column: 1;
    -ms-grid-row: 1;
    -ms-grid-row-span: 5;
    grid-row: 1 / span 5;
}

/* Second image */
.gallery-5 .gallery-images:nth-child(2) {
    -ms-grid-column: 1;
    grid-column: 1;
    -ms-grid-row: 6;
    -ms-grid-row-span: 3;
    grid-row: 6 / span 3;
}

/* Third image */
.gallery-5 .gallery-images:nth-child(3) {
    -ms-grid-column: 2;
    -ms-grid-column-span: 2;
    grid-column: 2 / span 2; /* Span 2 columns */
    -ms-grid-row: 1;
    -ms-grid-row-span: 4;
    grid-row: 1 / span 4;
}

/* Fourth and Fifth images */
.gallery-5 .gallery-images:nth-child(4),
.gallery-5 .gallery-images:nth-child(5) {
    -ms-grid-column: 2;
    grid-column: 2; /* Adjust if you need it in a specific column */
    -ms-grid-row: 5;
    -ms-grid-row-span: 4;
    grid-row: 5 / span 4;
}

/* Adjustments to split the second row's second column into two for images 4 and 5 */
.gallery-5 .gallery-images:nth-child(4) {
    -ms-grid-column: 2;
    grid-column: 2; /* Place in the second column */
}

.gallery-5 .gallery-images:nth-child(5) {
    -ms-grid-column: 3;
    grid-column: 3; /* Place in the third column */
}

.nextPreviousLinks {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    padding-bottom: 10vh;
    width: 100%;
}
.nextPreviousLinks a {
    width: 47%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding: 3% 0;
    text-align: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    font-size: clamp(1rem, 1.75vw, 3rem);
}
.nextPreviousLinks a svg {
    width: 50px;
}
.nextPreviousLinks a.prev svg {
    left: 20px;
    right: auto;
    -webkit-transform: rotate(270deg) translate(20%, 0%);
        -ms-transform: rotate(270deg) translate(20%, 0%);
            transform: rotate(270deg) translate(20%, 0%);
}
.nextPreviousLinks a.prev:hover svg {
    left: 0%;
    top: 25%;
}
.nextPreviousLinks a.next:hover svg {
    right: 0%;
    top: 25%;
}
article.post {
    padding: 0 0 6vh;
}
.insight-text-block h2,
.image-and-text h2 {
    color: #FC7F04;
    font-size: 2vw;
    font-weight: normal;
}
.insight-text-block {
    padding: 0 6vw;
    font-size: clamp(1rem, 1.2vw, 2rem);
}
.image-and-text {
    padding: 0 6vw;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

.image-left .copy-half {
    width: 50%;
    padding: 0 0 0 60px;
}
.image-right .copy-half {
    width: 50%;
    padding: 0 60px 0 0;
}
.image-half {
    border-radius:var(--border-radius);
    width: 50%;
    background-size: cover;
    background-position: center;
    min-height: 50vh;
}

/* If image is on the left */
.image-left {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
}

/* If image is on the right */
/* .image-right {
    flex-direction: row-reverse;
} */
@media (max-width: 768px) {
    #caseStudiesFilters, 
    .filters-list {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 0;
    }
    #caseStudiesFilters .filter {
        margin-left: 0;
        margin-bottom: 20px;
    }
    #caseStudiesFilters .filter:first-child {
        margin-left: 0;
    }
    #caseStudiesGrid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }
    .gallery-1,
    .gallery-2,
    .gallery-3,
    .gallery-4,
    .gallery-5 {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
    }
    .nextPreviousLinks {
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
    }
    .nextPreviousLinks a {
        width: 100%;
        margin-bottom: 10px;
        padding: 7%;
    }
    .image-and-text {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
    }
    .image-half {
        width: 100%;
    }
    .image-left {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
    }
    .image-left .copy-half {
        width: 100%;
        padding: 0;
    }
    .image-right .copy-half {
        width: 100%;
        padding: 0;
    }
}