@keyframes fadeInLeftSlide {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80vh;
  max-height: 1200px;
  color: white;
  padding: 50px;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url("https://trake.eu/images/hero-banner.jpg");
  background-size: cover;
  background-position: center;

  h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    width: 60%;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 30px;
    width: 55%;
    animation-delay: 0.3s;
  }

  h1, h2 {
    opacity: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInLeftSlide 0.5s ease-in forwards;
  }  
}
.hero-image-container {
  max-width: 1280px;
}
.header-buttons {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: fadeInLeftSlide 0.5s ease-in forwards;
}

#experience {
  margin-left: 15px;
  margin-right: 15px;
  margin-bottom: 50px;
}
.experience-container {
  position: relative;
  background-color: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: -40px;
  margin-left: auto;
  margin-right: auto;
  max-width: 750px;
  height: 140px;
  box-shadow: 1px 1px 20px 4px rgba(0, 0, 0, 0.15);
}
.experience-item {
  width: 250px;
  padding: 5px;

  p:nth-child(1) {
    font-size: 30px;
    font-weight: bold;
    color: var(--primary-dark-blue);
    margin-top: 15px;
    margin-bottom: 10px;
  }
  p:nth-child(2) {
    font-size: 20px;
    color: black;
  }
}

#about {
  padding: 50px;
}
.about-container {
  max-width: 1280px;
  margin: 0 auto;
}
.about-card {
  display: flex;
  background-color: white;
  min-height: 350px;
  padding: 10px;
  box-shadow: 1px 1px 20px 4px rgba(0, 0, 0, 0.15);
}
.about-image {
  width: 50%;
  padding-right: 20px;
  object-fit: cover;
}
.about-content {
  display: flex;
  width: 50%;
  flex-direction: column;
  justify-content: center;
  padding-left: 20px;

  h2 {
    font-size: 2rem;
    color: var(--primary-dark-blue);
    margin-bottom: 25px;
  }
}

#services {
  padding: 50px;
  margin-bottom: 100px;
}
.services-container {
  max-width: 1280px;
  margin: 0 auto;
}
.services-card {
  background-color: white;
  padding: 10px;
  box-shadow: 1px 1px 20px 4px rgba(0, 0, 0, 0.15);
}
.services-title {
  font-size: 24px;
  color: var(--primary-dark-blue);
  text-align: center;
  padding: 20px 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 10px;
}
.services-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;

  img {
    width: 100%;
    margin-bottom: 10px;
  }

  h3 {
    font-size: 1.2rem;
    color: var(--primary-dark-blue);
    margin-bottom: 10px;
    text-align: center;
  }
}

.contacts-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 30vh;
  max-height: 400px;
  color: white;
  padding: 100px;
  background: linear-gradient(
    rgba(var(--primary-dark-blue-rgb), 0.8),
    rgba(var(--primary-dark-blue-rgb), 0.8)),
    url("https://trake.eu/images/home-contacts-cta.jpg"
  );
  background-size: cover;
  background-position: center;

  h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 36px;
  }
}

@media (max-width: 768px) {
  #hero-image {
    padding: 20px;

    h1 {
      font-size: 2.4rem;
      width: 100%;
    }
    h2 {
      font-size: 1rem;
      width: 100%;
    }
  }

  #about {
    padding: 15px;
  }
  .about-card {
    flex-direction: column;
  }
  .about-image {
    width: 100%;
    padding-right: 0;
  }
  .about-content {
    padding-left: 0;
    width: 100%;

    h2 {
      text-align: center;
      margin-top: 20px;
    }
  }

  #services {
    padding: 15px;
  }
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
  }

  .contacts-header {
    padding: 100px 15px;
    h2 {
      font-size: 1.5rem;
    }
  }
}

@media (max-width: 580px) {
  #hero-image {
    h1 {
      font-size: 1.6rem;
    }
    h2 {
      font-size: 0.8rem;
    }
  }
  .header-buttons {
    flex-direction: column;

    a {
      font-size: 14px;
      margin-bottom: 20px;
    }
  }
  .button {
    height: 35px;
  }

  .experience-item {
    p:nth-child(1) {
      font-size: 1.6rem;
      font-weight: bold;
      color: var(--primary-dark-blue);
      margin-top: 15px;
      margin-bottom: 10px;
    }
    p:nth-child(2) {
      font-size: 1rem;
      color: black;
    }
  }

  .about-content {
    h2 {
      font-size: 1.6rem;
    }
    p {
      font-size: 0.8rem;
    }
  }

  .services-title {
    font-size: 1.2rem;
    text-wrap: balance;
  }
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .services-grid-item {
    h3 {
      font-size: 1rem;
    }
    p {
      font-size: 0.8rem;
    }
  }
}
