:root {
  /* Color Palette */
  --land-primary-color: #5d5fef;
  --secondary-color: #365add;
  --accent-color: #5d5fef;
  --text-dark: #333333;
  --text-light: #F4F4F4;
  --background-light: #F9F9FF;
  --border-soft: #E0E0E0;
}


/* Lands Section Styling */
.land-section {
  padding: 4rem 0;
  background-color: var(--background-light);
}

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

/* Section Header Styling */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--land-primary-color);
  margin-bottom: 1rem;
}

.section-title .accent {
  color: var(--accent-color);
}

.section-description {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-dark);
  opacity: 0.8;
}

/* Lands Grid Layout */
.lands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}


/* Land Offer Card */
.land-offer {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.land-offer:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Land Image */
.land-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.land-offer:hover .land-image {
  transform: scale(1.05);
}

/* Land Details */
.land-details {
  background-color: var(--land-primary-color);
  color: var(--text-light);
  padding: 1.5rem;
}

.land-specs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.land-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spec-label {
  font-size: 0.9rem;
  opacity: 1;
  margin-bottom: 0.3rem;
}

.spec-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.land-meta {
  display: flex;
  justify-content: space-between;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meta-label {
  font-size: 0.8rem;
  opacity: 1;
  margin-bottom: 0.2rem;
}

.meta-value {
  font-size: 1rem;
}

/* Land Footer */
.land-footer {
  padding: 1.5rem;
  background-color: white;
}

.estate-name {
  font-size: 1.3rem;
  color: var(--land-primary-color);
  margin-bottom: 0.5rem;
}

.estate-landmark {
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-view-details{
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  text-align: center;
  width: 100%;
}



.btn-view-details:hover {
  background-color: var(--accent-color);
}

.btn-view-all-lands {
  display: inline;
  padding: 1rem 2rem;
  background-color: var(--secondary-color);
  color: white;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  text-align: center;
  width: 100%;

}

.btn-view-all-lands:hover {
  background-color: var(--accent-color);
  color: var(--text-light);
   font-weight: 700;
}

.section-actions {
  margin-top: 3rem;
  text-align: center;
}

/* Accessibility and Interaction Enhancements */
.land-offer:focus-within {
  outline: 3px solid var(--accent-color);
  outline-offset: 4px;
}


/* Responsive Adjustments 
@media screen and (max-width: 768px) {
  .lands-grid {
      grid-template-columns: 1fr 1fr;
  }

  .section-title {
      font-size: 2rem;
  }
  .land-details {
      padding: 1rem;
  }

  .land-footer {
      padding: 1rem;
  }
}*/


/* Specific layouts for different property counts */
@media screen and (min-width: 769px) {
  /* 4 Properties: Center the 4th property */
  .lands-grid:has(.land-offer:nth-child(4):last-child) {
      grid-template-columns: 1fr 1fr;
      justify-content: center;
      grid-column: 1 / -1;
      
  }
 
  /* 5 Properties: Bottom two in center */
  .lands-grid:has(.land-offer:nth-child(5):last-child) {
      grid-template-columns: 1fr 1fr 1fr;
  }
  .lands-grid:has(.land-offer:nth-child(5):last-child) .land-offer:nth-child(4),
  .lands-grid:has(.land-offer:nth-child(5):last-child) .land-offer:nth-child(5) {
      grid-column: 2 / span 1;
  }

  /* 6 or more Properties: Default 3-column layout */
  .lands-grid:has(.land-offer:nth-child(6)) {
      grid-template-columns: repeat(3, 1fr);
  }

  .section-title {
      font-size: 2rem;
  }

  .property-details {
      padding: 1rem;
  }
}