@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* 99acres Design Tokens */
  --primary-color: #005ca8; /* 99acres Blue */
  --primary-hover: #004b8a;
  --secondary-color: #f4f5f7; /* Light Gray Bg */
  --text-dark: #091e42;
  --text-muted: #5e6c84;
  --border-color: #dfe1e6;
  --white: #ffffff;
  --danger: #ff5630;
  --success: #36b37e;
  
  --font-family: 'Inter', sans-serif;
  --box-shadow: 0 4px 8px rgba(9, 30, 66, 0.08), 0 0 1px rgba(9, 30, 66, 0.31);
  --box-shadow-hover: 0 8px 16px rgba(9, 30, 66, 0.12), 0 0 1px rgba(9, 30, 66, 0.31);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--secondary-color);
  color: var(--text-dark);
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

ul {
  list-style: none;
}

/* --- Buttons --- */
.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: background 0.2s;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 10px 24px;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: all 0.2s;
}

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

.btn-delete {
  background: var(--danger);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.btn-delete:hover {
  background: #de350b;
}

/* --- Header --- */
header {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(9, 30, 66, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.post-property-btn {
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-property-btn span.badge {
  background: var(--success);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.post-property-btn:hover {
  background: #f4f5f7;
}

.login-icon {
  width: 36px;
  height: 36px;
  background: #f4f5f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background-image: url('../images/hero-new.png');
  background-size: cover;
  background-position: center;
  padding: 120px 0 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1s ease-in-out;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.search-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.search-title {
  color: white;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
}

.search-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.search-tabs button {
  flex: 1;
  padding: 16px 0;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.search-tabs button.active {
  color: var(--primary-color);
}

.search-tabs button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
}

.search-form {
  padding: 20px;
  display: flex;
  gap: 10px;
  background: #fff;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0 15px;
}

.search-input-wrap i {
  color: var(--text-muted);
  font-size: 18px;
}

.search-input-wrap input {
  width: 100%;
  border: none;
  padding: 16px 10px;
  font-size: 16px;
  outline: none;
  color: var(--text-dark);
}

.search-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Section Styling --- */
.section-wrapper {
  padding: 60px 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: 24px;
  color: var(--text-dark);
  font-weight: 700;
}

/* --- 99acres Property Cards Grid --- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  box-shadow: var(--box-shadow-hover);
}

.property-img {
  position: relative;
  height: 200px;
  background: #e9ecef;
}

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

.property-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.property-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.prop-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prop-location {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.prop-specs {
  display: flex;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 15px;
  justify-content: space-between;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.spec-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.prop-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prop-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.prop-actions button {
  flex: 1;
}

/* --- Forms & Inputs --- */
.post-form-container {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  max-width: 900px;
  margin: 40px auto;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.form-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 15px;
  font-family: var(--font-family);
  outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-color);
}

/* --- Tables (Admin) --- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 40px;
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

th {
  background: #f4f5f7;
  color: var(--text-muted);
  font-weight: 600;
}

.img-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

/* --- Footer --- */
footer {
  background: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
    gap: 15px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .search-form {
    flex-direction: column;
  }
  .property-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
