/* === Modern Reset & Dark Professional Background === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  background-attachment: fixed;
  color: #e2e8f0;               /* light text for readability on dark */
  line-height: 1.6;
  min-height: 100vh;
}

/* --- Dark Glass Navbar --- */
nav {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container { max-width:1200px; margin:auto; display:flex; justify-content:space-between; align-items:center; }
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.5rem; font-weight: 700; color: #ffffff;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
  letter-spacing: -0.5px;
}
.logo-icon { width:28px; height:28px; color:#fff; filter:drop-shadow(0 0 4px rgba(255,255,255,0.4)); }
nav button {
  background: rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.15);
  color:#e2e8f0; padding:0.6rem 1.2rem; margin-left:0.3rem;
  cursor:pointer; border-radius:50px; font-weight:500;
  transition:all 0.2s;
}
nav button:hover { background: rgba(255,255,255,0.25); color:#fff; transform:translateY(-1px); }

/* Main */
main { max-width:1100px; margin:2rem auto; padding:0 1rem; min-height:70vh; }
footer { text-align:center; padding:1.5rem; color:#e2e8f0; background:rgba(15,23,42,0.7); backdrop-filter:blur(5px); margin-top:2rem; }

/* Forms etc */
.form-group { margin-bottom:1.2rem; }
label { display:block; margin-bottom:0.3rem; font-weight:600; color:#e2e8f0; }
input, select, textarea {
  width:100%; padding:0.75rem; border:1px solid #334155; border-radius:8px;
  font-size:1rem; transition:border 0.2s; background:#1e293b; color:#f1f5f9;
}
input:focus, select:focus, textarea:focus { border-color:#10b981; outline:none; box-shadow:0 0 0 3px rgba(16,185,129,0.25); }
button.primary { background:linear-gradient(135deg,#10b981,#059669); color:white; border:none; padding:0.8rem 1.8rem; border-radius:50px; font-weight:600; cursor:pointer; }
button.primary:hover { opacity:0.9; }
button.secondary { background:#334155; border:1px solid #475569; padding:0.7rem 1.5rem; border-radius:50px; cursor:pointer; color:#e2e8f0; }
button.secondary:hover { background:#475569; }

.search-area { display:flex; gap:0.8rem; margin-bottom:2rem; flex-wrap:wrap; }
.search-area input { flex:1; min-width:200px; background:#1e293b; border-color:#334155; color:#f1f5f9; }
.search-area input::placeholder { color:#94a3b8; }
.search-area button { background:linear-gradient(135deg,#10b981,#059669); color:white; border:none; padding:0.75rem 1.5rem; border-radius:8px; font-weight:600; }

/* Grid layout rules */
.listings-grid, #listings-container, #my-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* ================= CINEMATIC HERO SLIDER ================= */
.featured-slider-container {
  position: relative;
  width: 100%;
  height: 55vh;                 /* tall & cinematic */
  max-height: 600px;
  min-height: 320px;
  background: #0f172a;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.showcase-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  cursor: pointer;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.showcase-slide .slide-overlay-content {
  max-width: 600px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.slider-dots-container {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.hero-dot.active {
  background: #10b981;
}

/* Responsive slider */
@media (max-width: 768px) {
  .featured-slider-container {
    height: 45vh;
    max-height: 400px;
    border-radius: 16px;
  }
  .showcase-slide {
    padding: 1.5rem;
  }
  .showcase-slide .slide-overlay-content h2 {
    font-size: 1.2rem;
  }
}

/* ================= LISTING CARDS (3D preserved) ================= */
.listing-card, .house-card {
  background: rgba(30, 41, 59, 0.9); 
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; 
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  will-change: transform, box-shadow;
}
.listing-card:hover, .house-card:hover { 
  transform: perspective(1000px) translateY(-8px) rotateX(4deg) rotateY(-2deg); 
  box-shadow: 0 20px 30px rgba(0,0,0,0.5); 
}
.listing-card.featured {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 15px rgba(245,158,11,0.4);
}
.listing-card img {
  width:100%; height:140px; object-fit:cover; background:#1e293b;
}
.listing-image-wrapper {
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.listing-card:hover .listing-image-wrapper {
  transform: translateZ(15px);
}
.card-body { padding:0.8rem; }
.listing-card h3 { font-size:0.95rem; margin-bottom:0.2rem; color:#f1f5f9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.listing-card p { font-size:0.8rem; color:#94a3b8; margin-bottom:0.2rem; }
.listing-card .price { font-size:1.1rem; font-weight:700; color:#10b981; }
.listing-card .views { font-size:0.75rem; color:#f59e0b; margin-bottom:0.2rem; }

/* Badges */
.badge-group { position:absolute; top:10px; left:10px; display:flex; gap:5px; z-index: 5; }
.badge {
  padding:0.2rem 0.5rem; border-radius:6px; font-size:0.7rem; font-weight:600;
  color:white; text-transform:uppercase;
}
.badge-featured { background:#f59e0b; }
.badge-verified { background:#10b981; }
.listing-card:hover .badge-group, .listing-card:hover .category-badge {
  transform: translateZ(25px);
}
.verified-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(16, 185, 129, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  color: #6ee7b7;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 5;
}

/* WhatsApp button */
.wa-btn {
  display:inline-block; background:#25D366; color:white; padding:0.4rem 0.8rem;
  border-radius:6px; text-decoration:none; font-size:0.85rem;
  transition:background 0.2s;
}
.wa-btn:hover { background:#128C7E; }
.card-actions { margin-top:0.3rem; }

/* Dashboard specific */
.dashboard-stats { background:#1e293b; padding:0.8rem; border-radius:8px; margin-bottom:1rem; box-shadow:0 2px 6px rgba(0,0,0,0.3); color:#e2e8f0; }
.upgrade-message { background:#7f1d1d; color:#fca5a5; padding:1rem; border-radius:8px; margin-bottom:1rem; border:1px solid #b91c1c; }
.dashboard-form { background:#1e293b; padding:1.5rem; border-radius:12px; box-shadow:0 2px 10px rgba(0,0,0,0.3); margin-bottom:2rem; }
.image-preview { display:flex; gap:0.5rem; margin-top:0.5rem; flex-wrap:wrap; }
.image-preview img { width:70px; height:70px; object-fit:cover; border-radius:8px; }

/* Auth */
.auth-form { max-width:450px; margin:2rem auto; background:#1e293b; padding:2rem; border-radius:12px; box-shadow:0 4px 15px rgba(0,0,0,0.4); }
.auth-form h2 { margin-bottom:1.5rem; color:#10b981; }
.error { color:#f87171; font-size:0.9rem; }
.success { color:#34d399; }

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.cat-pill {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cbd5e1;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}
.cat-pill:hover { background: rgba(255,255,255,0.15); }
.cat-pill.active {
  background: #10b981;
  color: white;
  border-color: #10b981;
  font-weight: 700;
}
.category-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #cbd5e1;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0.2rem 0 0.3rem;
}

/* ================= DETAIL MODAL ================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.modal-content {
  background: #1e293b;
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: #e2e8f0;
}
.modal-close {
  position: absolute;
  top: 0.5rem; right: 1rem;
  font-size: 2rem;
  color: #94a3b8;
  cursor: pointer;
  z-index: 10;
  background: none;
  border: none;
}
.modal-image-slider {
  position: relative;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  font-size: 1.8rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.slider-btn:hover { background: rgba(255,255,255,0.4); }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.dot.active { background: #10b981; }
.modal-body { padding: 1.5rem; }
.modal-body h2 { margin-bottom: 0.5rem; color:#f1f5f9; }
.modal-body .price { font-size: 1.3rem; font-weight: 700; color: #34d399; }
.modal-actions { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.photo-count {
  position: absolute;
  bottom: 5px; right: 5px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

/* ================= TRANSITION OVERLAY (if used) ================= */
.transition-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.hidden { display: none !important; opacity: 0; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fillProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}
@keyframes fadeInSlide {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}