/* ============================
   EuroKV — Global Styles
   ============================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:     #0f2a45;
  --navy-mid: #1a3a5c;
  --blue:     #1e5a9c;
  --blue-lt:  #2d6a9f;
  --gold:     #c9973e;
  --gold-lt:  #f0b84a;
  --white:    #ffffff;
  --off-white:#f8f9fc;
  --gray-100: #f1f3f8;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #64748b;
  --gray-800: #1e293b;
  --green:    #16a34a;
  --purple:   #7c3aed;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.15);

  --header-h: 50px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html { height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background-color: #c8cfd8;
  background-image: url("map-bw.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  line-height: 1.6;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* The only scroll container. Body is a fixed-height flex column (header above,
   #app fills the rest), so the document itself never scrolls and the mobile
   browser address bar stays visible — same layout as fare.ee. */
#app {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Custom pull-to-refresh indicator */
#ptr {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1200;
  transform: translateY(-100%);
  transition: transform .2s ease;
}
#ptr.dragging { transition: none; }
#ptr-spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .15s;
}
#ptr.visible #ptr-spinner { opacity: 1; }
#ptr.ready #ptr-spinner { border-top-color: var(--green); }
#ptr.refreshing #ptr-spinner { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
img { max-width: 100%; }
input, select, textarea {
  font-family: var(--font);
  font-size: .9rem;
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color .2s;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--gray-600); margin-bottom: .3rem; margin-top: .9rem; text-transform: uppercase; letter-spacing: .05em; }
label:first-child { margin-top: 0; }

.hidden { display: none !important; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
#featuredSection, #homeResultsSection { padding-top: 1.5rem; }
.bg-light { background: var(--off-white); }

/* ============================
   BUTTONS
   ============================ */
.btn-primary {
  background: var(--blue);
  color: var(--white);
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s, transform .1s, box-shadow .2s;
  display: inline-block;
  border: 2px solid transparent;
}
.btn-primary:hover { background: var(--navy-mid); box-shadow: 0 4px 16px rgba(30,90,156,.3); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.btn-outline:hover { background: var(--blue); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--gray-800);
  padding: .7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .9rem;
  transition: background .2s;
}
.btn-ghost:hover { background: var(--gray-100); }
.btn-ghost-sm { padding: .4rem .8rem; font-size: .82rem; }

/* ── User menu (logged-in state) ── */
.user-menu {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.user-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Form feedback messages ── */
.form-message {
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .86rem;
  font-weight: 500;
  margin-bottom: .5rem;
}
.form-message.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.form-message.success { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

.btn-white {
  background: var(--white);
  color: var(--navy);
  padding: .8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  transition: all .2s;
  border: 2px solid transparent;
}
.btn-white:hover { background: var(--off-white); transform: translateY(-1px); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
  padding: .8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s;
}
.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

.btn-primary.full, .btn-outline.full, .btn-ghost.full { width: 100%; text-align: center; }
.btn-primary.sm, .btn-outline.sm { padding: .45rem 1rem; font-size: .8rem; }

/* ============================
   HEADER
   ============================ */
#siteHeader {
  position: relative;
  flex-shrink: 0;
  z-index: 1000;
  padding: 5px 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(30,90,156,.3);
}
.logo-mark.sm { width: 32px; height: 32px; }
.logo-e { color: var(--gold-lt); font-size: 1.3rem; font-weight: 800; font-family: var(--font-display); }
.logo-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.logo-euro { font-size: 1.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.logo-kv   { font-size: 1.4rem; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.logo-euro, .logo-kv { display: inline; }
.logo-text small { font-size: .5rem; color: var(--gray-400); letter-spacing: .08em; text-transform: uppercase; margin-top: .1rem; }

.main-nav {
  display: flex;
  gap: .2rem;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .9rem;
  color: var(--gray-600);
  transition: all .2s;
}
.main-nav a:hover { color: var(--blue); background: var(--gray-100); }
.main-nav a.nav-active { color: var(--blue); background: var(--gray-100); font-weight: 700; }

.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  transition: all .2s;
}
.lang-btn:hover { border-color: var(--blue); color: var(--blue); }
.lang-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  max-height: 320px;
  min-width: 160px;
  z-index: 1100;
}
.lang-menu button {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  text-align: left;
  font-size: .88rem;
  color: var(--gray-800);
  transition: background .15s;
}
.lang-menu button:hover { background: var(--gray-100); }

/* Account dropdown */
.account-menu { position: relative; }
.account-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  font-size: .88rem;
  transition: border-color .2s, color .2s;
}
.account-btn:hover { border-color: var(--blue); color: var(--blue); }
.account-btn #accountName {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-panel {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  width: 240px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .45rem;
  z-index: 1100;
}
.account-user {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: .35rem;
}
.account-user-name,
.account-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-user-name { font-weight: 700; color: var(--navy); }
.account-user-email { font-size: .78rem; color: var(--gray-600); }
.account-lang {
  position: relative;
  padding: 0 .35rem .5rem;
  margin-bottom: .35rem;
  border-bottom: 1px solid var(--gray-100);
}
.account-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-600);
  margin-bottom: .3rem;
}
.account-lang select { width: 100%; padding: .5rem .6rem; font-size: .84rem; }

