.header__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; 
  border-radius: 2rem;
}

.header__image img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fadeSlide 12s infinite;
  border-radius: inherit;
}

.header__image img:nth-child(1) {
  animation-delay: 0s;
}
.header__image img:nth-child(2) {
  animation-delay: 3s;
}
.header__image img:nth-child(3) {
  animation-delay: 6s;
}
.header__image img:nth-child(4) {
  animation-delay: 9s;
}

@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateX(200px);
  }
  8% {
    opacity: 1;
    transform: translateX(0);
  }
  25% {
    opacity: 1;
    transform: translateX(0);
  }
  33% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 0;
  }
}


header::before {
  position: absolute;
  content: "";
  height: 100%;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
}

.header__container {
  display: grid;
}


.header__content p {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2rem;
}

.header__content h1 {  
  margin-bottom: 5px;
  font-size: 4.5rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 5.5rem;
  text-align: center;
}

.header__btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.header__btns .btn {
  padding: 1rem 2rem;
}

.header__btns a {
  padding: 9px 13px;
  font-size: 1.5rem;
  color: var(--primary-color);
  background-color: var(--white);
  border-radius: 100%;
}

.header__btns a:hover {
  color: var(--white);
  background-color: var(--primary-color);
}

@media (width >= 768px) {
  .header__content h1 {
    font-size: 4rem;
    color: #3d3d3d !important;
  }

  header {
    margin-top: 0;
  }

  .header__container {
    grid-template-columns:
      minmax(0, 1fr)
      repeat(5, minmax(0, calc(var(--max-width) / 5)))
      minmax(0, 1fr);
  }

  .header__content {
    grid-column: 2/4;
  }

  .header__content :is(p, h1) {
    text-align: left;
    color: #3d3d3d !important;
  }

  .header__btns {
    justify-content: flex-start;
  }

  .header__image {
    grid-column: 4/8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    height: 100%;
  }

  .header__image img {
    position: absolute;
    top: 9rem;
    height: 100%;
    width: unset;
  }
}

@media (width > 1200px) {
  .header__content {
    padding-inline: 1rem 0;
  }
  .header__image img {
    position: absolute;
    top: 9rem;
    height: 100%;
    width: unset;
  }
}

@media (max-width: 934px) {
  .header__content h1 {
    font-size: 3.3rem;
    line-height: 4rem;
  }
}

@media (max-width: 494px) {
  .header__content h1 {
    font-size: 2.5rem;
    line-height: 4rem;
  }
}

@media (max-width: 768px){
  .header__container{
    display: flex;
    flex-direction: column;
  }
  .header__image {
    width: 100%;
    aspect-ratio: 9 / 11;
    border-radius: 2rem;
  }
  .main-pic{
    left: 0px !important;
  }
  
  .header__image img {
    position: absolute;
    top: 1rem;
    height: 100%;
    width: unset;
  }
}

