/* ============================================================
   Heimsel – Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0E3D38;
  --primary-light: #1A7A6E;
  --accent: #F45C35;
  --accent-light: #D4F0EC;
  --bg: #F5FAFA;
  --bg-card: #ffffff;
  --text-dark: #0E3D38;
  --text-mid: #2C5F59;
  --text-light: #6B9E99;
  --border: #C0E6E0;
  --success: #38a169;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.14);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
}

/* ---------- Navbar ---------- */
.navbar {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.navbar-logo span {
  color: var(--accent);
}

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

.navbar-links a {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.navbar-links .btn-login {
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius);
  visibility: hidden;
}

.navbar-links .btn-login:hover {
  background: var(--accent-light);
}

.currency-switcher {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 2px;
}

.btn-currency {
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-currency:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-currency.active { background: var(--accent); color: var(--primary); font-weight: 700; }

.phone-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dial-code-select {
  flex: 0 0 auto;
  width: 108px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.phone-number-input {
  flex: 1;
  min-width: 0;
}

.navbar-links .btn-logout {
  margin-left: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.navbar-links .btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

/* ---------- Password requirements checklist ---------- */
.password-rules {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.password-rules li {
  font-size: 0.8rem;
  color: var(--text-light);
  padding-left: 18px;
  position: relative;
}
.password-rules li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--text-light);
}
.password-rules li.rule-ok {
  color: var(--success, #27ae60);
}
.password-rules li.rule-ok::before {
  content: '✓';
  color: var(--success, #27ae60);
}

/* ---------- Register account type selector ---------- */
.register-type-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.register-type-card {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.register-type-card:hover {
  border-color: var(--primary-light);
}
.register-type-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 26,43,96), 0.08);
}
.register-type-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.register-type-label {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.register-type-desc {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.4;
}

/* ---------- Auth tabs (login / register) ---------- */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 6px;
  font-size: 0.85rem;
  color: var(--text-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.auth-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .navbar-logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-section h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-section ul li a:hover {
  color: var(--accent);
}

.footer-section p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 12px rgba(244, 92, 53, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  border: 1px solid #c0392b;
}
.btn-danger:hover {
  background: #c0392b;
}

/* ---------- Photo Manager (agent dashboard) ---------- */
.photo-manager {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 8px;
}

.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-thumb {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.photo-thumb img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 1px solid var(--border);
}

.photo-thumb-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.photo-thumb:hover .photo-thumb-actions {
  opacity: 1;
}

.photo-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 3px 7px;
  line-height: 1;
}

.photo-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.photo-btn-del {
  background: rgba(220, 53, 69, 0.9);
  color: #fff;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-full {
  display: flex;
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

/* ---------- Project Card ---------- */
.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-card-image-placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.project-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card-return {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.project-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.project-card-location-row .project-card-location {
  margin-bottom: 0;
}

.project-card-location {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.project-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-card-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

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

.stat-value.accent {
  color: var(--success);
}

.project-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Badge / Tag ---------- */
.tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.tag.tag-sold {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

/* ---------- Page Header ---------- */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 48px 0 40px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
}

/* ---------- Custom select (desktop: hidden - native select shown) ---------- */
.custom-select-wrapper { display: none; }

/* ---------- Price currency switcher (desktop: hidden) ---------- */
#price-currency-switcher { display: none; }

/* ---------- Mobile filter trigger (desktop: hidden) ---------- */
.mobile-filter-bar    { display: none; }
.mobile-currency-row  { display: none; }
.mobile-filter-header { display: none; }

/* ---------- Filter Bar ---------- */
.filter-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color var(--transition);
}

.filter-group select {
  appearance: none;
  cursor: pointer;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary-light);
}

.filter-group select.filter-active,
.filter-group input.filter-active {
  border-color: var(--primary-light);
  background: #e8f5f3;
}

.btn-price-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.btn-price-filter:hover,
.btn-price-filter.popover-open {
  border-color: var(--primary-light);
}

.btn-price-filter.filter-active {
  border-color: var(--primary-light);
  background: #e8f5f3;
  color: var(--primary);
  font-weight: 600;
}

.price-chevron {
  font-size: 1rem;
  line-height: 1;
  color: var(--text-light);
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-price-filter.popover-open .price-chevron {
  transform: rotate(180deg);
}

.btn-price-filter.filter-active .price-chevron {
  color: var(--primary);
}

.price-filter-group {
  position: relative;
}

.price-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 16px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-popover-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-popover-row label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-popover-row input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color var(--transition);
}

.price-popover-row input:focus {
  outline: none;
  border-color: var(--primary-light);
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--primary-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
}

.country-option {
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
}

.country-option:hover,
.country-option.active {
  background: var(--bg-card);
  color: var(--primary);
}

.location-group-label {
  padding: 6px 14px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

/* ---------- Project Grid ---------- */
.projects-section {
  padding: 40px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.projects-count {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.no-results {
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
}

/* ---------- Forms ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26, 122, 110, 0.2);
}

.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}

.details-section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
}

/* ---------- Hero (Homepage) ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #22A090 100%);
  color: #fff;
  padding: 80px 0 60px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-featured h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-project-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-project-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.hero-project-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(4px);
}

.hero-project-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-project-info p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.hero-project-return {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Section ---------- */
.section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- Project Detail ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 48px 0;
  align-items: start;
}

.detail-gallery {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: var(--radius);
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  font-size: 5rem;
  overflow: hidden;
}

.detail-gallery.gallery-placeholder {
  opacity: 0.5;
}

.detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Thumbnail strip below main gallery image */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  opacity: 0.75;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--primary-light);
  opacity: 1;
}

.detail-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-meta .tag {
  font-size: 0.85rem;
}

.detail-description {
  font-size: 0.98rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 32px;
}

.detail-agent {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.detail-agent h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.agent-info p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 6px;
}

/* ---------- Side Panel ---------- */
.side-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  position: sticky;
  top: 88px;
}

.side-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.investment-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.investment-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.investment-stat-label {
  font-size: 0.85rem;
  color: var(--text-mid);
}

.investment-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.investment-stat-value.highlight {
  color: var(--success);
  font-size: 1.1rem;
}

.property-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.property-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mid);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.property-row {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--bg-card);
}

.property-row:last-child {
  border-bottom: none;
}

.property-label {
  color: var(--text-light);
  min-width: 42%;
  flex-shrink: 0;
}

.property-value {
  color: var(--text-dark);
  font-weight: 500;
}

.property-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.88rem;
  color: var(--text-mid);
}

.property-feature::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.contact-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.contact-panel h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.contact-panel p {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-bottom: 6px;
}

/* ---------- Auth / Login ---------- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px - 160px);
  padding: 48px 24px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  width: 100%;
  max-width: 440px;
}

.auth-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.auth-link a {
  color: var(--primary-light);
  font-weight: 600;
}

/* ---------- Dashboard ---------- */
.dashboard-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.dashboard-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-header p {
  color: var(--text-light);
  margin-top: 4px;
}

.dashboard-section {
  padding: 40px 0;
}

.dashboard-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.empty-state {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  border: 2px dashed var(--border);
}

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

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-light);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 8px;
}