/* Language dropdown (hamburger-style, avoids the native full-screen picker) */
.account-lang-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  padding: .55rem .7rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-800);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
.account-lang-toggle:hover { border-color: var(--blue); color: var(--blue); }
.account-lang-list {
  position: absolute;
  top: calc(100% + .25rem);
  left: .35rem;
  right: .35rem;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 20;
}
.account-lang-list .account-item { border-radius: 0; }
.lang-flag {
  width: 20px;
  height: 15px;
  margin-right: .45rem;
  vertical-align: -2px;
  border-radius: 2px;
  object-fit: cover;
}
.account-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .6rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  transition: background .15s;
}
.account-item:hover { background: var(--gray-100); }
.account-logout { color: #b91c1c; }
.account-logout:hover { background: #fef2f2; }

/* Hamburger — the single menu button, shown at every width */
.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: .5rem;
  height: 40px;
  border-radius: var(--radius-sm);
}

/* Add Listing button height */
#btnAddListing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header menu — a dropdown that hugs its content, right-aligned under the button */
.mobile-nav {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  position: absolute;
  top: calc(100% + .4rem);
  left: auto;
  right: max(1rem, calc((100% - 1200px) / 2 + 1.5rem));
  width: max-content;
  min-width: 220px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - var(--header-h) - 1rem);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.mobile-nav a {
  display: block;
  padding: .75rem .5rem;
  font-weight: 500;
  font-size: .95rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--blue); }
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}
.mobile-user {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.mobile-user .user-name {
  max-width: none;
  text-align: center;
}

/* Account block inside the mobile hamburger menu */
.mobile-account {
  display: flex;
  flex-direction: column;
  padding-top: .75rem;
}
.mobile-account .account-user {
  border-bottom: none;
  padding: .5rem .5rem .75rem;
  margin-bottom: 0;
}
.mobile-account .account-lang {
  padding: 0 .5rem .75rem;
  margin-bottom: .25rem;
  border-bottom: 1px solid var(--gray-100);
}
.mobile-account .account-item {
  padding: .75rem .5rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: .95rem;
}

/* ============================
   HERO
   ============================ */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  overflow: visible;
  background: rgba(255,255,255,0.82);
}

.hero-bg { display: none; }
.hero-overlay { display: none; }
.hero-shapes { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 1.5rem;
  padding-bottom: 0;
  max-width: 1200px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--gold-lt);
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  font-weight: 700;
}
.hero-title em {
  font-style: normal;
  color: var(--gold-lt);
  position: relative;
}
.hero-title em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0; right: 0;
  height: 3px;
  background: var(--gold-lt);
  opacity: .4;
  border-radius: 2px;
}

.hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

