/* ═══════════════════════════════════════════════════════════════
   Local Dhaka — Global Stylesheet
   "Ask The Locals" — A hyper-local community for Dhaka, Bangladesh
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --color-primary: #16A34A;
  --color-primary-hover: #15803d;
  --color-primary-light: #DCFCE7;
  --color-primary-lighter: #F0FDF4;
  --color-dark: #111827;
  --color-text: #1a1a1a;
  --color-muted: #6B7280;
  --color-muted-light: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  --color-bg: #F9FAFB;
  --color-white: #FFFFFF;
  --color-danger: #EF4444;
  --color-danger-light: #FEE2E2;
  --color-gold: #F59E0B;
  --color-gold-light: #FEF3C7;
  --color-blue: #3B82F6;
  --color-blue-light: #DBEAFE;
  --color-purple: #8B5CF6;
  --color-purple-light: #EDE9FE;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-bangla: 'Hind Siliguri', sans-serif;

  --navbar-height: 64px;
  --mobile-nav-height: 64px;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

ul, ol { list-style: none; }

.bangla { font-family: var(--font-bangla); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-xs);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
}

.navbar-brand i { font-size: 1.15rem; color: var(--color-primary); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

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

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#navbar-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.navbar-hamburger:hover { background: var(--color-bg); }

.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 2px rgba(22,163,74,0.3);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-dark);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-muted-light);
}

.btn-ghost {
  color: var(--color-muted);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--color-dark); background: var(--color-bg); }

.btn-danger {
  background: var(--color-danger);
  color: white;
}
.btn-danger:hover {
  background: #DC2626;
  color: white;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; min-height: 52px; }

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Form Elements ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.form-label-sub {
  font-weight: 400;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-danger);
  margin-top: 4px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-muted);
}
.char-count.warning { color: var(--color-gold); }
.char-count.danger { color: var(--color-danger); }

/* ── Location Verification ───────────────────────────────────── */
.location-verify-box {
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.location-verify-box.verified {
  border-color: var(--color-primary);
  border-style: solid;
  background: var(--color-primary-light);
}

.location-verify-box.not-verified {
  border-color: var(--color-danger);
}

.location-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.location-verify-box.verified .location-status {
  color: var(--color-primary);
}

/* ── Tags / Chips ─────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.tag-sm { padding: 2px 8px; font-size: 0.75rem; }

.tag-selected {
  background: var(--color-primary);
  color: white;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Neighbourhood Badge ──────────────────────────────────────── */
.neighbourhood-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-blue-light);
  color: var(--color-blue);
}

/* ── Post Cards ───────────────────────────────────────────────── */
.post-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  border: 1px solid var(--color-border-light);
}

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

.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-author-info { flex: 1; min-width: 0; }

.post-card-author {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-card-type {
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.type-question { background: var(--color-purple-light); color: var(--color-purple); }
.type-discussion { background: var(--color-blue-light); color: var(--color-blue); }
.type-price_check { background: var(--color-gold-light); color: var(--color-gold); }
.type-hidden_gem { background: var(--color-primary-light); color: var(--color-primary); }

.post-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.post-card-title a { color: var(--color-dark); }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-body {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.post-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.post-stat-icon { font-size: 1rem; }

/* ── Vote Button ──────────────────────────────────────────────── */
.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-muted);
}

.vote-btn:hover { background: var(--color-primary-lighter); color: var(--color-primary); }
.vote-btn.voted { color: var(--color-primary); background: var(--color-primary-light); }

.vote-btn .arrow {
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.vote-btn:hover .arrow { transform: scale(1.2); }

.vote-btn .count {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Verified Badge ───────────────────────────────────────────── */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--color-primary);
  font-weight: 500;
}



/* ── Hero Banner ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #059669 50%, #047857 100%);
  color: white;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 4px;
  font-family: var(--font-bangla);
  position: relative;
  z-index: 1;
}

.hero-subtitle-en {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero .btn {
  position: relative;
  z-index: 1;
  background: white;
  color: var(--color-primary);
  font-weight: 600;
}
.hero .btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
  transform: translateY(-2px);
}

/* ── Layout: Feed Page ────────────────────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 80px;
}

.page-content { min-width: 0; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--navbar-height) + 24px);
  height: fit-content;
  max-height: calc(100vh - var(--navbar-height) - 48px);
  overflow-y: auto;
}

.sidebar-section {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  border: 1px solid var(--color-border-light);
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.sidebar-list a:hover,
.sidebar-list a.active {
  background: var(--color-primary-lighter);
  color: var(--color-primary);
}

/* ── Filter Tabs ──────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow-x: auto;
  border: 1px solid var(--color-border-light);
}

.filter-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  background: none;
  border: none;
}

.filter-tab:hover { color: var(--color-dark); background: var(--color-bg); }
.filter-tab.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(22,163,74,0.3);
}

/* ── Trending Horizontal Scroll ───────────────────────────────── */
.trending-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.trending-scroll::-webkit-scrollbar { height: 4px; }
.trending-scroll::-webkit-scrollbar-track { background: transparent; }
.trending-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 10px; }

