{% assign videoURL = "https://cdn.shopify.com/videos/c/o/v/37f714939aef4036aa9fc14f7c18ab46.mp4" %}

<style>
.shx-landingPage__video__element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 50vh;
}

.shx-landingPage__video {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

  background-color: #0b0b07;
  font-size: 0;
}

@media screen and (max-width: 768px) {
  .shx-landingPage__video {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Hide the part of the video that's outside the div */
  }

  .shx-landingPage__video__element {
    width: 200%;
    /* Make the video twice as wide as the div */
    height: 100%;
    object-fit: cover;
    // transform: translateX(-50%); /* Shift the video to the left */
    transform: translateX(0);
  }
}

.shx-landingPage__video__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
}

.shx-landingPage__video__title {
  font-size: 4rem;
  margin-bottom: 3rem;

  color: white;
}

@media screen and (max-width: 768px) {
  .shx-landingPage__video__title {
    font-size: 2.3rem;
  }

  .shx-landingPage__video__content {
    width: 90%;
  }
}

.shx-landingPage__video__description {
  font-size: 1rem;
  margin-bottom: 1rem;
}
</style>

<div class="landingPage">
  <div class="shx-landingPage__video">
    <video
      class="shx-landingPage__video__element"
      autoplay
      loop
      muted
      playsinline>
      <source src="{{ videoURL }}" type="video/mp4">
      Your browser does not support the video tag.
    </video>
    <div class="shx-landingPage__video__content">
      <h1 class="shx-landingPage__video__title">Entdecke magische Kreationen</h1>
      <a href="/collections/all" class="button shx-landingPage__video__cta">Jetzt Einkaufen</a>
    </div>
  </div>
</div>