* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  background-color: #f9f9f9;
  line-height: 1.6;
}

/* navbar */
.navbar {
  width: 100%;
  padding: 1.2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom right, #ffffff, #f3f6fa);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #002b5b;
}

.logo span {
  color: #0098ff;
}

.logo-img {
  height: 42px;
  display: block;
  width: auto;
  margin-right: 10px;
  border-radius: 8px;
}

.navbar nav {
  display: flex;
  gap: 2rem;
}

.navbar a {
  text-decoration: none;
  color: #002b5b;
  font-weight: 600;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #0098ff;
}

/* Banner */
.banner {
  position: relative;
  height: 90vh;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding-top: 4rem;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 20, 40, 0.55);
}

.banner-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
}

.banner h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.banner p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #e2e2e2;
}

/* search Bar */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-bar input {
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 8px;
  min-width: 160px;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.3s ease;
}

.search-bar input:focus {
  box-shadow: 0 0 0 3px rgba(0, 152, 255, 0.3);
}

.search-bar input::placeholder {
  color: #555;
}

.search-bar button {
  background: #0098ff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
}
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.search-bar button:hover {
  background: #0077cc;
  transform: translateY(-2px);
}

.search-bar button:active {
  transform: translateY(0);
}

/* results Section */
#results {
  padding: 3rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

/* results header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.results-header h2 {
  color: #002b5b;
  font-size: 1.8rem;
}

.clear-btn {
  background: transparent;
  color: #0098ff;
  border: 2px solid #0098ff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: #0098ff;
  color: white;
}

/* loading error states */
.loading, .error, .no-results {
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.2rem;
  color: #666;
}

.loading {
  color: #0098ff;
  font-weight: 600;
}

.error {
  color: #d32f2f;
}

/* property cards grid */
.property-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* individual property card */
.property-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: 0.2s ease;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f0f0f0;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.property-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #0098ff;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

.card-price {
  color: #002b5b;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-address {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
}

.card-location {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.card-meta span {
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

/* pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding: 2rem 0;
}

.page-btn {
  background: white;
  color: #002b5b;
  border: 2px solid #e0e0e0;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
  background: #0098ff;
  color: white;
  border-color: #0098ff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-num {
  background: white;
  color: #002b5b;
  border: 2px solid #e0e0e0;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 45px;
}

.page-num:hover {
  background: #f0f0f0;
  border-color: #0098ff;
}

.page-num.active {
  background: #0098ff;
  color: white;
  border-color: #0098ff;
}

.page-ellipsis {
  color: #666;
  padding: 0 0.5rem;
}

/* footer */
footer {
  text-align: center;
  padding: 2rem 0;
  background: #002b5b;
  color: white;
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .banner h1 {
    font-size: 2.2rem;
  }
  
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-bar input {
    width: 100%;
  }
  
  .search-bar button {
    width: 100%;
  }
  
  .property-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .results-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .results-header h2 {
    font-size: 1.4rem;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
  
  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
  
  .navbar nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

html {
  scroll-behavior: smooth;
}

/* for when a user clicks on listings */
#results {
  padding: 3rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 300px; /* Ensures there's always a target to scroll to */
  scroll-margin-top: 80px; /* Offset for fixed navbar */
}