/* --- Section Container --- */

section.text-image {
  display: grid;
  grid-template-columns: 1fr 640px 640px 1fr;
  width: 100%;
}
@media (max-width: 1350px) {
  section.text-image {
    grid-template-columns: 1fr 1fr; /* two even columns, with no overflow */
  }
}
@media (max-width: 900px) {
  section.text-image {
    display: flex;
    flex-direction: column;
  }
}

/* --- Image Side --- */

.text-image-image {
  height: 600px;
  position: relative;
  background-size: cover;
  box-shadow: 0 10px 40px rgba(0,0,0,0.67);
}
.text-image-image.left {
  grid-column: 1 / 3;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}
.text-image-image.left::before {
  background: linear-gradient(165deg,rgba(0, 0, 0, 0) 0%, rgba(0, 22, 68, 0.7) 75%, rgba(0, 78, 241, 0.9) 100%);
}
.text-image-image.right {
  grid-column: 3 / 5;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}
.text-image-image.right::before {
  background: linear-gradient(195deg,rgba(0, 0, 0, 0) 0%, rgba(0, 22, 68, 0.7) 75%, rgba(0, 78, 241, 0.9) 100%);
}
@media (max-width: 1350px) {
  .text-image-image {
    height: 500px;
  }
  .text-image-image.left,
  .text-image-image.right {
    grid-column: auto / auto;
  }
}
@media (max-width: 900px) {
  .text-image-image {
    height: 400px;
  }
  .text-image-image.left,
  .text-image-image.right {
    order: 2;
    border-radius: 20px;
    /* margin: 0 30px; */
  }
}

/* --- Text Side --- */

.text-image-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.text-image-text .section-header {
  margin-bottom: 30px;
}
.text-image-text p {
  margin-bottom: 1rem;
}
.text-image-text.left {
  grid-column: 2 / 3;
  padding: 20px 100px 20px 0;
}
.text-image-text.right {
  grid-column: 3 / 4;
  padding: 20px 0 20px 100px;
}
@media (max-width: 1350px) {
  .text-image-text.left,
  .text-image-text.right {
    grid-column: auto / auto;
    padding: 20px 30px;
  }
}
@media (max-width: 900px) {
  .text-image-text.left,
  .text-image-text.right {
    padding: 30px 0;
  }
}

.text-image-text p {
  font-size: 1.2rem;
  line-height: 2.2rem;
  text-align: left;
}

/* --- Long Text --- */

.text-image-text .body-text.is-long {
  position: relative;
  max-height: 310px; /* restrict height of long text */
  padding-bottom: 60px;
  overflow: hidden;
  transition: max-height 0.67s ease-in-out;
}
.text-image-text .body-text.is-long.expanded {
  max-height: 10000px; /* longer than any real content */
}
.text-image-text .body-text.is-long::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 125px;
  background: linear-gradient(to bottom, rgba(0,12,41,0) 0%, rgba(0,12,41,1) 75%);
  transition: height 0.67s ease-in-out;
}
.text-image-text .body-text.is-long.expanded::before {
  height: 0px;
}

/* --- Read More Button --- */

.text-image-text .body-text.is-long .read-more-btn {
  all: unset;
  position: absolute;
  bottom: 30px; /* spacing between text above and (optional) buttons below */
  cursor: pointer;
}

.read-more-btn > span {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.read-more-btn > i {
  display: inline-block;
  margin: 0 3px;
  transition: transform 0.3s ease;
}
.read-more-btn[aria-expanded="true"] i {
  transform: rotate(180deg);
}