/* Search Box */
.search-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  margin-bottom: 0;
  max-width: none;
}
.search-tabs {
  display: flex;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.search-inputs {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: visible;
}
.search-tab {
  flex: 1;
  padding: .75rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--gray-600);
  transition: all .2s;
  border-bottom: 3px solid transparent;
}
.search-tab.active {
  color: var(--blue);
  background: var(--white);
  border-bottom-color: var(--blue);
}
.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  padding: .5rem .9rem;
  border-right: 1px solid var(--gray-200);
  gap: .5rem;
  min-width: 0;
}
.search-field input, .search-field select {
  border: none;
  padding: .4rem 0;
  font-size: .92rem;
  background: transparent;
  flex: 1;
  min-width: 0;
}
/* Desktop widths: property type 1/5, address 3/5, price 1/5 (of the field
   area; the Search button keeps its own width). */
@media (min-width: 769px) {
  .search-inputs > .sf-proptype { flex: 1; }
  .search-inputs > .sf-location { flex: 3; }
  .search-inputs > .sf-price    { flex: 1; }
}
.search-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gray-400);
}
/* Hide spin buttons on hero price input */
#searchPrice::-webkit-outer-spin-button,
#searchPrice::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#searchPrice { -moz-appearance: textfield; }

/* Custom address autocomplete dropdown */
.ac-wrap { position: relative; }
.custom-ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 9999;
  max-height: 220px;
  overflow-y: auto;
}
.custom-ac-dropdown.hidden { display: none; }
.custom-ac-item {
  padding: .55rem 1rem;
  font-size: .9rem;
  cursor: pointer;
  color: var(--gray-800);
}
.custom-ac-item:hover, .custom-ac-item.active {
  background: var(--gray-100);
  color: var(--blue);
}
.btn-search {
  background: var(--blue);
  color: var(--white);
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: background .2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-search:hover { background: var(--navy-mid); }
/* Advanced search button is only shown on mobile (a second action under the fields) */
.btn-advanced { display: none; }

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.stat span {
  font-size: .78rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stat-sep {
  width: 1px;
  height: 40px;
  background: var(--gray-300);
}

/* ============================
   SECTION HEADERS
   ============================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-header.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  font-weight: 700;
}
.section-header p {
  color: var(--gray-600);
  margin-top: .4rem;
}
.view-all {
  color: var(--blue);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  transition: color .2s;
}
.view-all:hover { color: var(--navy); }

/* ============================
   FILTER PILLS
   ============================ */
.filter-pills {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.pill {
  padding: .45rem 1rem;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  transition: all .2s;
  background: var(--white);
}
.pill:hover { border-color: var(--blue); color: var(--blue); }
.pill.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pill.sm { padding: .3rem .7rem; font-size: .8rem; }

/* ============================
   PROPERTY CARDS
   ============================ */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.property-grid.list-view {
  grid-template-columns: 1fr;
}
.property-grid.list-view .prop-card {
  display: flex;
  flex-direction: row;
}
.property-grid.list-view .prop-img {
  width: 260px;
  min-width: 260px;
  height: auto;
  border-radius: var(--radius) 0 0 var(--radius);
}
.property-grid.list-view .prop-body {
  flex: 1;
}

.prop-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
}
.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.prop-img {
  height: 210px;
  background: linear-gradient(135deg, var(--navy-mid), var(--blue-lt));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.prop-img-inner {
  font-size: 4.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}
.prop-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .3rem .75rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-sale   { background: var(--blue);  color: #fff; }
.badge-rent   { background: var(--green); color: #fff; }
.badge-new    { background: var(--gold);  color: #fff; }

.prop-fav {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.prop-fav:hover { background: var(--white); transform: scale(1.1); }
.prop-fav.active { color: #e11d48; background: var(--white); }
.prop-fav.active:hover { transform: scale(1.15); }

.prop-body { padding: 1.1rem; }
.prop-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .3rem;
}
.prop-price small {
  font-size: .75rem;
  font-weight: 500;
  color: var(--gray-400);
}
.prop-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-location {
  font-size: .82rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .9rem;
}

.prop-meta {
  display: flex;
  gap: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--gray-100);
}
.prop-meta-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: var(--gray-600);
}
.meta-ico { font-size: .95rem; }

.prop-agent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--gray-100);
}
.agent-mini {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--gray-600);
}
.agent-mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: var(--gray-600);
}
.prop-contact-btn {
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue);
  padding: .3rem .7rem;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.prop-contact-btn:hover { background: var(--blue); color: var(--white); }

/* ============================
   COUNTRIES GRID
   ============================ */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.country-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.country-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.country-card.featured {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(30,90,156,.04), rgba(30,90,156,.01));
}
.country-flag { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.country-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .3rem;
}
.country-card p { color: var(--blue); font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.country-cities { font-size: .8rem; color: var(--gray-400); }
.country-badge {
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--gold);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem 2.5rem;
  transform: rotate(30deg);
}

