.image-accordion {
  display: flex;
  gap: 8px;
  height: 400px;
  transition: all 0.4s ease;
  overflow: hidden; /* remove horizontal scroll */
}

/* Default item */
.accordion-item {
  flex-shrink: 0;
  width: 20%;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: all 0.4s ease-in-out;
  filter: brightness(0.75);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Hide info box by default */
.accordion-item .info-box {
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Hover behavior */
@media (min-width: 768px) {
  .image-accordion:hover .accordion-item {
    width: 10%;
    filter: brightness(0.4);
  }

  .image-accordion .accordion-item:hover {
    width: 50%;
    filter: brightness(1.1);
    z-index: 2;
  }

  .accordion-item:hover .info-box {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* Info box styling */
.info-box {
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 10px 15px;
  border-top: 3px solid #0d6efd;
  font-size: 0.9rem;
}

.info-box h5 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.info-box p {
  margin: 0;
  font-size: 0.85rem;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 767px) {
  .image-accordion {
    flex-direction: column;
    height: auto;
  }

  .accordion-item {
    width: 100% !important;
    height: 250px;
    filter: brightness(1);
  }

  .accordion-item .info-box {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.before-after-container {
    height: 400px;
  }

  .before-after-container img {
    object-fit: cover;
  }

  .before-image-wrapper {
    width: 50%;
    transition: width 0.3s ease;
    z-index: 1;
  }

  .after-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .before-after-slider {
    background: transparent;
    height: 40px;
    cursor: ew-resize;
  }

  @media (max-width: 768px) {
    .before-after-container {
      height: 300px;
    }
  }