section.hero {
  height: 320px;
  position: relative;
  overflow: hidden;

  .container {
    padding: 0 1rem;
    position: relative;
    z-index: 1;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;

    .hero-video {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      object-fit: cover;
      object-position: center 10%;
    }

    img {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }

  .hero-content {
    width: 100%;
    color: var(--color-white);
    text-align: center;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: var(--text-4xl);
    color: var(--color-white);
    text-align: center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
    width: 100%;
    margin: 0;
    text-wrap: balance;

    span.line1 {
      display: inline-block;
      font-size: var(--text-2xl);
      text-transform: none;
    }
  }

  h1.v-slide-container {
    font-size: 7.25vw;
  }

  p {
    margin: 0 0 0.75rem;
  }

  &.hide-line-1 .line1 {
    display: none;
  }
}

.gradient {
  height: 160px;
  width: 100%;
  background: blue;
  position: absolute;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 95%
  );
  opacity: 0.6;
}

.special-offer {
  display: none;
}

.v-slide-container {
  height: 100px;
  overflow: hidden;
  color: var(--color-white);
  text-align: center;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
  width: 100%;
  margin: 0;
  transform: translateY(1.5rem);
}

.v-slides {
  display: block;
  width: 100%;
}

.v-slide {
  display: block;
  width: 100%;
  line-height: 100px;
}

.hero.layout-secondary {
  flex-direction: column;
  height: auto;

  .hero-slideshow {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
  }

  .hero-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    aspect-ratio: 5 / 3;
  }

  .hero-slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;

    &.active {
      opacity: 1;
      pointer-events: auto;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }
  }

  .hero-slider-button-prev,
  .hero-slider-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;

    &:hover {
      background: var(--color-tcc-blue);
    }

    &::before {
      content: "";
      display: block;
      width: 10px;
      height: 10px;
      border-top: 2px solid white;
      border-right: 2px solid white;
    }
  }

  .hero-slider-button-prev {
    left: 10px;

    &::before {
      transform: rotate(-135deg);
      margin-left: 3px;
    }
  }

  .hero-slider-button-next {
    right: 10px;

    &::before {
      transform: rotate(45deg);
      margin-right: 3px;
    }
  }

  .hero-content {
    background: var(--color-tcc-blue);
    color: var(--color-white);
    height: 100%;
    width: 100%;
    padding: 1.5rem;
    text-align: left;

    h1 {
      font-size: 2.75rem;
      text-align: left;
      margin-bottom: 1rem;
    }

    .support-image {
      width: 100%;
    }
  }
}

.special-offer-mobile {
  background: var(--color-tcc-blue);
  padding: 1.5rem;

  .dots {
    justify-content: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .dot {
    height: 1rem;
    width: 1rem;
  }

  h2 {
    color: var(--color-white);
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    line-height: 1.15;
  }

  h2 span {
    display: block;
    font-size: var(--text-3xl);
    text-transform: none;
  }
}

@media (min-width: 1024px) {
  section.hero {
    height: 640px;

    h1 {
      font-size: var(--text-7xl);

      span.line1 {
        font-size: var(--text-4xl);
      }
    }

    &.hide-line-1 .line1 {
      display: inline;
    }
  }

  .gradient {
    opacity: 1;
  }

  .hero-content {
    margin-bottom: 3rem;
  }

  h1.v-slide-container {
    font-size: var(--text-7xl) !important;
    transform: translateY(0);
  }

  .special-offer {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    max-width: 320px;
    padding: 1.5rem;
    position: absolute;
    right: 10%;
    top: 40px;
    z-index: 1;
    top: 15rem;
    transition: opacity 0.3s ease, transform 0.3s ease;

    h2 {
      color: var(--color-tcc-blue);
    }

    .close-special-offer {
      position: absolute;
      right: -0.5rem;
      top: -0.5rem;
      border-radius: 8px;
      background: white;
      border-radius: 100%;
      height: 1.5rem;
      width: 1.5em;
      display: table;
      text-align: center;
      font-weight: 700;
      cursor: pointer;
    }

    &.hidden {
      opacity: 0;
      transform: translateX(100%);
      pointer-events: none;
      display: none;
    }
  }

  .special-offer-tab {
    position: absolute;
    right: 0;
    top: 15rem;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 1rem 0.75rem;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    color: var(--color-tcc-blue);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease;

    &:hover {
      padding-right: 1rem;
    }

    span {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
  }

  .special-offer-mobile {
    display: none;
  }

  .hero.layout-secondary {
    display: flex;
    flex-direction: row;
    height: 640px;

    .hero-slideshow {
      width: 60%;
    }

    .hero-slider-container {
      aspect-ratio: unset;
      height: 100%;
    }

    .hero-content {
      width: 40%;
      padding: 3rem 4rem;
    }
  }
}

/* Editor view - show first slide in secondary hero layout */
.editor-styles-wrapper .hero.layout-secondary .hero-slider-slide:first-child,
.block-editor .hero.layout-secondary .hero-slider-slide:first-child {
  opacity: 1;
}