/* ============================
   WHY SECTION
   ============================ */
.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.why-text .section-label {
  display: inline-block;
  background: rgba(30,90,156,.1);
  color: var(--blue);
  padding: .3rem .9rem;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
}
.why-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 1rem;
}
.why-text > p {
  color: var(--gray-600);
  margin-bottom: 2rem;
}
.why-features {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.why-feat {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.feat-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.why-feat h4 { font-size: .92rem; font-weight: 700; color: var(--navy); margin-bottom: .1rem; }
.why-feat p  { font-size: .84rem; color: var(--gray-600); }

.why-visual {
  position: relative;
  height: 380px;
}
.visual-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 220px;
}
.vc1 { top: 0; left: 20px; }
.vc2 { top: 120px; right: 0; }
.vc-img {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vc-info { padding: .8rem; }
.vc-info strong { display: block; font-size: .9rem; font-weight: 700; color: var(--navy); }
.vc-info span   { font-size: .8rem; color: var(--gray-600); }

.stat-float {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: var(--navy);
  color: var(--white);
  padding: .9rem 1.3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.stat-float strong { font-size: 1.2rem; font-weight: 800; color: var(--gold-lt); }
.stat-float span   { font-size: .75rem; color: rgba(255,255,255,.7); }

/* ============================
   AGENTS SECTION
   ============================ */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.agent-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all .25s;
  position: relative;
}
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.agent-card.featured-agent { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,90,156,.1); }

.agent-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .9rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.agent-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 auto 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.agent-card h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: .25rem; }
.agent-country { font-size: .82rem; color: var(--gray-600); display: block; margin-bottom: .4rem; }
.agent-listings { font-size: .82rem; color: var(--gray-600); margin-bottom: .4rem; }
.agent-listing strong { font-weight: 700; }
.agent-rating { font-size: .85rem; color: var(--gold); margin-bottom: .9rem; }

/* ============================
   CTA BANNER
   ============================ */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  margin-bottom: .4rem;
}
.cta-inner p { color: rgba(255,255,255,.75); }
.cta-buttons {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ============================
   LISTINGS PAGE
   ============================ */
.listings-hero {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 3rem 0;
  text-align: center;
}
.listings-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: .5rem;
}
.listings-hero p { color: rgba(255,255,255,.7); }

.listings-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.filters-header h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.filters-header-actions { display: flex; align-items: center; gap: 1rem; }
.clear-btn { font-size: .8rem; color: var(--blue); font-weight: 500; }
.clear-btn:hover { text-decoration: underline; }
.filters-close-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 1rem;
  align-items: center;
  justify-content: center;
}
.filters-close-btn:hover { background: var(--gray-200); color: var(--gray-800); }

