.cwp-updates-accordion {
  border-top: 2px solid #002405;
}

.cwp-updates-title {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: #586d55;
  position: relative;
  top: 25px;
  font-weight: 500;
}

.cwp-update-item {
  border-bottom: 2px solid #002405;
  margin-bottom: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  padding-top: 65px;
  padding-bottom: 65px;
}

.cwp-update-date {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #586d55;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 10px;
}

/* .cwp-update-item:last-child {
  border-bottom: none;
} */

.cwp-update-header {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  will-change: auto;
}

.cwp-update-title {
  color: #002405;
  font-size: 38px;
  margin-bottom: 30px;
}

/* .cwp-update-header:hover {
  background-color: rgba(45, 80, 22, 0.05);
} */

.cwp-update-header-content {
  flex: 1;
  margin-right: 20px;
  overflow: hidden;
  transition: max-height 0.4s ease;
  max-height: 4.2em; /* 3 lines * 1.4 line-height */
}

/* Collapsed state - show only 3 lines */
.cwp-update-item:not(.expanded) .cwp-update-header-content {
  max-height: 172px;
}

/* Expanded state - show full content */
.cwp-update-item.expanded .cwp-update-header-content {
  max-height: 2000px; /* Large enough for any content */
}

.cwp-update-description {
  color: #002405;
  font-size: 22px;
  line-height: 32px;
  max-width: 652px;
}

.cwp-update-description li {
  margin-bottom: 30px;
}

.cwp-update-gallery {
  margin-top: 73px;
  width: 1256px;
  height: 219px;
}

.cwp-update-image {
  width: 300px;
  height: 170px;
  margin-right: 130px;
  flex-shrink: 0;
}

.cwp-update-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cwp-image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #999;
  opacity: 0;
}

.cwp-update-toggle {
  position: absolute;
  right: 0;
  top: 20px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.toggle-svg {
  width: 43px;
  height: 43px;
  transition: transform 0.3s ease;
}

.cwp-update-item.expanded .toggle-icon {
  transform: rotate(0deg);
}

.cwp-update-item:not(.expanded) .toggle-icon {
  transform: rotate(0deg);
}

.cwp-update-description ul {
  margin: 0;
  padding-left: 30px;
}

.cwp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 43px;
  width: 100%;
  position: absolute;
}

.cwp-gallery-item {
  height: 219px;
  width: 279px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cwp-gallery-item:hover {
  transform: scale(1.05);
}

.cwp-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cwp-updates-feature-image-mobile {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cwp-updates-accordion {
    padding: 15px;
  }

  .cwp-updates-feature-image-mobile {
    display: block;
    max-width: 100%;
    height: 100%;
    padding: 0 40px 20px 40px;
  }

  .cwp-update-image {
    display: none;
  }

  .cwp-update-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cwp-update-header-content {
    margin-right: 0;
    margin-bottom: 15px;
    width: 100%;
    overflow-x: visible;
  }

  .cwp-update-image {
    width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .cwp-update-toggle {
    top: 45px;
  }

  .cwp-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cwp-update-title {
    font-size: 35px;
    padding-right: 40px;
  }

  .cwp-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cwp-update-description {
    font-size: 16px;
    line-height: 25px;
  }

  .cwp-update-item {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .cwp-update-item:not(.expanded) .cwp-update-header-content {
    max-height: 400px;
  }

  .cwp-update-description ul {
    padding-left: 20px;
  }
}

.main-image-container img {
  height: 100%;
}

/* Mobile Carousel Styles */
.slick-slider.cwp-mobile-carousel,
.cwp-mobile-carousel {
  display: none;
}

@media (max-width: 768px) {
  /* Hide desktop gallery on mobile */
  .cwp-update-gallery {
    display: none;
  }

  /* Show mobile carousel on mobile */
  .cwp-mobile-carousel,
  .slick-slider.cwp-mobile-carousel {
    display: block;
    /* width: calc(100vw - 30px);
    left: -30px; */
  }

  /* .cwp-update-header-content,
  .cwp-update-header,
  .cwp-update-item {
    overflow: visible;
  } */

  .cwp-mobile-carousel .slick-slide {
    padding: 0 15px;
    max-width: 100%;
  }

  .carousel-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
  }

  /* Style the dots */
  .cwp-mobile-carousel .slick-dots {
    margin-top: 15px;
    text-align: center;
    list-style: none;
    display: flex;
    gap: 5px;
    justify-content: center;
    padding: 0;
  }

  .cwp-mobile-carousel .slick-dots li button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    font-size: 0;
    padding: 0;
  }

  .cwp-mobile-carousel .slick-dots li.slick-active button {
    background: #586d55;
  }
}