.trending-card {
  min-width: 260px;
  max-width: 300px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
  transition: box-shadow 0.2s ease;
}
.trending-card:hover { box-shadow: var(--shadow-md); }

.trending-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.trending-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* ── Feed Posts List ──────────────────────────────────────────── */
.feed-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Top Contributors List ────────────────────────────────────── */
.contributor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.contributor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-primary);
  overflow: hidden;
  flex-shrink: 0;
}

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

.contributor-info { flex: 1; min-width: 0; }

.contributor-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contributor-points {
  font-size: 0.7rem;
  color: var(--color-muted);
}

/* ── Single Post Page ─────────────────────────────────────────── */
.single-post {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--color-border-light);
}

.single-post-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.single-post-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.single-post-content {
  flex: 1;
  min-width: 0;
}

.single-post-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.single-post-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 16px;
}

.single-post-body p { margin-bottom: 12px; }

.single-post-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.single-post-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
  flex-wrap: wrap;
}

.share-whatsapp {
  background: #25D366;
  color: white;
}
.share-whatsapp:hover { background: #1DA851; color: white; }

/* ── Answers Section ──────────────────────────────────────────── */
.answers-section {
  margin-top: 24px;
}

.answers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.answers-count {
  font-size: 1.1rem;
  font-weight: 600;
}

.answer-sort {
  display: flex;
  gap: 4px;
}

.answer-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border: 1px solid var(--color-border-light);
  transition: box-shadow 0.2s ease;
}

.answer-card.best-answer {
  border-color: var(--color-primary);
  background: var(--color-primary-lighter);
}

.best-answer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.answer-body {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 12px 0;
}

.answer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

/* ── Answer Composer ──────────────────────────────────────────── */
.answer-composer {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.answer-composer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── Map Page ─────────────────────────────────────────────────── */
.map-container {
  display: flex;
  height: calc(100vh - var(--navbar-height));
}

.map-sidebar {
  width: 340px;
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 20px;
  flex-shrink: 0;
}

.map-sidebar-header {
  margin-bottom: 20px;
}

.map-sidebar-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.map-filter-btn {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  background: var(--color-bg);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.map-filter-btn:hover,
.map-filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

#map {
  flex: 1;
  min-height: 400px;
}

/* ── Profile Page ─────────────────────────────────────────────── */
.profile-header {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--color-border-light);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  overflow: hidden;
  flex-shrink: 0;
}

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

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-username {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.profile-bio {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.profile-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.profile-stat {
  text-align: center;
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Auth Page ────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: 24px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-xs);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  border: none;
}

.auth-tab.active {
  background: var(--color-white);
  color: var(--color-dark);
  box-shadow: var(--shadow-xs);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--color-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── Neighbourhood Page ───────────────────────────────────────── */
.neighbourhood-header {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--color-border-light);
}

.neighbourhood-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.neighbourhood-desc {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.neighbourhood-stats {
  display: flex;
  gap: 24px;
}

.neighbourhood-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.neighbourhood-stat strong {
  color: var(--color-dark);
}

#neighbourhood-mini-map {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

/* ── Explore / Tags Grid ──────────────────────────────────────── */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.explore-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.explore-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.explore-card-emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.explore-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 2px;
}

.explore-card-name-bn {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-family: var(--font-bangla);
  margin-bottom: 8px;
}

.explore-card-count {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* ── Post Type Toggle (Ask Page) ──────────────────────────────── */
.post-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-type-btn {
  flex: 1;
  min-width: 130px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  transition: all 0.2s ease;
}

.post-type-btn:hover {
  border-color: var(--color-primary);
}

.post-type-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-lighter);
}