.filter-group { margin-bottom: 1.4rem; }
.filter-group > label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .7rem;
  margin-top: 0;
}
.checkbox-group { display: flex; flex-direction: column; gap: .5rem; }
.checkbox {
  display: flex !important;
  align-items: center;
  gap: .6rem;
  font-size: .87rem;
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.checkbox input { width: auto; flex-shrink: 0; }

.range-inputs {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.range-inputs input { padding: .5rem .6rem; font-size: .85rem; min-width: 0; }
.range-inputs span { color: var(--gray-400); flex-shrink: 0; }

.rooms-pills { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Listings Main */
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.results-count { font-size: .9rem; color: var(--gray-600); }
.results-count span { font-weight: 700; color: var(--navy); }
.toolbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.toolbar-right .filter-pills { margin-bottom: 0; }
.sort-select select { width: auto; font-size: .85rem; padding: .45rem .7rem; }

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all .2s;
}
.view-btn svg { width: 14px; height: 14px; }
.view-btn.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }

.filter-mobile-btn {
  display: none;
  padding: .45rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all .2s;
  background: var(--white);
}
.filter-mobile-btn:hover { border-color: var(--blue); color: var(--blue); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: .88rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all .2s;
  background: var(--white);
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.page-btn[data-i18n="prev"],
.page-btn[data-i18n="next"] { width: auto; padding: 0 .9rem; }

/* ============================
   MODALS
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2001;
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
}
.modal.modal-wide { max-width: 860px; }

/* First-visit "free forever" popup */
.free-modal { max-width: 420px; text-align: center; }
.free-modal .free-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); margin-bottom: .4rem; }
.free-modal .free-sub { color: var(--gray-600); font-size: .95rem; margin-bottom: 1.4rem; }

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.8rem;
}
.tab-btn {
  flex: 1;
  padding: .75rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--gray-400);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.auth-form h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--navy);
  margin-bottom: .3rem;
}
.auth-sub { color: var(--gray-600); font-size: .88rem; margin-bottom: 1.5rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.auth-switch { margin-top: 1.3rem; font-size: .85rem; color: var(--gray-600); text-align: center; }
.auth-switch a { color: var(--blue); font-weight: 600; }

/* Listing Form */
.listing-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}
.listing-col {}

.toggle-group {
  display: flex;
  gap: .4rem;
  margin-bottom: .5rem;
}
.toggle-btn {
  flex: 1;
  padding: .6rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-weight: 600;
  font-size: .88rem;
  color: var(--gray-600);
  transition: all .2s;
}
.toggle-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

.upload-box {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 1.8rem 1rem;
  text-align: center;
  transition: border-color .2s;
  cursor: pointer;
}
.upload-box:hover { border-color: var(--blue); }
.upload-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.upload-box p { font-size: .85rem; color: var(--gray-600); margin-bottom: .75rem; }

.modal-actions {
  display: flex;
  gap: .9rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gray-100);
}

