/* style.css */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f8fafc;
  color: #333;
  overflow-x: hidden;
}

.container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Mobile Menu Hamburger */
.menu-toggle {
  display: none;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1.2em;
  cursor: pointer;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: #4338ca;
  transform: scale(1.05);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* ==========================
   ENHANCED SIDEBAR STYLING
   ========================== */
.sidebar {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  position: relative;
  z-index: 998;
}

/* Enhanced logo styling */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-name {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.brand-tagline {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* Enhanced navigation styling */
.nav-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

nav ul li {
  margin: 4px 0;
}

nav ul li a {
  text-decoration: none;
  color: #cbd5e1;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(4px);
}

nav ul li a.active {
  background: #4f46e5;
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Enhanced welcome box */
.welcome {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.welcome-title {
  color: white;
  font-weight: 600;
  margin: 0 0 4px 0;
  font-size: 14px;
}

.welcome-sub {
  color: #94a3b8;
  margin: 0;
  font-size: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 50%;
  margin-bottom: 12px;
}

/* ==========================
   CONTACT / SOCIAL STYLES
   ========================== */

.contact {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.contact-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.contact-list, .social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-list li, .social-list li {
  display: block;
}

.contact-list a, .social-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #cbd5e1;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.18s, transform 0.18s;
}

.contact-list a:hover, .social-list a:hover {
  background: rgba(255,255,255,0.04);
  color: white;
  transform: translateX(4px);
}

.contact-icon, .social-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  color: #fff;
}

.contact-text {
  font-size: 13px;
  color: #e6eef8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================
   MAIN CONTENT (Everything else remains the same)
   ========================== */

.main {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.hero {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.search-box {
  display: flex;
  margin-top: 15px;
  width: 100%;
}

.search-box input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px 0 0 6px;
  box-sizing: border-box;
  cursor: pointer; /* indicate readonly interactive */
}

.search-box button {
  background: #0077ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

/* Quick Filters Styling */
.quick-filters {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.filter-option {
  padding: 8px 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.filter-option.active {
  background: white;
  color: #2563eb;
  border-color: white;
}

/* FIXED: Property Cards with ABSOLUTE Equal Sizes */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  justify-content: flex-start;
}

.property-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
  width: calc(33.333% - 14px); /* 3 columns with gap */
  min-width: 280px;
  height: 500px !important; /* KEEP to maintain current card height behavior */
  position: relative;
}

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

/* Force consistent image height */
.card-img {
  position: relative;
  height: 200px; /* Fixed image height */
  flex-shrink: 0;
  width: 100%;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.property-type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 20px;
  z-index: 2;
}

.price-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ddd;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 2;
}

.price-badge.verified {
  background: #16a34a;
  color: white;
}

/* Card body with ABSOLUTE fixed structure */
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 300px; /* Fixed content area height */
  box-sizing: border-box;
}

.card-body h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.3;
  height: 44px; /* Fixed title height - 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body .location {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  height: 20px; /* Fixed location height */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.details {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 15px;
  height: 25px; /* Fixed details height */
  align-items: center;
}

.details .furnishing {
  background: #d1fae5;
  color: #065f46;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}

/* Amenities with ABSOLUTE fixed height */
.amenities {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  height: 80px; /* ABSOLUTE fixed height */
  overflow-y: auto;
  align-items: flex-start;
  padding: 5px 0;
  box-sizing: border-box;
}

.amenities::-webkit-scrollbar {
  width: 4px;
}

.amenities::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.amenities span {
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #444;
  height: fit-content;
  flex-shrink: 0;
}

/* Fixed actions at bottom */
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  height: 50px; /* Fixed actions height */
  flex-shrink: 0;
}

.btn {
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.btn.view {
  background: #2563eb;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn.call {
  background: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
  padding: 8px 10px;
}

/* Modals */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  text-align: center;
  box-sizing: border-box;
}

.modal-content h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
  margin: 0 0 20px;
}

.modal-content #searchForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgb(9, 7, 7);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus {
  outline: none;
  border-color: #000204;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.btn-gradient {
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-gradient:hover {
  background: #1d4ed8;
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #555;
}

.close:hover {
  color: #000;
}

/* back button for signup form */
.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  color: rgb(243, 117, 7);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.back-button:hover {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Auth Container Styles (unchanged) ... (skipping repetition for brevity) */

/* Responsive Styles follow (unchanged) */

/* Mobile Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .container {
    grid-template-columns: 1fr;
    width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 300px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
  }

  .sidebar.active {
    left: 0;
  }

  .main {
    padding: 60px 15px 20px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .hero {
    padding: 20px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .hero h1 {
    font-size: 24px;
    text-align: center;
  }

  .hero p {
    font-size: 14px;
    text-align: center;
  }

  .search-box {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .search-box input {
    border-radius: 6px;
    padding: 12px;
    width: 100%;
  }

  .search-box button {
    border-radius: 6px;
    padding: 12px;
    width: 100%;
  }

  .quick-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
  }

  .filter-option {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* MOBILE: Single column with forced equal heights */
  .cards {
    display: block; /* Change to block for mobile */
  }

  .property-card {
    width: 100% !important;
    height: 450px !important; /* Force equal height on mobile */
    margin-bottom: 20px;
  }

  .card-img {
    height: 180px;
  }

  .card-body {
    height: 270px;
    padding: 15px;
  }

  .card-body h3 {
    font-size: 16px;
    height: 40px;
  }

  .amenities {
    height: 70px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
    padding: 20px;
  }

  .nav-title, .contact-title {
    font-size: 11px;
  }

  #user-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Tablet & Desktop styles unchanged... */

/* Ensure all images don't cause overflow */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
