.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 4rem;
}

.hero-background-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  animation: heroFadeIn 2s ease-out forwards;
}

@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  width: 100%;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  grid-column: 1 / -1;
  grid-row: 1;
  font-size: 14rem;
  font-weight: bolder;
  color: var(--primary-text);
  margin: 0;
  letter-spacing: -7px !important;
  line-height: 1.1;
  text-align: right;
  align-self: right;
}

.hero-layout {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 400;
  color: var(--secondary-text);
  line-height: 1.2;
  margin: 0;
  max-width: 500px;
  transition: color 0.3s ease;
  cursor: default;
  justify-self: start;
  background: linear-gradient(
    90deg,
    var(--primary-text),
    var(--primary-text),
    var(--primary-blue),
    var(--primary-blue),
    var(--primary-text)
  );
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  transition: background-position 1.2s ease, filter 1.2s ease;
}

.hero-subtitle:hover {
  background-position: 100%;
  filter: drop-shadow(0 0 5px rgba(0, 162, 255, 0.55));
}

.hero-cta {
  display: flex;
  align-items: right;
  gap: 0.75rem;
  justify-self: end;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--primary-blue);

  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
  transition: all 0.35s ease;
  border-radius: 6px;
}

.hero-cta:hover {
  background: rgba(0, 162, 255, 0.1);
  transform: translateY(-2px);
}

.cta-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-blue);
}

.cta-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-blue);
  color: var(--primary-text);
  transition: all 0.3s ease;
}

.hero-cta:hover .cta-text {
  color: var(--primary-blue);
}

.hero-cta:hover .cta-icon {
  background-color: var(--primary-blue);
  transform: translate(2px, -2px);
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-title {
    grid-column: 1;
    font-size: 9rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: rem;
    justify-items: center;
  }

  .hero-subtitle {
    justify-self: left;
    text-align: left;
  }

  .hero-cta {
    justify-self: right;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-bottom: 3rem;
  }

  .hero-title {
    font-size: 8rem;
    margin-top: 1rem;
  }

  .hero-subtitle {
    font-size: 2rem;
  }

  .cta-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 485px) {
  .hero {
    padding-bottom: 3rem;
  }

  .hero-title {
    font-size: 6rem;
    margin-top: 1rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .cta-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .hero-title {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.5rem;
    font-size: 5rem;
  }

  .hero-subtitle {
    justify-self: center;
    text-align: center;
    max-width: 90%;
  }

  .hero-cta {
    justify-self: center;
  }
}
