* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
}

body {
  background: #edf2f7;
  min-height: 100vh;
}

/* Header Styles */
.header {
  background: white;
  padding: 1rem 5%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  text-decoration: none;
  position: relative;
  padding-right: 2rem;
}

.logo::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #3182ce, #2c5282);
  border-radius: 2px;
}

.back-home {
  background: linear-gradient(135deg, #3182ce, #2c5282);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.back-home i {
  transform: scaleX(-1);
}

.back-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.back-home:hover::before {
  transform: translateX(100%);
}

/* Search Section Styles */
.search-section {
  color: white;
  width: 100%;
  min-height: 500px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/background.webp');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 2rem 5%;
  overflow: hidden;
}

.search-container {
  max-width: 1400px;
  margin: 0 auto;
}

.search-header {
  text-align: center;
  margin-bottom: 2rem;
}

.search-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.search-header p {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
}

.search-form {
  display: flex;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-input label {
  color: #4a5568;
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}

.search-input select,
.search-input input {
  padding: 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
  text-align: right;
  direction: rtl;
}

.search-input select:hover,
.search-input input:hover {
  border-color: #3182ce;
}

.search-input select:focus,
.search-input input:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
  outline: none;
}

.search-button {
  align-self: flex-end;
  background: linear-gradient(135deg, #3182ce, #2c5282);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 0;
}

/* Properties Grid Styles */
.properties-section {
  padding: 3rem 5%;
  position: relative;
  min-height: calc(100vh - 400px);
}

.properties-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.properties-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
  text-align: left;
}

.properties-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.property-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
}

@media (min-width: 1024px) {
  .property-card {
    max-width: 400px;
  }
}

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

.property-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.property-details {
  padding: 1.5rem;
}

.property-title {
  font-size: 1.2rem;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.property-location {
  color: #718096;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.property-features {
  display: flex;
  gap: 1rem;
  color: #718096;
  margin-bottom: 1rem;
  background: #f7fafc;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.property-price {
  font-size: 1.3rem;
  color: #3182ce;
  font-weight: 600;
  display: inline-block;
  background: #ebf8ff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #bee3f8;
}

.property-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #48bb78;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  left: 1rem;
  right: auto;
}

.property-status.sold {
  background: #e53e3e;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .search-form {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .properties-header {
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-start;
  }

  .contact-info {
    display: none;
  }

  .mobile-contact {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
  }
}

@media (max-width: 480px) {
  .search-header h1 {
    font-size: 2rem;
  }
}

.contact-info {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.contact-link {
  color: #4a5568;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #3182ce;
}

/* Add loading state */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3182ce;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Add no results message */
.properties-grid .no-results {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.no-results .content-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.no-results i {
  font-size: 5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #3182ce, #2c5282);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.no-results h3 {
  font-size: 2.5rem;
  color: #2d3748;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.no-results p {
  font-size: 1.2rem;
  color: #718096;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Improve sort dropdown */
.sort-filter select {
  padding: 0.8rem 2rem 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #4a5568;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a5568'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.5em;
}

.sort-filter select:hover {
  border-color: #3182ce;
}

/* Improve header */
.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

/* Add skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Improve mobile experience */
@media (max-width: 768px) {
  .search-section {
    padding: 3rem 5%;
  }

  .search-header h1 {
    font-size: 2rem;
  }

  .property-card {
    max-width: 400px;
    margin: 0 auto;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Add scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #3182ce, #2c5282);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 99;
  left: 2rem;
  right: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.scroll-top.visible {
  display: flex;
}

/* Update mobile styles to align text left */
@media (max-width: 768px) {
  .search-header {
    text-align: right;
  }

  .search-header h1 {
    font-size: 2rem;
  }

  .search-header p {
    font-size: 1.1rem;
  }

  /* Remove these styles as they're no longer needed */
  .contact-info,
  .mobile-contact {
    display: none;
  }
}

/* Remove sort-filter related styles */
.sort-filter {
  display: none;
}

/* Update search form responsive styles */
@media (max-width: 1024px) {
  .search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .search-button {
    grid-column: 1 / -1;
    /* Make button span full width */
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  .search-form {
    grid-template-columns: 1fr;
  }

  .search-header {
    text-align: right;
  }

  .search-header h1 {
    font-size: 2rem;
  }

  .search-header p {
    font-size: 1.1rem;
  }

  .search-button {
    margin-top: 0.5rem;
  }

  .property-card {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Add this to your existing styles */
.property-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.property-link:hover {
  transform: none;
  /* Remove hover transform from link */
}

/* Update the property-card hover to work with link */
.property-link .property-card {
  transition: all 0.3s ease;
}

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

/* Add these styles to your existing <style> tag */
footer {
  background: #1a202c;
  color: #a0aec0;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.logo,
.back-home,
.search-header h1,
.search-header p,
.search-input label,
.search-input select,
.search-input input,
.search-button,
.property-title,
.property-location,
.property-features,
.property-price,
.property-status,
.no-results h3,
.no-results p,
.load-more-btn,
.footer p {
  font-family: 'Cairo', sans-serif;
}
