/* index.css */

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center center;
  min-height: 650px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center; /* Center content vertically and horizontally */
  padding: var(--spacing-xxl) 0; /* Generous padding */
  position: relative;
  color: var(--text-light); /* Default text color for hero */
  text-align: center;
}

.hero::before {
  /* Gradient overlay */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    /* Slightly darker top */ rgba(0, 0, 0, 0.7) 100%
      /* Slightly darker bottom */
  );
  z-index: 1;
}

.hero-content {
  position: relative; /* Above overlay */
  z-index: 2;
  max-width: 850px; /* Slightly wider for search */
  margin: 0 auto;
}

.hero-title {
  font-size: var(--font-size-3xl);
  color: var(--text-light);
  margin-bottom: var(--spacing-sm); /* Reduced margin */
  font-weight: 700;
  font-family: var(--font-primary); /* Use primary font */
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Stronger text shadow */
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  opacity: 0.9;
  margin-bottom: var(--spacing-lg); /* Space before search box */
  font-weight: 400;
  max-width: 600px; /* Limit subtitle width */
  margin-left: auto;
  margin-right: auto;
}

/* Search Box */
.search-box {
  background-color: rgba(255, 255, 255, 0.95); /* Consistent with browse */
  backdrop-filter: blur(5px);
  padding: var(--spacing-md); /* Consistent padding */
  border-radius: var(--border-radius-md); /* More rounded */
  box-shadow: var(--shadow-lg);
  margin-top: var(--spacing-lg); /* Add space above */
  max-width: 900px; /* Limit width */
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-form {
  display: grid;
  /* Mobile first: single column */
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  align-items: center;
}

/* Desktop layout for search form */
@media (min-width: 992px) {
  .search-form {
    grid-template-columns: repeat(3, 1fr) auto; /* 3 inputs + button */
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .search-form {
    grid-template-columns: repeat(2, 1fr); /* 2 inputs per row on tablet */
  }
  .search-form button {
    grid-column: 1 / -1; /* Button spans full width on tablet */
  }
}

.search-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background-color: var(--bg-primary);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 191, 161, 131), 0.25);
}

.search-input-group i {
  padding: 0 var(--spacing-sm); /* Adjust padding */
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  width: 40px; /* Fixed width */
  text-align: center;
  flex-shrink: 0; /* Prevent icon shrinking */
  border-right: 1px solid var(--border-color);
}

.search-input-group select {
  border: none;
  padding: var(--spacing-sm) var(--spacing-md); /* Consistent padding */
  padding-right: calc(var(--spacing-md) * 2); /* Space for arrow */
  flex-grow: 1;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background-color: transparent; /* Inherit background */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23777777" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
  background-repeat: no-repeat;
  background-position-x: calc(100% - var(--spacing-sm));
  background-position-y: center;
  cursor: pointer;
}

.search-input-group select:focus {
  outline: none;
  box-shadow: none; /* Remove inner shadow, parent handles focus */
}

.search-form button {
  padding: calc(var(--spacing-sm) + 2px) var(--spacing-lg); /* Align height with inputs */
  height: 100%; /* Match height in grid */
  min-height: 44px; /* Ensure minimum touch target size */
  /* Inherit .btn .btn-primary styles */
}

/* Featured Listings Section (Uses property-card.css) */
.featured-listings {
  padding: var(--spacing-xl) 0; /* Consistent section padding */
  background-color: var(--bg-secondary);
}

.property-cards {
  /* Container for property cards */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Exactly 3 columns on desktop */
  gap: var(--spacing-lg); /* Consistent gap */
}