/* ---------- Alert ---------- */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert-info {
  background: rgba(26, 122, 110, 0.08);
  border: 1px solid rgba(26, 122, 110, 0.2);
  color: var(--primary-light);
}

/* ---------- About / Content Page ---------- */
.content-page {
  padding: 64px 0;
}

.content-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.content-page .lead {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 40px;
  max-width: 660px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.content-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.content-block p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 64px 0;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-info p {
  color: var(--text-mid);
  font-size: 0.98rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-detail {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contact-detail-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  min-width: 60px;
}

.contact-detail-value {
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* ---------- Loading State ---------- */
.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-light);
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

/* ---------- Utility ---------- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.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; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner,
  .detail-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-featured {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hamburger button (hidden on desktop) ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .hamburger {
    display: flex;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 12px 16px 20px;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 99;
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-links a,
  .navbar-links .btn-logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    margin: 0;
  }

  .navbar-links .btn-login {
    display: block;
    width: 100%;
    text-align: center;
    visibility: visible;
  }

  .navbar-links .btn-logout {
    margin-left: 0;
    border: none;
    font: inherit;
  }

  .navbar-links .currency-switcher-li {
    display: none;
  }

  .container {
    padding: 0 32px;
  }

  /* Custom select - mobile */
  .form-group select:not(.dial-code-select),
  .status-select {
    display: none;
  }

  .custom-select-wrapper {
    display: block;
    position: relative;
    width: 100%;
  }

  .custom-select-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
  }

  .custom-select-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    color: var(--text-light);
    transition: transform 0.2s;
  }

  .custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
  }

  .custom-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 300;
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--primary-light);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
  }

  .custom-select-wrapper.open .custom-select-dropdown {
    display: block;
  }

  .custom-select-option {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
  }

  .custom-select-option:hover,
  .custom-select-option.selected {
    background: var(--accent-light);
    color: var(--primary);
  }

  .hero {
    padding: 48px 0 36px;
  }

  .hero-content h1 {
    font-size: 1.9rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 28px;
    padding-top: 20px;
  }

  .hero-featured {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .dashboard-header h1 {
    font-size: 1.4rem;
  }

  .dashboard-project-row {
    gap: 6px;
    padding: 14px 16px;
  }

  .dashboard-project-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .dashboard-project-actions .btn,
  .dashboard-project-actions .status-select,
  .dashboard-project-actions .save-status-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .dashboard-project-actions .delete-btn {
    margin-left: 0 !important;
  }

  .about-cta {
    padding: 32px 20px !important;
    margin-top: 40px !important;
  }

  .content-page {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .content-page h1 {
    font-size: 1.6rem;
  }

  .content-page .lead {
    font-size: 1rem;
  }

  .card {
    padding: 24px 16px;
  }

  .properties-layout {
    grid-template-columns: 1fr;
  }

  /* Mobile filter trigger */
  .mobile-filter-bar {
    display: flex;
    padding: 10px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
  }

  .btn-mobile-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-filter-count {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 7px;
  }

  /* Filter section: hidden by default, fixed dropdown when open */
  .filter-section {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 150;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  .filter-section.mobile-open {
    display: block;
  }

  /* Stack all filters vertically */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .filter-group,
  .price-filter-group {
    width: 100%;
    min-width: unset;
  }

  /* Hide popover trigger buttons; show inputs directly */
  .price-filter-group .btn-price-filter {
    display: none;
  }

  .price-filter-group .price-popover {
    position: static !important;
    display: flex !important;
    box-shadow: none;
    min-width: unset;
    width: 100%;
  }

  /* Filter panel close header */
  .mobile-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .btn-mobile-filter-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
  }

  /* Mobile currency row */
  .mobile-currency-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-currency-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
  }

  /* Price currency switcher */
  #price-currency-switcher {
    display: block;
    align-self: flex-start;
    margin-bottom: 8px;
  }

  #price-currency-switcher .currency-switcher {
    border-color: var(--border);
    background: var(--bg);
  }

  #price-currency-switcher .btn-currency {
    color: var(--text-mid);
  }

  #price-currency-switcher .btn-currency:hover {
    background: var(--accent-light);
    color: var(--primary);
  }

  #price-currency-switcher .btn-currency.active {
    background: var(--primary);
    color: #fff;
  }

  /* Fix currency buttons on white background */
  .mobile-currency-row .currency-switcher {
    border-color: var(--border);
    background: var(--bg);
  }

  .mobile-currency-row .btn-currency {
    color: var(--text-mid);
  }

  .mobile-currency-row .btn-currency:hover {
    background: var(--accent-light);
    color: var(--primary);
  }

  .mobile-currency-row .btn-currency.active {
    background: var(--primary);
    color: #fff;
  }

  /* Darken filter labels */
  .price-popover-row label {
    color: var(--primary);
  }

  .map-panel {
    height: 300px;
  }
}

