.custom-section {
   direction: rtl;
}

.custom-section .header:before, .custom-section .content:before, 
.custom-section .header:after, .custom-section .content:after {
  content: "";
  display: table;
}

.custom-section .header:after, .custom-section .content:after {
  clear: both;
}

.custom-section .headerBlock, .custom-section .contentBlock {
  min-height: 1px;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
}

.custom-section .header, .custom-section .content {
  margin-left: auto;
  margin-right: auto;
}

.custom-section .cardFrontSide, .custom-section .cardBackSide {
  backface-visibility: hidden;
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0.15rem 0.15rem 0.1rem 0 rgba(0, 0, 0, 0.3);
  color: #5e5e5e;
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: 0.75s;
  text-align:justify;
  line-height: 130%;
}



.custom-section *, .custom-section *:before, .custom-section *:after {
  box-sizing: border-box;
}



.custom-section html, body, h1, h2, p {
  margin: 0;
  text-align: center;
}

.custom-section .header {
  padding-left: 2rem;
  padding-right: 2rem;
  height: auto;
  margin-bottom: 1rem;
}

.custom-section .headerBlock {
  width: 100%;
  align-items: center;
  display: flex;
  font-size: 2rem;
  height: 5rem;
  justify-content: space-between; 
}


.custom-section .content {
  padding-left: 2rem;
  padding-right: 2rem;
  
  display: flex;              
  flex-wrap: wrap;            
  justify-content: space-between; 
}

.custom-section .contentBlock {
  width: 32%;              
  margin-bottom: 2rem;
  perspective: 50rem;
  perspective-origin: center top;
  display: flex;             
  flex-direction: column;     
}

.custom-section .contentBlock img {
  height: auto;
  width: 100%;
}

.custom-section .contentBlock:hover .cardFrontSide {
  transform: rotateY(180deg);  
}

.custom-section .contentBlock:hover .cardBackSide {
  transform: rotateY(0);
}

.custom-section .cardFrontSide {
  height: auto;
  position: relative;
  width: 100%;
}

.custom-section .cardFrontContent {
  padding: 0.5rem 1rem 1rem;
}

.custom-section .cardFrontContent h2 {
  color: #444;
  padding-bottom: 0.5rem;
}

.custom-section .cardBackSide {
  height: 100%;
  right: 15px; 
  padding: 1rem;
  position: absolute;
  top: 0;
  transform: rotateY(-180deg);
  width: calc(100% - (15px * 2));
}




@media (max-width: 767px) {
  .custom-section .content {
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .custom-section .contentBlock {
    width: 100%;           
    margin-bottom: 1.5rem;
  }
}


@media (min-width: 768px) and (max-width: 1023px) {
  .custom-section .contentBlock {
    width: 48%;            
  }
}


@media (min-width: 1024px) {
  .custom-section .contentBlock {
    width: 32%;  
  }
}