.post-type-btn-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  line-height: 1;
}

.post-type-btn-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-dark);
}

/* ── Image URL Preview ────────────────────────────────────────── */
.image-preview-container {
  margin-top: 8px;
}

.image-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.image-preview-placeholder {
  width: 100%;
  height: 120px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-dark);
}

/* ── Loading Spinner ──────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-muted);
}

.loading-state .spinner {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state-text {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ── Toast Notification ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--color-dark);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast.success { background: var(--color-primary); }
.toast.error { background: var(--color-danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ── Mobile Bottom Nav ────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  height: var(--mobile-nav-height);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  overflow: visible;
}

.mobile-nav-items {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: stretch;
  overflow: visible;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-muted);
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
  padding: 0 2px;
}

.mobile-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--color-primary);
}

.mobile-nav-item i {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Ask (centre) button — floats above the bar */
.mobile-nav-ask {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  gap: 2px;
  color: var(--color-muted);
  font-size: 0.6rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  overflow: visible;
}

.mobile-nav-ask:hover { color: var(--color-primary); }

.mobile-nav-ask-btn {
  position: absolute;
  top: -18px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(22,163,74,0.5);
  border: 3px solid var(--color-white);
}

/* ── Price Check Card ─────────────────────────────────────────── */
.price-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.price-card-item {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.price-card-range {
  font-size: 1.2rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.price-card-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ── Page Title ───────────────────────────────────────────────── */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 24px;
  font-family: var(--font-bangla);
}

/* ── Search Bar ───────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: 0.95rem;
}

.search-bar input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.search-bar-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ── Load More ────────────────────────────────────────────────── */
.load-more {
  text-align: center;
  padding: 24px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
  .sidebar-right { display: none; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-hamburger { display: block; }
  #navbar-auth { display: none; }

  .mobile-nav { display: flex; }

  body { padding-bottom: var(--mobile-nav-height); }

  .filter-tabs { gap: 2px; padding: 3px; }
  .filter-tab { padding: 8px 12px; font-size: 0.8rem; min-height: 38px; }

  .hero {
    padding: 32px 16px;
    border-radius: var(--radius-md);
  }
  .hero-title { font-size: 1.5rem; }

  .post-card { padding: 16px; }
  .single-post { padding: 16px; }

  .profile-top {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-container {
    flex-direction: column;
    height: auto;
  }

  .map-sidebar {
    width: 100%;
    max-height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  #map { height: calc(100vh - var(--navbar-height) - 260px); }

  .post-type-toggle { gap: 4px; }
  .post-type-btn { padding: 10px 8px; min-width: 0; }

  .modal { padding: 20px; }

  .auth-card { padding: 24px; }

  .explore-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .explore-card { padding: 14px; }
  .explore-card-emoji { font-size: 2rem; }

  .neighbourhood-header { padding: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .post-card-title { font-size: 1rem; }
  .single-post-title { font-size: 1.2rem; }
  .hero-title { font-size: 1.25rem; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile Sidebar Overlay ───────────────────────────────────── */
.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  top: var(--navbar-height);
  z-index: 999;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--color-white);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.mobile-sidebar-overlay.active .mobile-sidebar {
  transform: translateX(0);
}

.mobile-sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-dark);
}

.mobile-sidebar-user:hover {
  background: var(--color-primary-lighter);
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: var(--mobile-nav-height);
}

@media (min-width: 769px) {
  .site-footer { margin-bottom: 0; }
}

.site-footer p {
  margin: 0;
  line-height: 1.6;
}

.footer-advisor {
  color: var(--color-muted-light);
  font-size: 0.8rem;
  margin-top: 4px !important;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* ── Utility Classes ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }
