/* Left/right feature sections */

.left-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 9%;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  justify-items: center;
}

.left-right .section
{
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 5%;
}

.left-right .section:nth-of-type(odd) .paragraph {
  order: 1; /* Position the paragraph before the image */
  padding-right: 100px;
}

.left-right .section:nth-of-type(odd) .image {
  order: 2; /* Position the image after the paragraph */
}

.left-right .section:nth-of-type(even) .paragraph {
  order: 2; /* Position the paragraph after the image */
  padding-left: 100px;
}

.left-right .section:nth-of-type(even) .image {
  order: 1; /* Position the image before the paragraph */
}

.left-right .image {
  width: 75%;
  height: 75%;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.left-right .image img, .left-right .image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mask-image: linear-gradient(to right, transparent, black 1%, black 99%, transparent);
}

.left-right .image .pixelated 
{
  image-rendering: pixelated;
}

.left-right .paragraph {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: justify;
  width: 80%;
  font-size: calc(1.7 * (1vw + 1vh)/2);
  color: white;
}

.left-right .paragraph h3 {
  font-size: calc(3.2 * (1vw + 1vh)/2);
  font-weight: bold;
  color: #565a88;
  margin-bottom: 10px;
  text-align: center;
}

@media (max-width: 768px) {
  .left-right
  {
    padding: 0%;
  }
  .left-right .section{
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
  }

  .left-right .paragraph {
    font-size: 1rem; 
  }
  .left-right .paragraph h3 {
    font-size: 2rem; 
  }
  
  .left-right .image img, .left-right .image video {
    width: 100%;
    height: 100%;
  }

  .left-right .section:nth-of-type(odd) .paragraph {
    order: 0;
    padding: 0;
  }
  
  .left-right .section:nth-of-type(odd) .image {
    order: 0;
    padding: 0;
  }
  
  .left-right .section:nth-of-type(even) .paragraph {
    order: 0;
    padding: 0;
  }
  
  .left-right .section:nth-of-type(even) .image {
    order: 0;
    padding: 0;
  }
}

.left-right a 
{
  margin-top: 6%;
  transition: 0.3s;
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  font-size: calc(3 * (1vw + 1vh)/2);
  border-radius: 8px;
  background-color: rgb(23, 27, 31);
}

.left-right a:hover 
{
  background-color: #ffffff;
  color: #353755;
  border-radius: 8px;
  box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.2),
                  0 0 40px 20px rgba(53, 55, 85, 0.2),
                  0 0 60px 30px rgba(0, 0, 255, 0.2);
}

@keyframes fade-in-from-left {
  from {
    opacity: 0;
    transform: translateX(-20%); 
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-from-right {
  from {
    opacity: 0;
    transform: translateX(20%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Only hidden when main.js enabled the reveal animation (JS on, no reduced motion) */
html.reveal .left-right .section:not(.animate-left):not(.animate-right),
html.reveal .left-right .image:not(.animate-left):not(.animate-right) {
  opacity: 0;
}

.left-right .section.animate-left, .left-right .image.animate-left {
  animation: fade-in-from-left 0.6s ease forwards;
}

.left-right .section.animate-right, .left-right .image.animate-right {
  animation: fade-in-from-right 0.6s ease forwards;
}
