/* =====================================================================
   ElchRent — light rental-portal design (Nov 28, 2026 design pass).
   Register: ImmoScout24 / Rentola — bright, clean, trustworthy.
   Palette: warm off-white page, white cards, deep pine brand,
   warm sand accent for the city badge. No dark surfaces, no flags —
   city/language markers are plain text.
   ===================================================================== */
:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #1e2b25;
  --muted: #5f6f68;
  --line: #e1e8e1;
  --brand: #14665a;
  --brand-dark: #0d4d43;
  --brand-tint: #e7f2ee;
  --sand: #faf0dc;
  --sand-ink: #7c5410;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 32, 0.05), 0 10px 30px rgba(20, 40, 32, 0.06);
  --shadow-lift: 0 2px 4px rgba(20, 40, 32, 0.06), 0 16px 40px rgba(20, 40, 32, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

/* --- Header: white bar, pine wordmark, quiet links ----------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(20, 40, 32, 0.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}
.brand strong { font-weight: 800; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--brand); text-decoration: underline; }
.auth-status { font-size: 0.92rem; color: var(--muted); }
.auth-status button { margin-left: 8px; padding: 6px 12px; font-size: 0.88rem; }

/* --- City bar: the five doors as friendly pills --------------------- */
.city-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.city-bar-label { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.city-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.city-nav a {
  padding: 7px 16px;
  border-radius: 999px;
  background: #eef1ee;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.city-nav a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.city-nav a.active { background: var(--brand); color: #fff; }

/* --- Layout & cards -------------------------------------------------- */
.container {
  max-width: 1060px;
  margin: 28px auto 48px;
  padding: 0 20px;
  display: grid;
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 1.25rem; }

/* Hero: soft pine-tinted band — the first thing a visitor sees. */
.city-hero {
  background: linear-gradient(120deg, var(--brand-tint), #f4faf7);
  border-color: #cfe4db;
  padding: 34px 30px;
}
.city-hero h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}
.city-hero .muted { margin: 0; font-size: 1rem; }

/* --- Forms & controls ------------------------------------------------ */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.form-grid { display: grid; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

input, select, textarea, button {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 102, 90, 0.18);
}
button {
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}
button:hover { background: var(--brand-dark); }
.checkbox-inline { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.checkbox-inline input { padding: 0; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.92rem; margin-top: -6px; }
.msg { min-height: 20px; font-size: 0.9rem; margin: 8px 0 0; color: var(--brand-dark); }
.notice {
  margin-top: 10px;
  padding: 12px 14px;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 10px;
}

/* --- Listing cards ---------------------------------------------------- */
.posts-grid { display: grid; gap: 14px; }
.post-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.post-card h3 { margin: 6px 0 4px; font-size: 1.12rem; }
.post-card p { margin: 4px 0; color: #33463c; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 6px;
  background: #eef1ee;
  color: #44534c;
}
.badge-offer { background: #dcfce7; color: #166534; }
.badge-seeking { background: #e2ecfd; color: #1e40af; }
.badge-city { background: var(--sand); color: var(--sand-ink); }
.price { font-weight: 800; font-size: 1.3rem; color: var(--brand-dark); margin: 8px 0 2px; }

@media (max-width: 640px) {
  .topbar, .city-bar { padding-left: 16px; padding-right: 16px; }
  .card { padding: 20px; }
  .city-hero { padding: 26px 22px; }
  .city-hero h1 { font-size: 1.55rem; }
}
