/* ===== Persian font (see README for why this specific font was chosen) ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ===== Basic reset and layout ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
}

body {
  font-family: 'Noto Naskh Arabic', Tahoma, Arial, sans-serif;
  background-color: #f7f7f8;
  color: #1a1a1a;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
}

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

/* ===== Header / nav ===== */
header {
  background-color: #1a3c5e;
  color: white;
  padding: 16px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

header h1 {
  font-size: 22px;
}

header nav a {
  color: white;
  text-decoration: none;
  margin-right: 20px;
  font-size: 15px;
}

header nav a:hover {
  text-decoration: underline;
}

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

/* ===== Auth / login ===== */
#authStatus {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-btn {
  background: transparent;
  border: 1px solid white;
  color: white;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.15);
}

.login-required-notice {
  background: #fff8e6;
  border: 1px solid #f0d98c;
  color: #7a5c00;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== Search bar ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.search-bar input[type="text"],
.search-bar select {
  padding: 10px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1;
  min-width: 150px;
}

.search-bar button {
  padding: 10px 20px;
  background-color: #1a3c5e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}

.search-bar button:hover {
  background-color: #14304a;
}

/* ===== Listing cards ===== */
.listing-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
}

.listing-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #1a3c5e;
}

.listing-card .meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}

.listing-card .price {
  font-weight: bold;
  color: #1a7a3c;
  font-size: 16px;
  margin-bottom: 8px;
}

.listing-card .description {
  font-size: 15px;
  margin-bottom: 10px;
}

.listing-card .contact {
  font-size: 14px;
  background: #f0f4f8;
  padding: 8px;
  border-radius: 6px;
  display: inline-block;
}

.empty-state {
  text-align: center;
  color: #888;
  padding: 40px 0;
}

/* ===== Forms ===== */
.form-box {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}

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

.form-hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.submit-btn {
  background-color: #1a7a3c;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: #145c2d;
}

.message-box {
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: none;
}

.message-box.success {
  background-color: #e3f5e9;
  color: #1a7a3c;
  border: 1px solid #b6e6c4;
}

.message-box.error {
  background-color: #fdeaea;
  color: #b02a2a;
  border: 1px solid #f3b6b6;
}

/* ===== Valuation calculator ===== */
.valuation-result {
  margin-top: 24px;
  padding: 20px;
  background: #f0f4f8;
  border-radius: 8px;
  display: none;
}

.valuation-result h3 {
  color: #1a3c5e;
  margin-bottom: 10px;
}

.valuation-range {
  font-size: 24px;
  font-weight: bold;
  color: #1a7a3c;
  margin: 10px 0;
}

.valuation-note {
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

footer {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 13px;
}
