.mainpage-container {

 display:flex;
 align-items:stretch;

}

.mainpage-box {

 padding:10px;
 flex:1;
 margin:10px;
 background-color:#FFF;
 box-shadow:5px 5px 5px 0 #AAA;

}

.h2 {

 font-size: 2em;
 line-height: 1.3;
 display: inline;
 position: relative;
 margin: 0.5em 0;
 
 background-color: rgba(128, 128, 128, 0.3); 
 background-repeat: no-repeat;
 background-position: 0 90%; 
 background-size: 100% 0.45em; 
 
 box-shadow: 
   2px 0 0 rgba(128, 128, 128, 0.2), 
   -2px 0 0 rgba(128, 128, 128, 0.2); 
 
 padding: 0 0.15em;
 box-decoration-break: clone;
 -webkit-box-decoration-break: clone;

}

.h2:hover {

 background-color: rgba(128, 128, 128, 0.4); 
 box-shadow: 
   3px 0 0 rgba(128, 128, 128, 0.25),
   -3px 0 0 rgba(128, 128, 128, 0.25);

}