<div class="nav-wrapper">
  
    <div class="item">
      <div class="img-wrapper"><img src="https://images.unsplash.com/photo-1705774018984-af74ccbd6a21?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTA4NzY5MDZ8&ixlib=rb-4.0.3&q=50" alt=""></div>
      <div class="content-wrapper">
        <h1>Card title</h1>
        <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
        <a href="">Go somewhere</a>
      </div>
    </div>

    <div class="item">
      <div class="img-wrapper"><img src="https://images.unsplash.com/photo-1709934645859-f1ed8d3a4954?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTA4NzY5OTF8&ixlib=rb-4.0.3&q=50" alt=""></div>
      <div class="content-wrapper">
        <h1>Card title</h1>
        <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
        <a href="">Go somewhere</a>
      </div>
    </div>

    <div class="item">
      <div class="img-wrapper"><img src="https://images.unsplash.com/photo-1708747496569-b38b4abaa58f?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTA4NzcyNjR8&ixlib=rb-4.0.3&q=50" alt=""></div>
      <div class="content-wrapper">
        <h1>Card title</h1>
        <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
        <a href="">Go somewhere</a>
      </div>
    </div>
  
      <div class="item">
      <div class="img-wrapper"><img src="https://images.unsplash.com/photo-1709065397155-1cd979c61fac?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTA4NzcxNjl8&ixlib=rb-4.0.3&q=50" alt=""></div>
      <div class="content-wrapper">
        <h1>Card title</h1>
        <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
        <a href="">Go somewhere</a>
      </div>
    </div>

    <div class="item">
      <div class="img-wrapper"><img src="https://images.unsplash.com/photo-1709891798937-fd431bd7e10b?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE3MTA4NzcyNDF8&ixlib=rb-4.0.3&q=50" alt=""></div>
      <div class="content-wrapper">
        <h1>Card title</h1>
        <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
        <a href="">Go somewhere</a>
      </div>
    </div>

   
  
   
</div>
body{
  margin: 0;
  font-family: Montserrat;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  background-color: #000;
}
*{
  box-sizing: border-box;
}
img{
  max-width: 100%;
  display: block;
}

.nav-wrapper{
  display: flex;
  height: 90vh;
  width: 90vw;
  border-radius: 8px;
  overflow: hidden;
  .item{
    position: relative;
    flex: 1;
    transition: all 0.6s cubic-bezier(.25,.8,.25,1);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    .img-wrapper{
      height:100%;
      position: absolute;
      z-index: -1;
      &:before{
        position: absolute;
        width: 100%;
        height: 100%;
        content: '';
        top: 0;
        left: 0;
        background-color: rgba(176, 139, 206, 0.18);
        z-index: 1;
      }
      img{
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        filter: contrast(1.4);
      }
    }
    .content-wrapper{
      display: none;
      background-color: rgba(0, 0, 0, 0.7607843137254902);
      flex-direction: column;
      width: 90%;
      align-items:center;
      text-align: center;
      padding: 50px;
      margin-bottom: 5%;
      box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
      transition: all 0s cubic-bezier(.25,.8,.25,1);
      color: #fff;
      a{
        padding:10px 15px;
        text-decoration: none;
        background-color: #000;
        border-radius: 10px;
        display:inline;
        color:#000;
        background-color: #fff;
        font-weight: bold;
      }
    }
    &:hover{
      flex:2;
      .img-wrapper{
        &:before{
          z-index: 0;
        }
      }
    }
    &.active{
      flex:0 0 600px;
      box-shadow: 0 0 50vh 50vh rgba(0, 0, 0, 0.4);
      z-index: 1;
      
      .img-wrapper{
        &:before{
          z-index: 0;
        }
        img{
          filter: contrast(1.07);
        }
      }
      .content-wrapper{
        z-index: 1;
        border-radius: 5px;
        display: flex;
      }
    }
  }
}

View Compiled
$('.nav-wrapper .item').click(function(e){
  if($(this).hasClass('active')){
    $(this).removeClass('active');
  }
  else{
    $('.nav-wrapper .item').removeClass('active');
    $(this).toggleClass('active');
  }
  
});

Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js