* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
}

header {
  background-color: #0f649b;
  color: white;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #f9d342;
}

main {
  padding-top: 80px;
  padding-bottom: 80px;
  background: url('src/background.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
}

.hero {
  color: white;
  text-align: center;
  padding: 120px 20px;
  background-color: rgba(0, 0, 0, 0.4);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
}

.searchresulthero {
  color: white;
  text-align: center;
  padding: 20px 10px;
  background-color: rgba(0, 0, 0, 0.4);
}

.searchresulthero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.searchresulthero p {
  font-size: 1.2rem;
}

section {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.card {
  background-color: rgba(255, 255, 255, 0.9);
  color: #000;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  margin-bottom: 30px;
}

/* Search Form */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
  position: relative;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  color: #333;
}

input, select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #0f649b;
  box-shadow: 0px 0px 5px rgba(88, 9, 179, 0.4);
}

button {
  flex: 0 0 auto;
  align-self: flex-end;
  padding: 12px 25px;
  background: #0f649b;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #440788;
}

/* Suggestions dropdown */
.suggestions {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.suggestions div {
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestions div:hover {
  background: #f5f5f5;
}

footer {
  background-color: #0f649b;
  color: white;
  text-align: center;
  padding: 1rem 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 999;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  nav a {
    margin: 10px 0 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  form {
    flex-direction: column;
  }
  .form-group,
  button {
    width: 100%;
  }
}

.property-card {
  display: flex;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.property-card img {
  width: 220px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.property-info {
  flex: 1;
  margin-left: 20px;
}

.property-info h3 {
  margin: 0 0 8px;
}

.property-info p {
  margin: 5px 0;
}

.price-box {
  background: #004a99;
  color: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  min-width: 120px;
  align-self: center;
}

.price-box strong {
  display: block;
  font-size: 20px;
}

.price-box small {
  font-size: 12px;
}

/* Carousel CSS */
.property-carousel {
  position: relative;
  width: 220px;
  height: 150px;
  overflow: hidden;
  margin-bottom: 10px;
}

.property-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  transition: opacity 0.3s ease-in-out;
}

.property-carousel img.active {
  display: block;
}

.property-carousel .prev-slide,
.property-carousel .next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 3px;
}

.property-carousel .prev-slide { left: 5px; }
.property-carousel .next-slide { right: 5px; }

/* More/Less link */
.toggle-desc {
  color: #0f649b;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
}

.toggle-desc:hover {
  color: #440788;
}