/* Responsive adjustments for property cards */
@media (max-width: 991px) {
  .property-cards {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .property-cards {
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: var(--spacing-md);
  }
}

/* Property card styles are in property-card.css */

/* Why Choose Us Section */
.why-choose-us {
  padding: var(--spacing-xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(260px, 1fr)
  ); /* Adjust minmax */
  gap: var(--spacing-lg);
}

.feature-card {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content */
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 72px; /* Adjust size */
  height: 72px;
  margin: 0 auto var(--spacing-md);
  color: var(--primary-color); /* Color the icon */
  background-color: color-mix(
    in srgb,
    var(--primary-color) 10%,
    transparent
  ); /* Lighter bg */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon img {
  /* Ensure img within icon div behaves */
  width: 60%; /* Adjust image size within circle */
  height: 60%;
  object-fit: contain;
}
.feature-icon i {
  /* Style FA icons if used */
  font-size: 36px;
  line-height: 1;
}

.feature-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--secondary-color);
  font-weight: 600;
  font-family: var(--font-primary);
}

.feature-description {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Stats Section */
.stats-section {
  background-color: var(--secondary-color); /* Use secondary color bg */
  /* Or use an image background with overlay */
  /* background-image: linear-gradient(rgba(45,45,45,0.85), rgba(45,45,45,0.85)), url('path/to/stats-bg.jpg'); */
  /* background-size: cover; */
  /* background-position: center; */
  /* background-attachment: fixed; */ /* Optional parallax */
  padding: var(--spacing-xl) 0;
  color: var(--text-light); /* Text on dark background */
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(200px, 1fr)
  ); /* Responsive columns */
  gap: var(--spacing-lg);
  text-align: center;
}

.stat-item h3 {
  font-size: var(--font-size-2xl); /* Large numbers */
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color); /* Highlight numbers */
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
}

.stat-item p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary); /* Use light secondary */
  color: rgba(255, 255, 255, 0.8); /* Override with light text */
  font-weight: 500;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Testimonials Section */
.testimonials {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-secondary); /* Optional alternating bg */
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(320px, 1fr)
  ); /* Adjust minmax */
  gap: var(--spacing-lg);
}

.testimonial-card {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.testimonial-content {
  font-family: var(--font-primary); /* Serif font for quote */
  font-style: italic;
  font-size: var(--font-size-md);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  line-height: 1.7; /* More line height for quote */
  flex-grow: 1; /* Allow content to push author down */
  position: relative;
  padding-left: var(--spacing-lg); /* Space for quote mark */
}
.testimonial-content::before {
  /* Add quote mark */
  content: '“';
  font-size: 4rem; /* Larger quote */
  color: var(--primary-color);
  opacity: 0.2; /* More subtle */
  position: absolute;
  left: -10px; /* Adjust position */
  top: -15px;
  line-height: 1;
  font-family: serif; /* Ensure serif quote mark */
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md); /* More gap */
  margin-top: auto; /* Push to bottom */
  padding-top: var(--spacing-md); /* Space above author */
  border-top: 1px solid var(--border-color); /* Separator */
}

.author-avatar {
  width: 60px; /* Slightly larger avatar */
  height: 60px;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-color); /* Optional border */
}

.author-info h4 {
  font-family: var(--font-primary); /* Serif for name */
  font-size: var(--font-size-md);
  margin-bottom: 2px;
  color: var(--secondary-color); /* Use darker color */
  font-weight: 700;
}

.author-info p {
  font-size: var(--font-size-xs); /* Smaller title/position */
  color: var(--text-secondary);
  margin-bottom: 0;
  font-style: italic; /* Italicize position */
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  .hero-subtitle {
    font-size: var(--font-size-md);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 550px;
    padding: var(--spacing-xl) 0;
  }
  .search-box {
    padding: var(--spacing-md);
  }
  .features-grid,
  .stats-grid,
  .testimonials-grid {
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: var(--spacing-md); /* Reduce gap */
  }
  .testimonial-content::before {
    /* Smaller quote on mobile */
    font-size: 3rem;
    left: -5px;
    top: -10px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 500px;
  }
  .hero-title {
    font-size: var(--font-size-xl);
  }
  .hero-subtitle {
    font-size: var(--font-size-sm);
  }
  .search-input-group i {
    display: none;
  } /* Hide icons */
  .search-input-group select {
    padding-left: var(--spacing-sm);
  }
  .search-form button {
    font-size: var(--font-size-xs);
  }
  .feature-card {
    padding: var(--spacing-md);
  }
  .stat-item h3 {
    font-size: var(--font-size-xl);
  }
}
