.hero {
  position: relative;
  height: calc(100vh - 30px);
  background-image: url('https://audioelectronicsindy.com/wp-content/uploads/2025/06/AEBanner.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.container {
  height: 100%;
}

.hero__wrapper {
  position: relative;
  height: 100%;
}

.hero__content {
  position: absolute;
  top: 90px;
  left: 0;
  max-width: 50%;
}

.hero__counters {
  position: absolute;
  bottom: 40px;
  right: 0;
  display: flex;
  gap: 40px;
}

.hero__title {
  font-size: 129px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 30px;
  max-width: 600px;
}

.hero__brands {
  height: 40px;
  padding: 40px 0;
}

.hero__brand-logo {
  max-height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero__brand-logo.active {
  opacity: 1;
}

.counter {
  text-align: center;
}

.counter__digits {
  display: flex;
  justify-content: center;
}

.digit {
  display: inline-block;
  width: 1.7rem;
  height: 1.2em;
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  overflow: hidden;
}

.digit__inner {
  display: block;
  width: 100%;
  height: 100%;
  font-size: inherit;
  line-height: 1.2em;
}

.counter__label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

/* Quote Button Styles */
.hero__quote-button {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

.quote-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #0088c8;
  border-radius: 8px;
  padding: 15px 40px;
  text-decoration: none;
  overflow: hidden;
}

.quote-button__text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 15px; /* Adjusted font-size to 15px */
  font-weight: 500; /* Adjusted font-weight to 500 */
  text-transform: uppercase;
}

.quote-button__waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: transparent;
}

.quote-button__waves::before,
.quote-button__waves::after,
.quote-button__waves span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  transition: all 0.5s ease; /* Smooth transition for hover and leave */
}

.quote-button__waves::after {
  width: 90%;
  height: 90%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0.4;
}

.quote-button__waves span::before {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.1;
}

/* Default animation for the waves */
.quote-button__waves::before {
  animation: wave-pulse 3s infinite ease-in-out;
}

.quote-button__waves::after {
  animation: wave-pulse 3s infinite ease-in-out 1s;
}

.quote-button__waves span::before {
  animation: wave-pulse 3s infinite ease-in-out 2s;
}

/* Hover effect: symmetrical expansion */
.quote-button:hover .quote-button__waves::before {
  width: 85%; /* Expand symmetrically */
  height: 85%;
  opacity: 0.5;
  animation: none; /* Stop the default animation during hover */
}

.quote-button:hover .quote-button__waves::after {
  width: 95%;
  height: 95%;
  opacity: 0.3;
  animation: none;
}

.quote-button:hover .quote-button__waves span::before {
  width: 105%;
  height: 105%;
  opacity: 0.05;
  animation: none;
}

@keyframes wave-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.02);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
}

/* Гліч-ефект для заголовка */
.hero-glitch {
  position: relative;
  display: inline-block;
}

.hero-glitch__text {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.hero-glitch__text::before,
.hero-glitch__text::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  background: transparent;
  z-index: 2;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  line-height: inherit;
}

.hero-glitch__text::before {
  text-shadow: -1.2px 0 red;
  animation: hero-glitch-clip-1 8s infinite linear;
}

.hero-glitch__text::after {
  text-shadow: 1.2px 0 cyan;
  animation: hero-glitch-clip-2 8s infinite linear;
}

@keyframes hero-glitch-clip-1 {
  0%,
  20%,
  40%,
  60%,
  80%,
  100% {
    clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0 100%);
    transform: translate(0, 0);
    opacity: 0;
  }
  2%,
  22%,
  42%,
  62%,
  82% {
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    transform: translate(1.2px, 0);
    opacity: 0.6;
  }
  4%,
  24%,
  44%,
  64%,
  84% {
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    transform: translate(-1.2px, 0);
    opacity: 0.6;
  }
}

@keyframes hero-glitch-clip-2 {
  0%,
  20%,
  40%,
  60%,
  80%,
  100% {
    clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0 100%);
    transform: translate(0, 0);
    opacity: 0;
  }
  3%,
  23%,
  43%,
  63%,
  83% {
    clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
    transform: translate(-1.2px, 0);
    opacity: 0.6;
  }
  5%,
  25%,
  45%,
  65%,
  85% {
    clip-path: polygon(0 70%, 100% 70%, 100% 90%, 0 90%);
    transform: translate(1.2px, 0);
    opacity: 0.6;
  }
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
  .hero__content {
    max-width: 100%;
    top: 100px;
  }

  .hero__title {
    font-size: 60px;
    text-align: left;
    white-space: normal;
    overflow: hidden;
  }

  .hero-glitch__text::before,
  .hero-glitch__text::after {
    display: none;
  }

  .hero__subtitle {
    font-size: 14px;
    text-align: left;
    margin: 0;
  }

  .hero__counters {
    bottom: 30px;
    gap: 20px;
    justify-content: center;
    width: 100%;
  }

  .digit {
    font-size: 39px;
  }

  .counter__label {
    font-size: 14px;
  }

  .quote-button {
    padding: 12px 30px;
  }

  .quote-button__text {
    font-size: 14px; /* Adjusted for mobile */
    font-weight: 500;
  }
}

@media (max-width: 540px) {
  .hero {
    background-image: url('https://audioelectronicsindy.com/wp-content/uploads/2025/06/AEBanner-mobile.jpg');
    height: calc(100vh - 77px);
  }

  .hero__title {
    font-size: clamp(3rem, 5vw, 2.5rem);
  }

  .hero__subtitle {
    font-size: 12px;
  }

  .hero__counters {
    bottom: 30px;
    gap: 15px;
  }

  .digit {
    font-size: 30px;
  }

  .quote-button {
    padding: 10px 25px;
  }

  .quote-button__text {
    font-size: 13px; /* Adjusted for smaller mobile */
    font-weight: 500;
  }
}