/* ── Listing detail modal ── */
#detailModal { padding: 0; overflow: hidden; max-height: 88vh; overflow-y: auto; }
.detail-hero {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.detail-emoji { font-size: 5rem; filter: drop-shadow(0 6px 16px rgba(0,0,0,.3)); }
.detail-hero .prop-badge { position: absolute; top: 1rem; left: 1rem; }
.detail-body { padding: 1.6rem 1.8rem 1.8rem; }
.detail-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--navy); margin-bottom: .4rem; }
.detail-price { font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.detail-price small { font-size: .85rem; font-weight: 500; color: var(--gray-600); }
.detail-loc { color: var(--gray-600); margin: .5rem 0 .9rem; }
.detail-meta { display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--gray-800); font-size: .92rem; margin-bottom: 1rem; }
.detail-desc { color: var(--gray-700); line-height: 1.7; margin-bottom: 1.4rem; }
.detail-actions { display: flex; gap: .8rem; }
.fav-toggle.active { background: #e11d48; }
.detail-contact {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.4rem;
}
.detail-contact h3 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-600);
  margin-bottom: .6rem;
}
.contact-name { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.contact-avatar { font-size: 1.1rem; }
.contact-row { display: flex; align-items: center; gap: .5rem; color: var(--blue); font-size: .92rem; padding: .2rem 0; }
.contact-row:hover { text-decoration: underline; }
.contact-ico { font-size: .95rem; }

/* ── Messenger ── */
.msg-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  height: 68vh;
  min-height: 420px;
}
.msg-list,
.msg-thread {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.msg-list { overflow-y: auto; }
.msg-thread { display: flex; flex-direction: column; }
.conv-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}
.conv-item:hover { background: var(--gray-100); }
.conv-item.active { background: var(--gray-100); box-shadow: inset 3px 0 0 var(--blue); }
.conv-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.conv-name { font-weight: 600; color: var(--navy); }
.conv-badge {
  background: var(--blue); color: #fff;
  font-size: .7rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 .35rem;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.conv-listing { font-size: .78rem; color: var(--blue); margin-top: .1rem; }
.conv-last { font-size: .82rem; color: var(--gray-600); margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.msg-placeholder,
.msg-none {
  margin: auto;
  color: var(--gray-600);
  padding: 2rem;
  text-align: center;
}
.msg-thread-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.msg-thread-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.msg-thread-title strong { color: var(--navy); }
.msg-thread-title small { color: var(--gray-600); font-size: .78rem; }
.msg-back { display: none; font-size: 1.5rem; line-height: 1; color: var(--blue); padding: 0 .3rem; }

.msg-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.msg-bubble {
  max-width: 75%;
  padding: .55rem .85rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-bubble.theirs { align-self: flex-start; background: var(--gray-100); color: var(--gray-800); border-bottom-left-radius: 4px; }
.msg-bubble.mine   { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }

.msg-compose {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--gray-200);
}
.msg-compose input { flex: 1; }

@media (max-width: 768px) {
  .msg-layout { grid-template-columns: 1fr; height: 72vh; }
  .msg-thread { display: none; }
  .msg-layout.thread-open .msg-list { display: none; }
  .msg-layout.thread-open .msg-thread { display: flex; }
  .msg-back { display: inline-block; }
}

/* ============================
   ABOUT SECTION
   ============================ */
.about-content { padding: 4rem 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.about-text p { color: var(--gray-600); margin-bottom: 1rem; line-height: 1.7; }
.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.astat { display: flex; flex-direction: column; }
.astat strong { font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.astat span { font-size: .78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; }

.about-card {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.about-card h3 { font-size: 1.3rem; font-weight: 700; margin: .7rem 0 .3rem; }
.about-card p { color: rgba(255,255,255,.75); font-size: .9rem; margin-bottom: .2rem; }

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.mission-card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1.5px solid var(--gray-200);
  transition: all .25s;
}
.mission-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.mission-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.mission-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: .6rem; }
.mission-card p { font-size: .88rem; color: var(--gray-600); }

/* ============================
   FOOTER
   ============================ */
.site-footer {
  background: var(--navy);
  padding-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo { margin-bottom: 1.2rem; }
.footer-brand .logo-euro,
.footer-brand .logo-kv { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,.55); font-size: .85rem; line-height: 1.7; margin-bottom: 1.5rem; }
.socials { display: flex; gap: .6rem; }
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  transition: all .2s;
}
.social-btn:hover { background: var(--blue); color: var(--white); }

.footer-col h4 {
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.2rem;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  margin-bottom: .6rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 1.5rem 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom-inner p { color: rgba(255,255,255,.4); font-size: .82rem; }
.footer-langs { display: flex; gap: .4rem; }
.footer-lang-btn {
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  font-weight: 600;
  transition: all .2s;
  background: transparent;
}
.footer-lang-btn:hover { border-color: rgba(255,255,255,.4); color: var(--white); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .why-inner { gap: 2.5rem; }
}

@media (max-width: 900px) {
  .main-nav, #btnLogin, #userMenu, .account-menu { display: none; }
  .listings-layout { grid-template-columns: 1fr; }
  .filters-sidebar { display: none; position: fixed; }
  .filters-sidebar.mobile-open {
    display: block;
    top: var(--header-h);
    left: 0; right: 0;
    bottom: 0;
    border-radius: 0;
    border: none;
    z-index: 900;
    overflow-y: auto;
    padding: 1.5rem;
  }
  .filters-sidebar.mobile-open .filters-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: .5rem 0;
    margin: -.5rem 0 1rem;
    z-index: 1;
  }
  .filters-close-btn { display: flex; }
  .filter-mobile-btn { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem; }
  .mission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 50px; }

  /* Hide the page scrollbar on mobile so the sticky header spans edge to edge */
  #app { scrollbar-width: none; -ms-overflow-style: none; }
  #app::-webkit-scrollbar { display: none; }

  body { background-attachment: scroll; }
  .container { padding: 0 1rem; }
  input, select, textarea { font-size: 1rem; }
  .search-field input, .search-field select { font-size: 1rem; }
  .range-inputs input { font-size: 1rem; }
  .header-inner { gap: .75rem; }
  .logo-euro, .logo-kv { font-size: 1.25rem; }
  .logo-text small { font-size: .46rem; }
  .header-actions { gap: .4rem; }
  .lang-btn { padding: .4rem .55rem; font-size: .8rem; }

  .hero-content { padding-top: 1.75rem; padding-bottom: 0; }
  .search-box { margin-bottom: 0; }
  /* Mobile: search fields are collapsed until a tab is pressed */
  .search-box .search-inputs { display: none; }
  .search-box.search-open .search-inputs { display: flex; }
  .search-inputs { flex-direction: column; }
  .search-field { border-right: none; border-bottom: 1px solid var(--gray-200); }
  .search-field:last-child { border-bottom: none; }
  .btn-search { width: 100%; text-align: center; }
  .btn-advanced {
    display: block;
    margin-top: .5rem;
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
  }
  .btn-advanced:hover { background: var(--blue); color: var(--white); }
  /* Mobile: no heading / View all above the quick-search results */
  #homeResultsSection .section-header { display: none; }

  .section { padding: 3rem 0; }
  .about-content { padding: 2.5rem 0; }
  .cta-banner { padding: 3rem 0; }

  .countries-grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .why-inner { grid-template-columns: 1fr; gap: 2rem; }
  .why-visual { height: 280px; }
  .vc2 { right: auto; left: 120px; top: 80px; }
  .stat-float { bottom: 0; left: 10px; }

  .listing-form-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 1.8rem 1.2rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-buttons { justify-content: center; }

  .property-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem; }
  .stat-sep { display: none; }

  .toolbar-right .filter-pills { display: none; }
  .view-toggle { display: none; }
  .sort-select { display: none; }
}

