.featured-need-header {
  background-color: rgba(var(--orange-rgb), 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 4px;
  padding: 1.6em 0;
  position: absolute;
  bottom: 60px;
  width: 100%;
  cursor: pointer;
  text-align: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.featured-need-header::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid rgba(var(--orange-rgb), 0.9);
  z-index: 2;
}
.featured-need-header.active {
  opacity: 0;
  visibility: hidden;
}
.featured-need-title,
.fn-need-title {
  font-weight: 700;
  color: var(--white);
  margin-left: 24px;
  margin-right: 24px;
}
.fn-need-title {
  margin-left: 0;
}
a.featured-need-button,
span.featured-need-button {
  border-radius: 4px;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  padding: 0 1em;
  height: 33px;
  color: var(--blue);
}
.featured-need-container {
  position: absolute;
  width: 100%;
  bottom: 0;
}

.featured-need-content-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: var(--orange);
  color: var(--white);
  position: absolute;
  bottom: 60px;
  border-radius: 4px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.featured-need-content-container.expanded {
  max-height: 100vh; /* Set a very high max-height here; JavaScript will dynamically limit it */
}

.featured-need-inner-container {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
}

.close-featured-need {
  display: flex;
  justify-content: flex-end;
  color: var(--white);
  transition: 0.3s ease;
  margin-left: auto;
  cursor: pointer;
}

.close-featured-need svg {
  width: 60px;
  height: 60px;
}

.close-featured-need:hover {
  color: var(--darkBlue);
}

/* Base styling for mobile (single-column) */
.featured-product-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.featured-need-title svg {
  width: 22px;
  height: 22px;
}

/* Gallery styling */
.featured-need-gallery {
  /* width: 100%; */
  flex: 1 0 100%;
  overflow: scroll;
  padding-bottom: 20px;

  /* Hide scrollbars cross-browser */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE + Edge */
}
.featured-need-gallery::-webkit-scrollbar {
  display: none; /* Chrome + Safari */
}

.featured-need-gallery .main-image img {
  object-fit: cover;
  width: 100%;
  height: 250px;
  max-width: 100%;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.featured-need-gallery .gallery-thumbnails {
  display: none;
}

.featured-need-gallery .gallery-thumbnails .thumbnail-image {
  flex: 1 1 auto;
  max-width: 60px;
  min-width: 40px;
  height: auto;

  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.featured-need-gallery .gallery-thumbnails .thumbnail-image:hover {
  opacity: 0.7;
}

.featured-need-info-container {
  /* width: 100%; */
  flex: 1;
}

.fn-need-description {
  color: var(--darkBlue);
  line-height: 1.5;
  max-width: 550px;
  margin-bottom: 20px;
}

/* .featured-need-details .learn-more-button {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 20px;
    background-color: var(--blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
} */

.main-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(var(--orange-rgb), 0.9);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}

.main-image {
  object-fit: cover;
  width: 100%;
}
@media screen and (min-width: 568px) and (max-width: 915px) and (orientation: landscape) {
  .featured-need-container,
  .featured-need-header {
    position: relative;
    margin-top: 30px;
  }
}
/* Tablet and desktop adjustments */
@media (min-width: 768px) {
  .featured-need-inner-container {
    gap: 50px;
  }

  /* .featured-need-gallery {
        width: 50%;
    } */

  /* .featured-need-info-container {
        width: 50%;
    } */

  .featured-need-gallery .main-image img {
    height: 350px;
  }
}

/* Desktop-specific adjustments */
@media (min-width: 981px) {
  .featured-need-header {
    flex-direction: row;
    bottom: 30px;
  }
  .featured-need-content-container {
    bottom: 30px;
  }
  .featured-need-gallery {
    flex: 1;
  }
  .featured-need-info-container {
    overflow: scroll;
    max-height: 70vh;

    /* Hide scrollbar styles */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE + Edge */
  }
  .featured-need-info-container::-webkit-scrollbar {
    display: none; /* Chrome + Safari */
  }
  .featured-need-gallery .main-image img {
    height: 400px;
    /* max-width: 600px; */
    width: 100%;
  }

  .featured-need-inner-container {
    flex-direction: row;
    min-height: 70vh;

    /* Hide scrollbar styles */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE + Edge */
  }
  .featured-need-inner-container::-webkit-scrollbar {
    display: none; /* Chrome + Safari */
  }
  .featured-need-gallery .gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
    justify-content: start;
  }
  .featured-need-gallery .gallery-thumbnails .thumbnail-image {
    max-width: 125px;
  }
  a.featured-need-button,
  span.featured-need-button {
    margin-left: auto;
    margin-right: 24px;
  }
}
@media screen and (max-width: 980px) {
  .featured-need-inner-container {
    overflow: scroll;
    max-height: 70vh;

    /* Hide scrollbar styles */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE + Edge */
  }
  .featured-need-inner-container::-webkit-scrollbar {
    display: none; /* Chrome + Safari */
  }
  .featured-need-header,
  .featured-need-content-container {
    bottom: 30px;
  }
}
@media screen and (max-width: 600px) {
  .gallery-arrow {
    display: none;
  }
}
