.title h1 {
    font-size: 150px;
    font-weight: bold;
    font-family: 'Migha Condensed', Impact, sans-serif;
    line-height: 1.1;
    margin: 40px 0;
    display: inline-block;
    overflow: hidden;
    transform-style: preserve-3d;
    padding-top: 25px;
}
.top-container.b {
  height: 80vh;
}

.title h1 span,
.title h1>span {
    display: inline-block;
    letter-spacing: 2px;
    font-weight: 400;
    transform: translate3d(-30%, 100%, 0) rotateY(120deg);
    opacity: 0;
    filter: blur(2px);
}

/* When animate class is added, play animation */
.title h1.animate span {
    animation: rampUpRotate 0.4s ease-out forwards;
}

@keyframes rampUpRotate {
    0% {
        transform: translate3d(-30%, 100%, 0) rotateY(120deg);
        opacity: 0;
        filter: blur(2px);
    }

    80% {
        filter: blur(0px);
    }

    100% {
        transform: translate3d(0, 0, 0) rotateY(0deg);
        opacity: 1;
        filter: blur(0);
    }
}

/* service-option */
.service-option {
    background-color: #F2F2F2;
    padding-bottom: 30vh;
}

.option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 0px;
    transition: padding 0.5s ease;
    cursor: pointer;
}
.background-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #e9e9e9;
  transform: translateY(100%);
  transition: transform 1s ease;
  z-index: 0;
  pointer-events: none; /* avoid blocking clicks */
}
.option-grid-box {
  position: relative;
  margin: 0px 60px;
}

/* Simulated background color fill */
.option-grid-box::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: #e9e9e9;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s ease;
  z-index: 0;

}

/* Animate background color fill */
.option-grid-box.active::before {
  transform: scaleY(1);
}

/* Make sure all content is above the background */
.option-grid-box > * {
  position: relative;
  z-index: 1;
}

.option-grid-box.active .background-fill {
  transform: translateY(0);
}

/* Ensure main content appears above the animated background */
.option-grid-box > *:not(.background-fill) {
  position: relative;
  z-index: 1;
  margin: 0;
}

.option-grid-box.active {
  background-color: #e9e9e9;
  transition: background-color 0.3s ease;
  margin: 0px 40px;
}

.option-head:hover {
    padding: 0px 80px;
}
.text-static, .text-animate {
    transition: opacity 0.1s ease, transform 0.3s ease;
    display: inline-block;
}
.text-static {
    opacity: 1;
    position: absolute;
    transform: translateY(0);
}

.text-animate {
    opacity: 0;
    transform: translateY(50px); /* Start 50px below */
    position: absolute;
}

.option-head:hover .text-animate {
  transform: translateY(0); /* Slide into place */
  opacity: 1;
}

.option-title {
    position: relative; /* Required for absolute positioning of spans */
    font-size: 3rem;
    font-weight: 500;
    flex-grow: 1;
    text-transform: uppercase;
    margin: 0;
    padding: 50px 0px;
    overflow: hidden;
}

.option-title:hover .text-static {
    opacity: 0;
    transform: translateY(-50px); /* Move up and hide */
}

.option-title:hover .text-animate {
    opacity: 1;
    transform: translateY(0); /* Move into view */
}

.option-grid {
    width: 45px;
    height: auto;
    padding-right: 20px;
}

.down {
    width: 30px;
    height: 30px;
    background-color: #000;
}

.line-light {
  position: relative;
  height: 0.5px;
  background-color: #d2d2d2;
  overflow: visible;
}

.line-light .line-overlay {
  position: absolute;
  height: 100%;
  width: 100%;
  background-color: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s ease;
}

.option-grid-box:hover .line-light .line-overlay {
  transform: scaleX(1);
}
.middle-img-wrapper {
  position: relative;
  height: 0;
  overflow: visible;
}

.middle-img {
  position: absolute;
  top: -115px;
  left: 50%;
  transform: translate(-50%, 50px) scale(0.8); /* start lower and smaller */
  opacity: 0;
  width: 220px;
  height: 230px;
  z-index: 2;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.option-head:hover ~ .middle-img-wrapper .middle-img {
  transform: translate(-50%, 0) scale(1); /* move to place and zoom to full size */
  opacity: 1;
}
.option-content {
    font-size: 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  padding: 0 40px;
  width: 30%;
  line-height: 22px;
}
.option-content p{
    padding-left: 20px;
    margin-top: 0px;
}

.option-content.open {
  max-height: 300px;
  opacity: 1;
  padding: 10px 20px;
  padding-top: 0px;
}

.option-head .down.rotated {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}