/* Fix for The Latest Articles (CauseOne) - Make images uniform size and improve styling */

.cause .cause__slider-single .thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 200px; /* Fixed height for all images */
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: #f5f5f5; */
}

.cause .cause__slider-single .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crop to fill the container */
  object-position: center; /* Center the image */
}

/* Ensure the link takes full space */
.cause .cause__slider-single .thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

/* For dark mode */
.dark-body .cause .cause__slider-single .thumb {
  background-color: #2a2a2a;
}

/* Make sure the card heights are consistent */
.cause .cause__slider-single {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cause .cause__slider-single:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Dark mode card styling */
.dark-body .cause .cause__slider-single {
  background: #2a2a2a;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.dark-body .cause .cause__slider-single:hover {
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

/* Content area styling */
.cause .cause__slider-single .content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 200px; /* Fixed total content height */
}

.cause .cause__slider-single .content h6 {
  margin-bottom: 12px;
  line-height: 1.4;
  /* height: 60px; /*Fixed height for title - allows 2 lines */
  /* overflow: hidden; */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  font-size: 16px;
}

.cause .cause__slider-single .content p {
  line-height: 1.6;
  color: #666;
  height: 120px; /* Fixed height for description */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5; /* Limit to 5 lines */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.dark-body .cause .cause__slider-single .content p {
  color: #999;
}

/* Tag styling improvements */
.cause .cause__slider-single .thumb .tag {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  background: transparent !important;
  padding: 6px 15px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.cause .cause__slider-single .thumb .tag a {
  color: #ffffff;
  text-decoration: none;
  display: inline;
  width: auto;
  height: auto;
}

/* Button styling */
.cause .cause__slider-single .p-4 {
  padding: 20px !important;
  border-top: 1px solid #f0f0f0;
}
.cause .cause__slider-single .p-4 a{
  font-size: 14px !important;
}

.dark-body .cause .cause__slider-single .p-4 {
  border-top: 1px solid #333;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
  .cause .cause__slider-single .thumb {
    height: 250px;
  }

  .cause .cause__slider-single .content {
    height: 220px;
  }

  .cause .cause__slider-single .content h6 {
    height: 55px;
  }

  .cause .cause__slider-single .content p {
    height: 140px;
    -webkit-line-clamp: 6;
  }
}

@media (max-width: 767px) {
  .cause .cause__slider-single .thumb {
    height: 220px;
  }

  .cause .cause__slider-single .content {
    height: 200px;
  }

  .cause .cause__slider-single .content h6 {
    height: 60px;
  }

  .cause .cause__slider-single .content p {
    height: 120px;
    -webkit-line-clamp: 5;
  }
}

/* Slider navigation button improvements */
.cause .slider-navigation .slider-btn {
  background: #44bae9;
  border: none;
  width: 45px;
  height: 45px;
  min-width: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.cause .slider-navigation .slider-btn:hover {
  background: #0045AB;
  transform: scale(1.1);
}

.dark-body .cause .slider-navigation .slider-btn {
  background: #44bae9;
}

.dark-body .cause .slider-navigation .slider-btn:hover {
  background: #0045AB;
}

/* Swiper wrapper improvements */
.cause .cause__slider-wrapper {
  margin-top: 30px;
}

/* Title styling improvements */
.cause .section__header h2 {
  color: #0045AB;
}

.dark-body .cause .section__header h2 {
  color: #44bae9;
}