@media (max-width: 600px) {
  #btnAddListing { padding: .5rem .7rem; font-size: .8rem; }
  .account-btn { padding: .5rem .7rem; }
  .account-btn #accountName { max-width: 70px; }
}

@media (max-width: 480px) {
  .agents-grid { grid-template-columns: 1fr; }
  .container { padding: 0 .85rem; }
  .section { padding: 2.5rem 0; }
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: .9rem; }
  .stat strong { font-size: 1.25rem; }
  .search-box { border-radius: var(--radius); }
  .modal { width: 94%; padding: 1.5rem 1rem; }
  .modal-close { top: .8rem; right: .8rem; }
  .modal.modal-wide { max-width: 98vw; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn-primary,
  .modal-actions .btn-outline { width: 100%; }
  .listing-form-grid { gap: 0; }
}

/* Map background bleed-through for sections */
.hero,
#sectionListings,
#sectionDashboard,
#sectionAdmin,
#sectionFavourites,
#sectionMessages,
.section,
.listings-layout,
.about-content {
  background: rgba(255,255,255,0.82);
}
.bg-light {
  background: rgba(244,247,252,0.84) !important;
}
.cta-banner {
  background: linear-gradient(135deg, rgba(15,42,69,.94) 0%, rgba(30,90,156,.94) 100%);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ============================
   Dashboard
   ============================ */
.dashboard { padding: 2.5rem 1.5rem 3.5rem; }
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.dash-head h2 { font-family: var(--font-display); font-size: 1.9rem; color: var(--navy); }
.dash-sub { color: var(--gray-600); font-size: .95rem; }

.dash-tabs {
  display: flex;
  gap: .35rem;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.75rem;
}
.dash-tab {
  padding: .6rem 1.1rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.dash-tab:hover { color: var(--navy); }
.dash-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dash-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.dash-stat-num { font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.dash-stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-600); }

.dash-profile {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.dash-profile h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: .75rem; }
.dash-profile .btn-primary { margin-top: .9rem; }
.dash-profile-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .92rem;
}
.dash-profile-row:last-child { border-bottom: none; }
.dash-profile-row span { color: var(--gray-600); }
.dash-profile-row strong { color: var(--gray-800); }

