/* استایل‌های پایه */
.champains {
  margin-top: 80px;
}

.campaign-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  width: 100%;
}

.campaign-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.progress-bar {
  background-color: #0aa4d3;
  position: relative;
}

.progress-bar span {
  position: absolute;
  width: 100%;
  text-align: center;
  font-weight: bold;
  color: white;
}

.btn-donate {
  background-color: #0aa4d3;
  color: white;
}

.btn-donate:hover {
  background-color: #088ab8;
}

.card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.campaign-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}
.campaign-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* استایل کلی اسلایدر */
.range-slider {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  direction: rtl;
}

.range-slider input[type="range"] {
  position: absolute;
  -webkit-appearance: none;
  top: -5px;
  width: 100%;
  height: 8px;
  background: transparent;
  pointer-events: none;
  z-index: 3;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.range-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: #007bff;
  border-radius: 10px;
  border: none;
  z-index: 1;
}

#minAmountValue,
#maxAmountValue {
  font-size: 14px;
  color: #007bff;
  font-weight: bold;
  margin-top: 10px;
}

.range-slider input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}

.range-slider input[type="range"]::-moz-range-track {
  background: transparent;
}

.range-slider input[type="range"]::-ms-track {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

.filter-section {
  position: sticky;
  top: 120px;
  z-index: 100;
}

.row.g-4 {
  display: flex;
  flex-wrap: wrap;
}

.col-md-4 {
  display: flex;
}

.col-md-4 .card {
  min-width: 259px !important;
}

#searchButton {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#searchInput {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

select:focus {
  box-shadow: none !important;
  border: 1px solid #dee2e6 !important;
}

.form-control:focus {
  box-shadow: none !important;
  border: 1px solid #dee2e6;
}

/* Media Queries برای ریسپانسیو کردن صفحه */

/* برای دستگاه‌های کوچک (موبایل) */
@media (max-width: 767.98px) {
  .champains {
    margin-top: 60px;
  }

  .campaign-card {
    margin-bottom: 20px;
  }

  .campaign-image {
    height: 250px;
  }

  .filter-section {
    position: static; /* غیرفعال کردن sticky در موبایل */
    margin-bottom: 20px;
  }

  .col-md-4 {
    flex: 0 0 100%; /* هر کارت در یک ردیف نمایش داده شود */
    max-width: 100%;
  }

  .col-md-4 .card {
    min-width: 100% !important; /* عرض کامل برای کارت‌ها */
  }
  footer .col-md-4 {
    display: inline-block;
  }
  #searchInput {
    width: 70%; /* کاهش عرض فیلد جستجو */
  }

  #searchButton {
    width: 30%; /* افزایش عرض دکمه جستجو */
  }
}

/* برای دستگاه‌های متوسط (تبلت) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .col-md-4 {
    flex: 0 0 50%; /* دو کارت در هر ردیف */
    max-width: 50%;
  }
  footer .col-md-4 {
    display: inline-block;
  }
  .campaign-image {
    height: 200px;
  }
}

/* برای دستگاه‌های بزرگ (دسکتاپ) */
@media (min-width: 992px) {
  .col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    min-width: 30%;
  }
}
.progress-bar span {
  color: black; /* تغییر رنگ متن به مشکی */
  font-weight: bold; /* اگر می‌خواهید متن پررنگ‌تر باشد */
}
/* استایل کلی برای صفحه‌بندی */
.pagination {
  display: flex !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 20px 0 !important;
}

/* استایل دکمه‌های صفحه‌بندی */
.page-item {
  list-style: none !important;
  margin: 0 5px !important;
}

.page-link {
  display: block !important;
  padding: 8px 16px !important;
  border: 1px solid #ddd;
  border-radius: 4px !important;
  color: #007bff;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.page-link:hover {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* استایل دکمه "قبلی" */
.prev-btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 20px !important; /* بردر ردیوس سمت چپ */
  border-bottom-left-radius: 20px !important; /* بردر ردیوس سمت چپ */
}

/* استایل دکمه "بعدی" */
.next-btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 20px !important; /* بردر ردیوس سمت راست */
  border-bottom-right-radius: 20px !important; /* بردر ردیوس سمت راست */
}

/* استایل برای دکمه‌های غیرفعال */
.page-item.disabled .page-link {
  color: #6c757d !important;
  pointer-events: none !important;
  background-color: #f8f9fa !important;
  border-color: #ddd !important;
}

/* استایل برای دکمه فعال */
.page-item.active .page-link {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}
.school-name {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
  margin-bottom: 10px;
  font-weight: bold;
}
