/* Professional blue color scheme */
:root {
  --primary-color: #1a56db; /* Blue instead of red */
  --primary-dark: #1e429f; /* Darker blue for hover states */
  --secondary-color: #17355d; /* Dark blue for text */
  --accent-color: #3498DB; /* Lighter blue for accents */
  --accent-light: #f0f7ff;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #dee2e6;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --transition: all 0.25s ease;
}

body {
  font-family: 'Tajawal', sans-serif;
}

/* Hero section */
.hero-section {
  position: relative;
  min-height: 80vh; /* Adjust height */
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 30px;
  margin-bottom: 0;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  padding: 0 15px;
}

.hero-counter {
  color: white;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.search-panel {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  padding: 25px;
  width: 100%;
}

.search-tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 25px;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
  display: flex;
  align-items: center;
}

.tab-btn.active {
  background-color: var(--primary-color);
}

.tab-btn i {
  margin-right: 8px;
  font-size: 16px;
}

.search-row {
  display: flex;
  margin-bottom: 15px;
}

.search-input-wrap {
  flex-grow: 1;
  position: relative;
}

.search-location-input {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 5px;
  padding: 5px 45px 5px 15px;
  font-size: 16px;
  color: #555;
}

.location-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.filter-row {
  display: flex;
  gap: 10px;
}

.filter-select {
  flex: 1;
  background: white;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  color: #555;
  font-size: 15px;
  cursor: pointer;
  text-align: right;
  position: relative;
  height: 45px;
}

.search-btn {
  flex: 0 0 100px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
}

.search-btn:hover {
  background-color: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .filter-row {
    flex-wrap: wrap;
  }
  
  .filter-select {
    flex: 1 0 calc(50% - 5px);
    margin-bottom: 10px;
  }
  
  .search-btn {
    flex: 1 0 100%;
  }
}

@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
    padding: 100px 0 30px;
  }
  
  .search-tabs {
    justify-content: center;
  }
  
  .tab-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .filter-select {
    flex: 1 0 100%;
  }
}

/* Property Card Styles */
.property-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border: none;
  position: relative;
  cursor: pointer;
}

.property-card-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.property-card-header {
  position: relative;
}

.property-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.property-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.property-card:hover .property-img img {
  transform: scale(1.05);
}

.property-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  z-index: 1;
}

.property-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
}

.badge-sale {
  background-color: var(--primary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.badge-rent {
  background-color: var(--accent-color);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  z-index: 2; /* Higher than the card link */
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
}

.favorite-btn i {
  color: #ccc;
  font-size: 16px;
  transition: all 0.2s ease;
}

.favorite-btn.favorite-active i {
  color: var(--primary-color);
}

.favorite-btn:hover {
  transform: scale(1.1);
}

.property-card-body {
  padding: 16px;
  direction: rtl;
}

.property-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.property-title {
  color: var(--secondary-color);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.property-title a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.property-title a:hover {
  color: var(--primary-color);
}

.property-location {
  color: #777;
  font-size: 14px;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-location i {
  color: #999;
  margin-left: 5px;
}

.property-features {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.feature {
  display: flex;
  align-items: center;
  color: #555;
  font-size: 14px;
}

.feature i {
  color: var(--accent-color);
  font-size: 16px;
  margin-left: 5px;
}

/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
  height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #495057;
  line-height: 28px;
  padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-color);
}

.select2-dropdown {
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.select2-search--dropdown .select2-search__field {
  padding: 8px;
  border: 1px solid #ced4da;
}

.select2-results__option {
  padding: 8px 12px;
}

.modal-filter {
  padding: 20px;
}

.modal-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-filter-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--secondary-color);
}

.modal-filter-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}

.modal-filter-section {
  margin-bottom: 20px;
}

.modal-filter-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.modal-filter-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.modal-filter-reset {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 20px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-filter-reset:hover {
  border-color: #bbb;
}

.modal-filter-apply {
  background: var(--primary-color);
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-filter-apply:hover {
  background: var(--primary-dark);
}

/* Form elements styling */
.form-control {
  height: 44px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 86, 219, 0.25);
}

.form-check-input {
  width: 16px;
  height: 16px;
  margin-top: 0.25rem;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  margin-right: 0.5rem;
}

/* Pagination styling */
.pagination {
  display: flex;
  justify-content: center;
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-link {
  color: var(--primary-color);
}

.page-link:hover {
  color: var(--primary-dark);
}