.dash-listings-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1rem;
}
.dash-empty {
  background: var(--white);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--gray-600);
}
.property-grid > .dash-empty { grid-column: 1 / -1; }

.dash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .85rem;
  flex-wrap: wrap;
}
.dash-item-main { min-width: 200px; flex: 1; }
.dash-item-main h4 { font-size: 1.02rem; color: var(--navy); }
.dash-item-meta { font-size: .84rem; color: var(--gray-600); text-transform: capitalize; }
.dash-item-price { font-weight: 700; color: var(--blue); margin-top: .2rem; }

.dash-item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .6rem;
}
.dash-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: .2rem .6rem;
  border-radius: 999px;
}
.dash-stat-chip-num {
  font-weight: 700;
  color: var(--navy);
}

.dash-item-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.dash-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
}
.dash-badge.status-active   { background: #dcfce7; color: #166534; }
.dash-badge.status-sold     { background: #dbeafe; color: #1e40af; }
.dash-badge.status-rented   { background: #ede9fe; color: #5b21b6; }
.dash-badge.status-inactive { background: var(--gray-200); color: var(--gray-600); }

.dash-status-select {
  width: auto;
  padding: .4rem .6rem;
  font-size: .84rem;
}
.dash-del {
  padding: .45rem .9rem;
  font-size: .84rem;
  font-weight: 600;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fff;
  transition: background .2s, border-color .2s;
}
.dash-del:hover { background: #fef2f2; border-color: #ef4444; }

@media (max-width: 768px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-item { flex-direction: column; align-items: flex-start; }
  .dash-item-actions { width: 100%; }
}

/* ── Admin tables ── */
.admin-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  white-space: nowrap;
}
.admin-table th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-600);
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.admin-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--off-white); }
.admin-table small { color: var(--gray-600); }
.admin-table select {
  width: auto;
  padding: .35rem .55rem;
  font-size: .82rem;
}
.admin-table input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* ── Counter cards (Traffic & Growth) ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.stat-card h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--blue);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-100);
}
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .3rem 0;
  font-size: .88rem;
  color: var(--gray-600);
}
.stat-row strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}
@media (max-width: 768px) {
  .stat-cards { grid-template-columns: 1fr; }
}

/* -- Listing photo upload previews -- */
.upload-hint { font-size: .8rem; color: var(--gray-600); margin-top: .25rem; }
.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.upload-thumb {
  position: relative;
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .9rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* -- Listing detail gallery -- */
.detail-gallery {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  padding: 0 1.8rem;
}
.detail-gallery:not(:empty) { padding-top: .8rem; padding-bottom: .2rem; }
.detail-thumb {
  flex: 0 0 auto;
  width: 64px; height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .75;
}
.detail-thumb.active { border-color: var(--blue); opacity: 1; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* -- Custom dropdown inside the search box (property type) -- */
.search-dd { position: relative; }
.search-dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: .4rem 0;
  font-family: var(--font);
  font-size: .92rem;
  color: var(--gray-800);
  text-align: left;
}
.search-dd-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-dd-chevron { flex-shrink: 0; color: var(--gray-400); }
.search-dd-list {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
}
.search-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .55rem .85rem;
  font-size: .88rem;
  color: var(--gray-800);
  background: none;
  transition: background .15s;
}
.search-dd-item:hover { background: var(--gray-100); }