/* ---------- Save button ---------- */
.btn-save {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-mid);
  font-family: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1.4;
  white-space: nowrap;
}

.btn-save:hover,
.btn-save[data-saved="true"] {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Dashboard project rows (agent) ---------- */
.dashboard-project-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-project-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-project-title {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.dashboard-project-title:hover {
  text-decoration: underline;
}

.dashboard-project-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--bg-card);
  color: var(--text-dark);
  font-family: inherit;
}

/* ---------- Dashboard interest rows ---------- */
.dashboard-interest-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.dashboard-interest-row:last-child {
  margin-bottom: 0;
}

/* ---------- Phase 5: Discovery & Trust ---------- */

/* Verified developer badge */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e6f4f1;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--primary-light);
  vertical-align: middle;
}

/* Investment disclaimer box */
.disclaimer-box {
  background: #fff8f0;
  border: 1px solid #f4d0b0;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 20px;
}
.disclaimer-box strong { color: var(--text-dark); }
.disclaimer-box a { color: var(--accent); }

/* Map containers */
.map-section { padding: 32px 0 0; }
#project-map {
  height: 380px;
  border-radius: 12px;
  z-index: 0;
}
#detail-map {
  height: 220px;
  border-radius: 10px;
  margin-top: 16px;
  z-index: 0;
}

/* Legal page */
.legal-section {
  margin-bottom: 36px;
}
.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}
.legal-section p {
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 10px;
}
