/* HomeLink Kyanja - Stylesheet */
:root {
  --primary: #0d6e4f;
  --primary-dark: #094d38;
  --secondary: #f4a261;
  --accent: #e76f51;
  --light: #f8f9fa;
  --dark: #1a1a1a;
  --gray: #6c757d;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

a {
  text-decoration: none;
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--secondary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

nav a {
  color: var(--dark);
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(13,110,79,0.9), rgba(9,77,56,0.85)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover;
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
}

.search-box {
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.search-box input,
.search-box select {
  flex: 1;
  min-width: 150px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.search-box button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.search-box button:hover {
  background: var(--primary-dark);
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 60px 0;
}

.category-card {
  background: white;
  padding: 30px 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

/* Featured Listings */
.section-title {
  text-align: center;
  margin: 50px 0 30px;
  font-size: 2rem;
  color: var(--primary-dark);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.property-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.property-card:hover {
  transform: translateY(-5px);
}

.property-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-info {
  padding: 20px;
}

.property-info h3 {
  margin-bottom: 8px;
  color: var(--dark);
}

.price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
}

.meta {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s;
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* How it works */
.how-it-works {
  background: white;
  padding: 50px 0;
  margin: 40px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.step {
  padding: 20px;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Safety Banner */
.safety-banner {
  background: #fff3cd;
  border-left: 5px solid #ffc107;
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
}

.safety-banner strong {
  color: #856404;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

footer a {
  color: #ddd;
}

footer a:hover {
  color: var(--secondary);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #333;
  color: #aaa;
}

/* Page Specific */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 50px 20px;
  text-align: center;
}

.filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 20px 0;
  background: white;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filters select,
.filters input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  flex: 1;
  min-width: 150px;
}

/* Forms */
.form-container {
  max-width: 700px;
  margin: 30px auto;
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Property Details */
.property-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

.gallery img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 15px;
}

.thumbnails {
  display: flex;
  gap: 10px;
}

.thumbnails img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

.details-sidebar {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }

  nav ul.active {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .property-details {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }
}
