/* Tab nav */
.injection-tabs-wrapper {
  width: 100%;
}

.injection-tab-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
}

.injection-tab-btn {
  padding: 8px 32px;
  border-radius: 12px;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-size: 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s;
  white-space: nowrap;
  font-weight: 500;
}

.injection-tab-btn:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.injection-tab-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Tab fade animations */
@keyframes tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tab-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Section visibility */
.injection-gallery {
  display: none;
  position: relative;
  width: 100vw;
}

.injection-gallery.active {
  display: block;
}

.injection-gallery.tab-fade-in {
  display: block;
  animation: tab-fade-in 0.2s ease forwards;
}

.injection-gallery.tab-fade-out {
  display: block;
  animation: tab-fade-out 0.1s ease forwards;
}

.gallery-header {
  height: 10vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-header h4 {
  color: var(--color-dark);
}

.img-group-container {
  position: relative;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}

.img-group {
  display: flex;
  flex-wrap: nowrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.img-container {
  width: 50vw;
  height: 100vh;
  flex: 0 0 50vw;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 40px;
}

.injection-steps-card {
  width: 600px;
  height: 500px;
  position: relative;
  border-radius: 12px;
}

.injection-steps-card-inner {
  width: 400px;
  height: 500px;
  position: relative;
  background-image: url("/wp-content/themes/ecosoap-child/assets/images/injection-steps.png");
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}

.card-top {
  text-align: center;
  padding-top: 70px;
}

.card-number h1 {
  font-weight: 700;
  color: var(--color-white);
}

.card-title h4 {
  color: var(--color-white);
}

.card-description p {
  position: absolute;
  bottom: 24px;
  right: 16px;
  background: var(--color-white);
  border-radius: 24px;
  padding: 16px;
  line-height: 1.6;
  width: 100%;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 20px 50px rgba(0, 0, 0, 0.08);
}

.injection-steps-progress {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  height: 5px;
  background: var(--color-primary);
  border-radius: 12px;
}

@media (max-width: 768px) {
  .injection-gallery {
    width: 100%;
  }

  .sticky-wrapper {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .img-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .img-container {
    width: 100%;
    height: auto;
    flex: none;
    margin-left: 0;
    padding-inline: 16px;
  }

  .injection-steps-card {
    width: 100%;
    height: auto;
    max-width: 500px;
    margin: auto;
  }

  .injection-steps-card-inner {
    width: 100%;
    max-width: 400px;
    height: 220px;
    margin: auto;
  }

  .card-description p {
    position: static;
    width: 100%;
    margin-top: 16px;
    box-sizing: border-box;
  }

  .img-group-container {
    height: auto !important;
  }

  .injection-steps-progress {
    display: none;
  }
}
