*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --surface2: #fbfbfd;
  --text: #1d1d1f;
  --text2: #6e6e73;
  --text3: #86868b;
  --accent: #0071e3;
  --accent-h: #0077ed;
  --blue: #0071e3;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.12);
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --shadow-h: 0 8px 40px rgba(0, 0, 0, 0.14);
  --r: 18px;
  --rs: 12px;
}

html {
  scroll-behavior: smooth
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.47059;
  letter-spacing: -0.022em;
}

/* ─── NAV ─── */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 52px;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px
}

.nav-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -.3px
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none
}

.nav-links a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  opacity: .8;
  cursor: pointer;
  transition: opacity .2s
}

.nav-links a:hover {
  opacity: 1
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 500px;
  /* Pill-shaped */
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-h);
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 17px;
  border-radius: 500px;
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2)
}

.btn-outline:hover {
  background: var(--bg)
}

/* ─── PAGES ─── */
.page {
  display: none;
  padding-top: 52px;
  min-height: 100vh;
  animation: fadeIn .3s ease
}

.page.active {
  display: block
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ─── MODALS ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center
}

.modal-overlay.open {
  display: flex
}

.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  margin: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .2);
  animation: modalIn .3s cubic-bezier(.34, 1.56, .64, 1)
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.92)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

.modal h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 6px
}

.modal p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 28px
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal {
  position: relative
}

/* ─── FORMS ─── */
.form-group {
  margin-bottom: 16px
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  transition: border .2s, box-shadow .2s;
  outline: none
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .12)
}

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

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

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

.form-link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none
}

.form-link:hover {
  text-decoration: underline
}

/* ─── HERO ─── */
.hero {
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, #e8eaf0 0%, #f5f5f7 60%);
  position: relative;
  overflow: hidden
}

.hero::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse, rgba(0, 113, 227, .12) 0%, transparent 70%);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 16px;
  animation: fadeUp .8s ease .1s both
}

.hero h1 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 20px;
  animation: fadeUp .8s ease .2s both
}

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

.hero-sub {
  font-size: clamp(17px, 2.5vw, 22px);
  color: var(--text2);
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: 48px;
  font-weight: 300;
  animation: fadeUp .8s ease .3s both
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ─── SEARCH BOX ─── */
.search-box {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .06);
  padding: 12px;
  animation: fadeUp .8s ease .4s both
}

.search-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px
}

.search-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit
}

.search-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1)
}

.search-row {
  display: flex;
  gap: 8px;
  align-items: center
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 16px
}

.search-input-wrap input {
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  width: 100%;
  outline: none;
  font-family: inherit
}

.search-input-wrap input::placeholder {
  color: var(--text3)
}

.search-btn {
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit
}

.search-btn:hover {
  background: var(--accent-h);
  transform: scale(1.02)
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  animation: fadeUp .8s ease .6s both
}

.stat {
  text-align: center
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em
}

.stat-label {
  font-size: 13px;
  color: var(--text3);
  margin-top: 2px
}

/* ─── SECTION ─── */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 10px
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 8px
}

.section-sub {
  font-size: 17px;
  color: var(--text2);
  font-weight: 300;
  margin-bottom: 48px;
  line-height: 1.5;
}

/* ─── PROPERTY GRID ─── */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px
}

.property-card {
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .35s cubic-bezier(.25, .46, .45, .94);
  cursor: pointer
}

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

.prop-img {
  width: 100%;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden
}

.prop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600
}

.prop-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s;
  border: none;
  font-size: 15px
}

.prop-heart:hover {
  transform: scale(1.15)
}

.prop-body {
  padding: 18px
}

.prop-price {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 3px
}

.prop-address {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 14px
}

.prop-meta {
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px
}

.meta-item {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500
}

/* ─── CATEGORY GRID ─── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px
}

.cat-card {
  background: var(--surface);
  border-radius: var(--rs);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .25s ease
}

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

.cat-icon {
  font-size: 32px;
  margin-bottom: 10px
}

.cat-name {
  font-size: 14px;
  font-weight: 600
}

.cat-count {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px
}

/* ─── DARK STRIP ─── */
.dark-strip {
  background: var(--text);
  padding: 80px 24px
}

.dark-strip .section-label {
  color: rgba(255, 255, 255, .5)
}

.dark-strip .section-title {
  color: #fff
}

.dark-strip .section-sub {
  color: rgba(255, 255, 255, .6)
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  margin-top: 48px
}

.feat-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, .1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px
}

.feat-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -.02em
}

.feat-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.6;
  font-weight: 300
}

/* ─── FILTERS BAR ─── */
.filters-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
  /* Don't wrap on mobile */
  overflow-x: auto;
  /* Enable horizontal scrolling */
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

.filters-bar::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari */
}

.filter-chip {
  padding: 7px 14px;
  border-radius: 980px;
  border: 1px solid var(--border2);
  font-size: 13px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .2s
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent)
}

.filter-select {
  padding: 7px 14px;
  border-radius: 980px;
  border: 1px solid var(--border2);
  font-size: 13px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  outline: none;
  appearance: none;
  padding-right: 28px
}

/* ─── LISTING PAGE ─── */
.listing-hero {
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #d4e3f5, #a8c8f0)
}

.listing-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px
}

.listing-main h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 6px
}

.listing-address {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 24px
}

.listing-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--rs)
}

.l-stat {
  text-align: center;
  flex: 1
}

.l-stat-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.03em
}

.l-stat-label {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px
}

.listing-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  font-weight: 300
}

.listing-sidebar {
  position: sticky;
  top: 72px
}

.sidebar-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow)
}

.sidebar-price {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 4px
}

.sidebar-sub {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 20px
}

/* ─── PROFILE ─── */
.profile-hero {
  background: linear-gradient(180deg, #e8eaf0, #f5f5f7);
  padding: 60px 24px;
  text-align: center
}

.avatar-big {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  color: #fff;
  font-weight: 700
}

.profile-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em
}

.profile-email {
  font-size: 14px;
  color: var(--text3);
  margin-top: 4px
}

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  background: var(--surface);
  overflow-x: auto
}

.tab {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent)
}

.tab-content {
  display: none
}

.tab-content.active {
  display: block
}

/* ─── NOTIFICATIONS ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  z-index: 999;
  transform: translateY(80px);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none
}

.toast.show {
  transform: translateY(0)
}

.toast.success {
  background: #34c759
}

.toast.error {
  background: #ff3b30
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text3)
}

.empty-state .es-icon {
  font-size: 52px;
  margin-bottom: 16px
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px
}

.empty-state p {
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto
}

/* ─── PAGE HEADERS ─── */
.page-header {
  padding: 60px 28px 40px;
  max-width: 1200px;
  margin: 0 auto
}

.page-header h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em
}

.page-header p {
  font-size: 16px;
  color: var(--text2);
  font-weight: 300;
  margin-top: 8px
}

/* ─── ABOUT / CONTACT ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 40px
}

.about-img {
  height: 400px;
  background: linear-gradient(135deg, #d4e3f5, #a8c8f0);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px
}

.about-text h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 16px
}

.about-text p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 16px;
  font-weight: 300
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px
}

.team-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow)
}

.team-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px
}

.team-name {
  font-size: 15px;
  font-weight: 600
}

.team-role {
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px
}

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

.contact-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow)
}

.contact-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px
}

/* ─── VALUATION ─── */
.valuation-result {
  background: linear-gradient(135deg, #0071e3, #0051a3);
  color: #fff;
  border-radius: var(--r);
  padding: 40px;
  text-align: center;
  margin-top: 24px
}

.val-price {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.04em
}

.val-label {
  font-size: 14px;
  opacity: .8;
  margin-top: 6px
}

.val-range {
  font-size: 14px;
  opacity: .7;
  margin-top: 8px
}

/* ─── MESSAGES ─── */
.messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 52px)
}

.msg-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface)
}

.msg-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s
}

.msg-item:hover {
  background: var(--bg)
}

.msg-item.active {
  background: rgba(0, 113, 227, .06)
}

.msg-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px
}

.msg-preview {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.msg-time {
  font-size: 11px;
  color: var(--text3)
}

.chat-area {
  display: flex;
  flex-direction: column;
  height: 100%
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg)
}

.chat-bubble {
  max-width: 60%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5
}

.bubble-in {
  background: var(--surface);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px
}

.bubble-out {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface)
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border2);
  border-radius: 980px;
  font-size: 14px;
  outline: none;
  font-family: inherit
}

.chat-input:focus {
  border-color: var(--accent)
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 20px;
  display: flex;
  gap: 6px;
  align-items: center
}

.breadcrumb a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none
}

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

/* ─── FOOTER ─── */
footer {
  background: var(--text);
  color: rgba(255, 255, 255, .7);
  padding: 60px 28px 40px
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto
}

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

.footer-brand {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px
}

.footer-desc {
  font-size: 13px;
  line-height: 1.6;
  max-width: 240px
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .04em
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px
}

.footer-col a {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s
}

.footer-col a:hover {
  color: #fff
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px
}

/* ─── UTILITIES ─── */
.flex {
  display: flex
}

.items-center {
  align-items: center
}

.justify-between {
  justify-content: space-between
}

.gap-2 {
  gap: 8px
}

.gap-3 {
  gap: 12px
}

.gap-4 {
  gap: 16px
}

.mt-4 {
  margin-top: 16px
}

.mt-6 {
  margin-top: 24px
}

.mt-8 {
  margin-top: 32px
}

.text-center {
  text-align: center
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600
}

.badge-blue {
  background: rgba(0, 113, 227, .1);
  color: var(--accent)
}

.badge-green {
  background: rgba(52, 199, 89, .15);
  color: #1a8a3a
}

.badge-orange {
  background: rgba(255, 149, 0, .15);
  color: #c47800
}

@media(max-width:768px) {
  .nav-links {
    display: none
  }

  .footer-top {
    grid-template-columns: 1fr 1fr
  }

  .listing-body {
    grid-template-columns: 1fr
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr
  }

  .messages-layout {
    grid-template-columns: 1fr
  }

  .hero-stats {
    gap: 24px
  }

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

/* ═════════════════════════════════════════════
   AI CHATBOT STYLES
═════════════════════════════════════════════ */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 122, 255, 0.4);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(0, 122, 255, 0.6);
}

.chatbot-toggle .bot-icon {
  font-size: 28px;
  line-height: 1;
}

.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chatbot-window.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.chatbot-window .chat-header {
  background: var(--blue);
  background: linear-gradient(135deg, var(--blue), #005ce6);
}

.chatbot-window .bubble-in {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.chatbot-window .bubble-out {
  background: var(--blue);
  background: linear-gradient(to bottom, var(--blue), #0066ff);
  color: white;
}

.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--text3);
  border-radius: 50%;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* ═════════════════════════════════════════════
   UTLEIEKALKULATOR (RENTAL CALCULATOR)
═════════════════════════════════════════════ */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-inputs {
  background: var(--surface);
  border-radius: var(--r);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.calc-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.calc-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.calc-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-results {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.res-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.highlight-res {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(0, 122, 255, 0.15));
  border: 1px solid rgba(0, 122, 255, 0.3);
}

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

.res-label {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.res-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.highlight-res .res-value {
  color: var(--blue);
}

.res-sub {
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}

.res-breakdown {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.bd-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bd-row.total {
  font-weight: 600;
  color: var(--text);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* TOOLTIPS */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text3);
  color: white;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  cursor: help;
  position: relative;
  transition: background 0.2s;
}

.tooltip-icon:hover {
  background: var(--blue);
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 150%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 240px;
  padding: 12px;
  background: #2c2c2e;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 1000;
  text-align: left;
}

.tooltip-icon::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border-width: 6px;
  border-style: solid;
  border-color: #2c2c2e transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ═════════════════════════════════════════════
   MORE FILTERS PANEL (Zillow-style)
═════════════════════════════════════════════ */
.btn-more-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-more-filters:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.btn-more-filters.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.more-arrow {
  transition: transform 0.3s;
  font-size: 10px;
}

.btn-more-filters.active .more-arrow {
  transform: rotate(180deg);
}

.filter-badge {
  background: #ff3b30;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.more-filters-panel {
  max-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.3s;
  padding: 0 28px;
}

.more-filters-panel.open {
  max-height: 800px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.mfp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .mfp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .mfp-grid {
    grid-template-columns: 1fr;
  }
}

.mfp-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mfp-section-wide {
  grid-column: span 1;
}

.mfp-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.mfp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.facility-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chip-label:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chip-label:has(input:checked) {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.chip-label input[type="checkbox"] {
  display: none;
}

/* ═════════════════════════════════════════════
   ENHANCED MAP CONTROLS
═════════════════════════════════════════════ */
.map-overlay-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  width: 370px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-search-bar {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 6px 12px;
}

.map-search-btn {
  background: var(--accent, #0071e3);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.map-poi-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-poi-btn {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.map-poi-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.map-poi-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.map-compact-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-filter-sel {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

/* Map Style Switcher */
.map-style-switcher {
  position: absolute;
  bottom: 32px;
  left: 16px;
  z-index: 1000;
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.map-style-btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.2s;
  font-family: inherit;
}

.map-style-btn.active {
  background: var(--blue);
  color: white;
}

.map-style-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
}

/* Walk Around Button */
.map-walkaround-btn {
  position: absolute;
  bottom: 100px;
  right: 16px;
  z-index: 1000;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text);
}

.map-walkaround-btn:hover {
  background: var(--blue);
  color: white;
}

.map-walkaround-btn.active {
  background: var(--blue);
  color: white;
}

/* Street View Panel */
.streetview-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1001;
  background: #000;
  border-radius: 0;
  display: none;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.streetview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.streetview-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.streetview-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .map-overlay-panel {
    width: calc(100% - 32px);
    top: 8px;
    left: 8px;
  }

  .streetview-panel {
    width: 100%;
    height: 50%;
    top: auto;
    bottom: 0;
  }

  .map-style-switcher {
    bottom: 16px;
    left: 8px;
  }

  .map-walkaround-btn {
    bottom: 80px;
    right: 8px;
  }
}

/* Zillow-style price markers */
.custom-price-icon {
  background: none !important;
  border: none !important;
}

.map-price-marker {
  background: var(--blue, #0071e3);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 16px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.map-price-marker:hover {
  background: #0051a3;
  transform: scale(1.15);
}

.map-popup-card {
  cursor: pointer;
  text-align: center;
  padding: 4px;
}

.map-popup-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.map-popup-card p {
  font-size: 13px;
  color: #666;
}

/* ═════════════════════════════════════════════
   CHATBOT FIXES — outgoing message visibility
═════════════════════════════════════════════ */
.bubble-out {
  background: var(--accent, #0071e3) !important;
  color: #fff !important;
  align-self: flex-end;
  margin-left: auto;
}

.bubble-in {
  background: var(--surface, #f5f5f7);
  color: var(--text, #1d1d1f);
  align-self: flex-start;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* ═════════════════════════════════════════════
   MER FILTERS PANEL VISIBILITY (Kjøp page)
═════════════════════════════════════════════ */
#mer-panel,
.mer-panel,
[id$="-mer-panel"] {
  background: var(--surface, #fff) !important;
  color: var(--text, #1d1d1f) !important;
}

#mer-panel label,
.mer-panel label {
  color: var(--text, #1d1d1f) !important;
}

#mer-panel select,
#mer-panel input,
.mer-panel select,
.mer-panel input {
  color: var(--text, #1d1d1f) !important;
  background: var(--bg, #f5f5f7) !important;
  border: 1px solid var(--border, #ddd) !important;
}

/* Facility / filter chip fixes */
.facility-chips label,
.chip-label,
.filter-chip label {
  color: var(--text, #1d1d1f) !important;
}

/* ═════════════════════════════════════════════
   MAP POI BUTTON ACTIVE STATE — visibility
═════════════════════════════════════════════ */
.map-poi-btn.active {
  background: var(--blue, #0071e3) !important;
  color: #fff !important;
  border-color: var(--blue, #0071e3) !important;
}

.map-style-btn.active {
  background: var(--blue, #0071e3) !important;
  color: #fff !important;
}

.map-walkaround-btn.active {
  background: var(--blue, #0071e3) !important;
  color: #fff !important;
}

/* ═════════════════════════════════════════════
   MOBILE OPTIMISATION
═════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  .nav-links {
    display: none;
  }

  .nav {
    padding: 0 12px;
  }

  /* Page headers */
  .page-header {
    padding: 32px 16px 24px;
  }

  .page-header h1 {
    font-size: clamp(24px, 6vw, 40px);
  }

  /* Sections */
  .section {
    padding: 24px 16px;
  }

  /* Cards grid — single column */
  .cards-grid,
  .listings-grid,
  .home-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* About grid */
  .about-grid {
    grid-template-columns: 1fr !important;
  }

  .about-img {
    font-size: 60px !important;
    text-align: center;
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Filter bars — scrollable row */
  .filter-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
  }

  .filter-bar select,
  .filter-bar input {
    min-width: 110px;
    font-size: 13px;
  }

  /* Buy / Rent listings filter area */
  .buy-filters,
  .rent-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* Map overlay — full width on mobile */
  .map-overlay-panel {
    width: calc(100vw - 20px) !important;
    left: 10px !important;
    right: 10px !important;
    top: 10px !important;
  }

  .map-compact-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .map-poi-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
  }

  .map-style-switcher {
    bottom: 12px !important;
    left: 10px !important;
  }

  .map-walkaround-btn {
    bottom: 68px !important;
    right: 10px !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  .streetview-panel {
    width: 100% !important;
    height: 55% !important;
    top: auto !important;
    bottom: 0 !important;
  }

  /* Chatbot */
  .chatbot-window {
    width: calc(100vw - 20px) !important;
    right: 10px !important;
    bottom: 70px !important;
    height: 70vh !important;
  }

  /* Modals */
  .modal-box {
    width: calc(100vw - 32px) !important;
    margin: 16px !important;
    padding: 24px 20px !important;
  }

  /* Cards */
  .card {
    border-radius: 12px;
  }

  /* Contact grid */
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {

  /* Extra small phones */
  .nav-auth {
    gap: 8px;
  }

  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .page-header h1 {
    font-size: 22px;
  }
}

/* ═════════════════════════════════════════════
   ZILLOW-INSPIRED LISTING DETAIL PAGE
═════════════════════════════════════════════ */

/* Hero */
.listing-hero {
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.listing-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.listing-hero-emoji {
  font-size: 100px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .12));
}

.listing-hero-badge {
  background: var(--accent, #0071e3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.listing-hero-actions {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.listing-action-btn {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  color: #1d1d1f;
}

.listing-action-btn:hover {
  background: #fff;
}

/* Two-column layout */
.listing-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  align-items: start;
}

@media(max-width:900px) {
  .listing-layout {
    grid-template-columns: 1fr;
  }
}

/* Top strip */
.listing-top-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.listing-main-price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text, #1d1d1f);
}

.listing-main-address {
  font-size: 15px;
  color: var(--text2, #6e6e73);
  margin-top: 4px;
}

.listing-type-pill {
  background: var(--bg, #f5f5f7);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, #6e6e73);
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 8px;
}

/* Zillow-style KPI bar */
.listing-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 14px;
  padding: 20px 28px;
  margin-bottom: 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.l-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.l-kpi-num {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text, #1d1d1f);
}

.l-kpi-lbl {
  font-size: 12px;
  color: var(--text3, #aeaeb2);
  margin-top: 2px;
  text-transform: lowercase;
}

.l-kpi-div {
  width: 1px;
  height: 36px;
  background: var(--border, #e5e5ea);
  flex-shrink: 0;
}

/* Sections */
.listing-section {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border, #e5e5ea);
  margin-bottom: 32px;
}

.listing-section:last-of-type {
  border-bottom: none;
}

.listing-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text, #1d1d1f);
}

.listing-desc-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text2, #3a3a3c);
}

/* Facts grid — Zillow style */
.listing-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media(max-width:600px) {
  .listing-facts-grid {
    grid-template-columns: 1fr;
  }
}

.listing-fact-group {}

.listing-fact-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1d1d1f);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #e5e5ea);
}

.listing-fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.listing-fact-list li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text2, #6e6e73);
  gap: 8px;
}

.listing-fact-list li strong {
  color: var(--text, #1d1d1f);
  font-weight: 600;
  text-align: right;
}

/* Price analysis cards */
.price-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.price-analysis-card {
  background: var(--bg, #f5f5f7);
  border-radius: 12px;
  padding: 18px 20px;
}

.pa-label {
  font-size: 12px;
  color: var(--text3, #aeaeb2);
  margin-bottom: 6px;
  font-weight: 500;
}

.pa-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #1d1d1f);
  letter-spacing: -.02em;
}

.pa-value.accent {
  color: var(--accent, #0071e3);
}

/* Owner warning */
.listing-owner-warning {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(255, 149, 0, .1);
  border-radius: 10px;
  font-size: 13px;
  color: #c47800;
  border-left: 3px solid #ff9500;
}

.listing-gallery-img {
  height: 160px;
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
  min-width: 240px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── SIDEBAR ── */
.listing-sidebar-col {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.listing-sidebar-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
}

.sidebar-price-main {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text, #1d1d1f);
  margin-bottom: 4px;
}

.sidebar-price-sub {
  font-size: 13px;
  color: var(--text3, #aeaeb2);
  margin-bottom: 20px;
}

.sidebar-cta {
  width: 100%;
  margin-bottom: 10px;
  display: block;
}

.sidebar-fav-btn {
  width: 100%;
  background: var(--bg, #f5f5f7);
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text, #1d1d1f);
  transition: background .15s;
}

.sidebar-fav-btn:hover {
  background: var(--border, #e5e5ea);
}

/* ── MORTGAGE CARD ── */
.mortgage-card {
  padding: 20px;
}

.mortgage-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text, #1d1d1f);
}

.mortgage-row {
  margin-bottom: 12px;
}

.mortgage-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #6e6e73);
  margin-bottom: 5px;
}

.mortgage-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg, #f5f5f7);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 10px;
  overflow: hidden;
}

.mortgage-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text, #1d1d1f);
  outline: none;
  min-width: 0;
}

.mortgage-unit {
  padding: 0 12px;
  font-size: 13px;
  color: var(--text3, #aeaeb2);
  font-weight: 600;
  border-left: 1px solid var(--border, #e5e5ea);
  height: 38px;
  display: flex;
  align-items: center;
  background: var(--surface, #fff);
}

.mortgage-result {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
  border-radius: 12px;
  color: #fff;
  text-align: center;
}

.mort-res-label {
  font-size: 11px;
  opacity: .8;
  margin-bottom: 6px;
  font-weight: 500;
}

.mort-res-amount {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.mort-res-details {
  font-size: 11px;
  opacity: .75;
  margin-top: 6px;
  line-height: 1.5;
}


/* ─── BOLIGTJENESTER GRID ─── */
.services-hero {
  background: white;
  padding: 40px 28px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.services-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.services-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.services-hero p {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 0;
}

.services-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 28px 60px;
}

.services-grid-title h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.services-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.service-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.service-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--border2);
}

.service-icon {
  font-size: 42px;
  line-height: 1;
}

.service-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}


/* ─── MEGLERE LOCATOR (APPLE-STYLE) ─── */
#page-meglere {
  padding-top: 52px;
  height: 100vh;
  overflow: hidden;
}

.meglere-layout {
  display: flex;
  height: 100%;
  flex-direction: column-reverse;
  background: var(--bg);
}

.meglere-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 10;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.04);
}

.meglere-sidebar-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.meglere-sidebar-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
  letter-spacing: -0.5px;
}

.meglere-sidebar-header select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  font-size: 15px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2210%22%20viewBox%3D%220%200%2014%2010%22%3E%3Cpath%20fill%3D%22%2386868b%22%20d%3D%22M7%2010L0%200h14z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 10px;
  cursor: pointer;
}

.meglere-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meglere-map-container {
  flex: 1;
  position: relative;
}

#meglere-map {
  width: 100%;
  height: 100%;
  background: #e5e5ea;
}

/* Responsiveness */
@media (min-width: 768px) {
  .meglere-layout {
    flex-direction: row;
  }

  .meglere-sidebar {
    width: 420px;
    flex: none;
  }

  .meglere-map-container {
    flex: 1;
  }
}

/* Office Cards */
.office-card {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.office-card:hover {
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border2);
}

.office-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.office-info {
  flex: 1;
}

.office-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.office-info p {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
  line-height: 1.4;
}

.office-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.office-tag {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 12px;
  font-weight: 600;
  color: var(--text2);
}

.office-tag.highlight {
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
}

.list-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 8px 0;
  padding-left: 4px;
}

/* ── MAP HEIGHT FIX ── */
.meglere-map-container {
  flex: 1;
  position: relative;
  min-height: 50vh;
  /* Sikrer at kartet ikke kollapser på mobil */
}

#meglere-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .meglere-map-container {
    min-height: 100%;
  }
}


/* ================================================================
   MOBILE OPTIMIZATION — full responsive overrides
   Targets: ≤ 768px (tablet/phone), ≤ 480px (phone)
   ================================================================ */

@media (max-width: 768px) {

  /* ── Navigation ──────────────────────────────────────────── */
  body > nav {
    padding: 0 16px;
    height: 56px;
  }

  .nav-links {
    display: none !important;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .nav-brand {
    font-size: 15px;
  }

  /* Hamburger menu trigger — show on mobile */
  .nav-hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text1);
    font-size: 22px;
    border-radius: 8px;
    transition: background .15s;
  }

  .nav-hamburger:hover {
    background: var(--surface);
  }

  /* ── Hero ────────────────────────────────────────────────── */
  .hero {
    min-height: 520px;
    padding: 80px 20px 40px;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 52px);
    line-height: 1.15;
  }

  .hero-sub {
    font-size: 15px;
    max-width: 100%;
    margin: 12px 0 24px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
    padding: 14px;
  }

  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 32px;
  }

  .stat-num {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* ── Search bar ──────────────────────────────────────────── */
  .search-bar {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
  }

  .search-input {
    width: 100%;
    min-width: unset;
    font-size: 15px;
  }

  .search-tabs {
    gap: 6px;
    flex-wrap: wrap;
  }

  .search-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .search-filters {
    flex-wrap: wrap;
    gap: 6px;
  }

  .search-filters select {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
    font-size: 13px;
    padding: 8px 10px;
  }

  /* ── Property grid ───────────────────────────────────────── */
  .property-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .property-card {
    border-radius: 16px;
  }

  .card-img {
    height: 200px;
  }

  /* ── Section typography ──────────────────────────────────── */
  .section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: clamp(22px, 6vw, 38px);
  }

  .section-label {
    font-size: 11px;
  }

  /* ── Features grid ───────────────────────────────────────── */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ── Modals ──────────────────────────────────────────────── */
  .modal {
    margin: 16px;
    padding: 24px 20px;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal h2 {
    font-size: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 12px;
  }

  /* ── Pages ───────────────────────────────────────────────── */
  .page {
    padding: 72px 16px 32px;
  }

  /* ── Dynamic Price Increase Map Markers ───────────────────────────────────────────────── */
  .sims-marker {
    position: absolute;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.98);
    color: #111;
    border-radius: 20px;
    font-weight: 800;
    font-size: 20px;
    /* Increased strongly */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    white-space: nowrap;
    animation: simsHover 3s ease-in-out infinite;
    transform-origin: bottom center;
    border: 3px solid;
    /* Make room for the colored border */
    z-index: 999;
  }

  .sims-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.98) transparent transparent transparent;
  }

  /* We use the border color to make the pointer match the border */
  .sims-marker.positive {
    color: #1b5e20;
    /* Darker green text */
    border-color: #4CAF50;
    /* Vibrant green border */
    background: #e8f5e9;
    /* Light green tinted background */
  }

  .sims-marker.positive::after {
    border-top-color: #4CAF50;
    /* Match the pointer with the border */
  }

  .sims-marker.negative {
    color: #b71c1c;
    /* Darker red text */
    border-color: #ef5350;
    /* Vibrant red border */
    background: #ffebee;
    /* Light red tinted background */
  }

  .sims-marker.negative::after {
    border-top-color: #ef5350;
    /* Match the pointer with the border */
  }

  @keyframes simsHover {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-8px);
    }
  }

  /* ── Listing detail ─────────────────────────────────────── */
  .listing-hero {
    height: 300px;
    padding: 0 16px;
    width: 100%;
  }

  .listing-hero-emoji {
    font-size: 64px;
  }

  .listing-hero-actions {
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    /* Center for better balance */
  }

  .listing-action-btn {
    padding: 6px 14px;
    font-size: 12px;
    flex: 1;
    /* Allow to grow but also wrap */
    min-width: 90px;
    text-align: center;
  }

  .listing-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px 48px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .listing-top-strip {
    flex-direction: column;
    gap: 12px;
  }

  .listing-main-price {
    font-size: 26px;
    word-break: break-word;
  }

  .listing-main-address {
    font-size: 14px;
    line-height: 1.4;
  }

  .listing-stats-bar {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    border-radius: 12px;
  }

  .l-kpi {
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
  }

  .l-kpi:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
  }

  .l-kpi-num {
    font-size: 18px;
  }

  .l-kpi-lbl {
    font-size: 11px;
  }

  .l-kpi-div {
    display: none;
  }

  .listing-desc-text {
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
  }

  .listing-facts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .listing-sidebar-col {
    position: static;
    width: 100%;
  }

  .listing-sidebar-card {
    padding: 20px;
  }

  .sidebar-price-main {
    font-size: 22px;
  }

  /* Prevent any global horizontal overflow on pages */
  .page {
    max-width: 100vw;
    overflow-x: hidden;
    padding-left: 16px;
    padding-right: 16px;
  }

  .listing-gallery-img {
    min-width: 200px;
    height: 140px;
  }

  img,
  iframe {
    max-width: 100%;
    height: auto;
  }

  /* ── Meglere layout ───────────────────────────────────────── */
  .meglere-layout {
    flex-direction: column;
  }

  .meglere-sidebar {
    width: 100%;
    max-width: 100%;
    height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .meglere-map-container {
    height: 50vh;
  }

  #meglere-map {
    height: 100%;
  }

  /* ── Profile ─────────────────────────────────────────────── */
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .profile-tabs {
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .tab {
    padding: 12px 16px;
    font-size: 13px;
  }

  /* ── Footer ──────────────────────────────────────────────── */
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-col {
    min-width: unset;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* ── Chatbot ─────────────────────────────────────────────── */
  .chatbot-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
    height: 60vh;
  }

  /* ── Misc utility ────────────────────────────────────────── */
  .btn-lg {
    padding: 13px 24px;
    font-size: 15px;
  }

  h1 {
    font-size: clamp(24px, 7vw, 52px);
  }
}

@media (max-width: 480px) {

  /* ── Nav collapses further ───────────────────────────────── */
  .nav-actions .btn-ghost {
    display: none;
  }

  /* hide secondary nav btns */
  .nav-actions .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* ── Hero tighter ────────────────────────────────────────── */
  .hero {
    padding: 72px 16px 32px;
    min-height: 460px;
  }

  .hero h1 {
    font-size: clamp(26px, 9vw, 42px);
  }

  .hero-stats {
    gap: 16px;
  }

  /* ── Cards full-width ────────────────────────────────────── */
  .property-card {
    border-radius: 14px;
  }

  .card-img {
    height: 180px;
  }

  /* ── Section ─────────────────────────────────────────────── */
  .section {
    padding: 36px 14px;
  }

  /* ── Modal full-screen ───────────────────────────────────── */
  .modal-overlay {
    align-items: flex-end;
  }

  .modal {
    margin: 0;
    border-radius: 24px 24px 0 0;
    padding: 24px 18px 32px;
    max-height: 92vh;
    width: 100%;
  }

  /* ── Listing facts: single column on tiny screens ─────────── */
  .listing-facts-grid {
    grid-template-columns: 1fr;
  }

  /* ── Meglere stacked ─────────────────────────────────────── */
  .meglere-sidebar {
    height: 45vh;
  }

  .meglere-map-container {
    height: 55vh;
  }

  /* ── Search filters full width ───────────────────────────── */
  .search-filters select {
    flex: 1 1 100%;
  }

  /* ── Toast ───────────────────────────────────────────────── */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 24px;
    text-align: center;
  }
}

/* Hamburger hidden on desktop */
.nav-hamburger { display: none;
}

/* Ensure hamburger bars are always visible */
.nav-hamburger .hamburger-icon span {
  background: #1d1d1f;
}

/* ── Mobile Nav Drawer (hamburger menu) ─────────────────────── */
.nav-hamburger {
  width: 32px;
  height: 32px;
  display: flex;
  cursor: pointer;
  z-index: 2100;
  position: relative;
}

.hamburger-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-hamburger.open .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-drawer {
  position: fixed;
  top: 52px;
  /* Starts right below the nav bar */
  left: 0;
  width: 100%;
  height: calc(100vh - 52px);
  background: rgba(245, 245, 247, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 150;
  /* Below the nav bar (200), but above content */
  /* Remove translate sliding in favor of opacity fade */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 40px 40px;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer ul {
  list-style: none;
  /* Remove bullet points */
  padding: 0;
  margin: 0;
}

.mobile-nav-drawer a {
  font-size: 24px;
  /* Slightly smaller for Apple style */
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  /* Apple-style dividers */
  opacity: 0;
  transform: translateY(-8px);
  /* Short drop down instead of coming from bottom */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.mobile-nav-drawer.open a {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for Apple feel */
.mobile-nav-drawer.open a:nth-child(1) {
  transition-delay: 0.05s;
}

.mobile-nav-drawer.open a:nth-child(2) {
  transition-delay: 0.10s;
}

.mobile-nav-drawer.open a:nth-child(3) {
  transition-delay: 0.15s;
}

.mobile-nav-drawer.open a:nth-child(4) {
  transition-delay: 0.20s;
}

.mobile-nav-drawer.open a:nth-child(5) {
  transition-delay: 0.25s;
}

.mobile-nav-drawer.open a:nth-child(6) {
  transition-delay: 0.30s;
}

.mobile-nav-drawer.open a:nth-child(7) {
  transition-delay: 0.35s;
}

.mobile-nav-drawer.open a:nth-child(8) {
  transition-delay: 0.40s;
}

.mobile-nav-drawer.open a:nth-child(9) {
  transition-delay: 0.45s;
}

.mobile-nav-drawer.open a:nth-child(10) {
  transition-delay: 0.50s;
}

.mobile-nav-drawer.open a:nth-child(11) {
  transition-delay: 0.55s;
}

.mobile-nav-drawer.open a:nth-child(12) {
  transition-delay: 0.60s;
}

.mobile-drawer-auth {
  margin-top: 32px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.65s;
}

.mobile-nav-drawer.open .mobile-drawer-auth {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-overlay {
  display: none !important;
  /* Not needed anymore */
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex !important;
  }

  /* Hide desktop login button on mobile (it's in drawer) */
  .nav-actions>button,
  .nav-actions>span {
    display: none !important;
  }
}

@media (min-width: 769px) {

  .nav-hamburger,
  .mobile-nav-drawer {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════
   ARTIKLER & INNSIKT PAGE
════════════════════════════════════════════════════ */
.art-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* Header */
.art-header {
  text-align: center;
  margin-bottom: 52px;
}

.art-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text1);
  margin: 12px 0 16px;
  line-height: 1.1;
}

.art-lead {
  font-size: 17px;
  color: var(--text3);
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Category filter — Airbnb style */
.art-cats {
  position: static;
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.art-cats::-webkit-scrollbar {
  display: none;
}

.art-cat {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text3);
  padding: 12px 20px 14px;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.art-cat:hover {
  color: var(--text1);
}

.art-cat.active {
  color: var(--text1);
  border-bottom-color: var(--text1);
  font-weight: 600;
}

/* Grid */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Featured card spans 2 cols */
.art-card.art-featured {
  grid-column: span 2;
}

.art-card.art-featured .art-img {
  height: 360px;
}

/* Card base */
.art-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.art-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Image */
.art-img-wrap {
  position: relative;
  overflow: hidden;
}

.art-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
  transition: transform 0.35s ease;
}

.art-card:hover .art-img {
  transform: scale(1.04);
}

/* Badge */
.art-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Body */
.art-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.art-card-title {
  font-size: 17px;
  font-weight: 660;
  color: var(--text1);
  margin: 0 0 10px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.art-featured .art-card-title {
  font-size: 22px;
}

.art-excerpt {
  font-size: 14px;
  color: var(--text3);
  line-height: 1.55;
  margin: 0 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.art-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.art-tag {
  font-size: 12px;
  color: var(--text3);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.art-date {
  font-size: 12px;
  color: var(--text3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .art-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .art-card.art-featured {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .art-wrap {
    padding: 32px 16px 80px;
  }

  .art-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .art-card.art-featured {
    grid-column: span 1;
  }

  .art-card.art-featured .art-img {
    height: 220px;
  }

  .art-cat {
    padding: 10px 14px 12px;
    font-size: 13px;
  }
}

/* ════════════════════════════════════════════════════
   GLOBAL FOOTER (shown on every page)
════════════════════════════════════════════════════ */
/* The footer is now outside .page divs so it always shows */
body>footer {
  display: block;
}


/* ════════════════════════════════════════════════════
   APPLE NEWSROOM-STYLE ARTICLE READER
════════════════════════════════════════════════════ */
.newsroom-article {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Back button */
.newsroom-back {
  margin-bottom: 40px;
}

.newsroom-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}

.newsroom-back-btn:hover {
  opacity: 0.7;
}

/* Article header */
.newsroom-header {
  margin-bottom: 40px;
}

.newsroom-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.newsroom-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text1);
  margin: 0 0 20px;
}

.newsroom-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text2);
  font-weight: 400;
  margin: 0 0 24px;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
}

.newsroom-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text3);
}

.newsroom-dot {
  color: var(--text3);
}

/* Hero image */
.newsroom-hero-wrap {
  margin: 0 -24px 48px;
}

.newsroom-hero {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.newsroom-caption {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  margin: 10px 24px 0;
  font-style: italic;
}

/* Body typography */
.newsroom-body {
  font-size: 17px;
  line-height: 1.78;
  color: var(--text1);
}

.newsroom-body p {
  margin: 0 0 1.5em;
}

.newsroom-body h2 {
  font-size: 1.4rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: var(--text1);
  margin: 2.4em 0 0.6em;
  line-height: 1.25;
}

.newsroom-body h3 {
  font-size: 1.1rem;
  font-weight: 660;
  color: var(--text1);
  margin: 1.8em 0 0.4em;
}

.newsroom-body ol,
.newsroom-body ul {
  margin: 0 0 1.5em 1.2em;
  padding: 0;
}

.newsroom-body li {
  margin-bottom: 0.5em;
}

.newsroom-body strong {
  font-weight: 680;
}

/* Divider */
.newsroom-share {
  background: var(--bg);
  color: var(--text1);
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1.5px solid var(--border);
}

.newsroom-share-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}

.newsroom-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.share-btn {
  display: inline-flex;
  background: var(--surface) !important;
  color: var(--text1) !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text1);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.share-btn:hover {
  background: var(--bg);
  border-color: var(--text3);
  transform: translateY(-1px);
}

.share-btn.copied {
  background: #e8f5e9;
  border-color: #2e7d32;
  color: #2e7d32;
}

/* Related CTA */
.newsroom-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .newsroom-article {
    padding: 32px 16px 60px;
  }

  .newsroom-hero-wrap {
    margin: 0 -16px 36px;
  }

  .newsroom-body {
    font-size: 16px;
  }

  .newsroom-lead {
    font-size: 17px;
  }

  .newsroom-cta {
    flex-direction: column;
  }

  .newsroom-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Footer visibility controlled by JS via body > footer display style */
body>footer {
  display: block;
}

body.hide-footer>footer {
  display: none !important;
}


/* ════════════════════════════════════════════════════
   GOOGLE ADSENSE — PREMIUM AD LAYOUT
   3-column: [left sidebar ad] [article] [right sidebar ad]
════════════════════════════════════════════════════ */

/* Outer 3-col grid */
.ad-layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
  padding: 0 16px;
}

/* Article stays centred, sidebars auto-place */
.ad-layout>article {
  min-width: 0;
  /* prevents overflow */
}

/* ── Sidebar ad containers ── */
.ad-sidebar {
  position: sticky;
  top: 80px;
  /* below the fixed nav */
  width: 160px;
  padding-top: 48px;
  /* align roughly with article top */
}

.ad-sidebar--left {
  order: -1;
}

.ad-sidebar--right {
  order: 1;
}

.ad-sidebar-inner {
  background: var(--surface);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ── Shared ad wrapper styles ── */
.ad-wrap {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 12px 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ad-wrap--top {
  margin: 0 0 36px;
}

.ad-wrap--inline {
  margin: 36px 0;
}

.ad-wrap--bottom {
  margin: 36px 0 0;
}

/* ── "Annonse" label ── */
.ad-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: center;
  margin-bottom: 6px;
  opacity: 0.7;
}

.ad-sidebar-inner .ad-label {
  margin-bottom: 8px;
}

/* ── Responsive: collapse sidebars on smaller screens ── */
@media (max-width: 1100px) {
  .ad-layout {
    grid-template-columns: 1fr;
  }

  /* Hide sidebars — ads only top/bottom on smaller screens */
  .ad-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .ad-layout {
    padding: 0 0;
  }

  .ad-wrap {
    border-radius: 0;
    margin-left: -16px;
    margin-right: -16px;
  }

  .ad-wrap--top {
    margin-bottom: 24px;
  }

  .ad-wrap--bottom {
    margin-top: 24px;
  }
}

/* ── AdSense ins element min-height so it doesn't collapse ── */
.ad-wrap .adsbygoogle {
  min-height: 80px;
}

.ad-sidebar-inner .adsbygoogle {
  min-height: 300px;
  width: 144px;
}

/* ═════════════════════════════════════════════
   MOBILE MAP OPTIMIZATIONS (Rolex Style)
═════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hide the footer entirely on map pages */
  body:has(#page-map.active) footer,
  body:has(#page-meglere.active) footer {
    display: none !important;
  }

  /* Force the map container to fill the screen minus nav */
  .map-container-wrap,
  .meglere-layout {
    height: calc(100vh - 52px) !important;
    position: relative;
    overflow: hidden;
    grid-template-columns: 1fr !important;
    display: block !important;
  }

  .meglere-map-container {
    height: 100%;
    width: 100%;
  }

  #main-map,
  #meglere-map {
    height: 100% !important;
    width: 100% !important;
  }

  /* Make the overlays floating bottom-sheets */
  .map-overlay-panel,
  .meglere-sidebar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 50vh;
    overflow-y: auto;
    border: none;
    margin: 0;
    padding: 20px 16px;
    top: auto !important;
    /* Override standard desktop positioning */
  }

  /* Add a drag handle indicator for the bottom-sheet feeling */
  .map-overlay-panel::before,
  .meglere-sidebar::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border2);
    border-radius: 4px;
    margin: 0 auto 16px auto;
  }

  /* Adjust internal spacing for compactness */
  .map-search-bar {
    margin-bottom: 12px;
  }

  .map-poi-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .map-poi-btn {
    white-space: nowrap;
  }

  /* Compact the meglere card list inside the drawer */
  .meglere-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }

  .megler-card {
    min-width: 80vw;
    scroll-snap-align: center;
    margin-bottom: 0;
  }

  /* Move the map switchers up so they aren't hidden by the sheet */
  .map-style-switcher {
    bottom: calc(50vh + 20px) !important;
    left: 10px !important;
  }

  .map-walkaround-btn {
    bottom: calc(50vh + 20px) !important;
    right: 10px !important;
  }
}

/* ════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS (HOMEPAGE & GLOBAL)
════════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* 1. Hero & Search */
  .hero-content {
    padding: 60px 16px 20px !important;
  }

  .hero-title {
    font-size: 34px !important;
    margin-bottom: 24px !important;
  }

  .hero-sub {
    font-size: 15px !important;
    padding: 0 10px !important;
    line-height: 1.5 !important;
  }

  .search-box {
    padding: 16px !important;
    border-radius: 20px !important;
    width: 92% !important;
    margin: 0 auto !important;
  }

  .search-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding-bottom: 4px !important;
    justify-content: flex-start !important;
  }

  .search-tab {
    padding: 10px 18px !important;
    font-size: 14px !important;
    min-width: 90px !important;
    flex: none !important;
  }

  .search-row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .hero-search-wrap {
    width: 100% !important;
    padding: 14px 18px !important;
  }

  .search-btn,
  .search-btn-ai {
    width: 100% !important;
    padding: 16px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 2. Property Cards (Emoji/Empty state height) */
  .prop-img:not([style*="background: url"]) {
    height: 140px !important;
    font-size: 44px !important;
  }

  .prop-price {
    font-size: 22px !important;
  }

  .prop-meta {
    gap: 10px !important;
  }

  /* 3. Navigation Drawer & Ergonomics */
  .mobile-nav-drawer {
    padding-bottom: constant(safe-area-inset-bottom) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .mobile-nav-drawer .nav-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    padding: 20px !important;
  }

  .mobile-nav-drawer a {
    padding: 10px 0 !important;
    font-size: 15px !important;
  }

  /* Prevent overlap with Chatbot button */
  body {
    padding-bottom: 80px !important;
  }

  .chatbot-toggle {
    bottom: 24px !important;
    right: 16px !important;
  }
}

/* ─── BOOST / ADS TAB ─── */
.boost-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.boost-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px 24px;
  cursor: pointer;
  position: relative;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.boost-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 113, 227, .12);
  transform: translateY(-3px);
}

.boost-card.selected {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 113, 227, .18);
}

.boost-card-featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, #f0f7ff 0%, #fff 60%);
}

.boost-badge-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.boost-badge-best {
  background: #0071e3;
}

.boost-badge-premium {
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.boost-icon {
  font-size: 36px;
  margin: 8px 0 10px;
}

.boost-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.boost-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.03em;
}

.boost-duration {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

.boost-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: left;
  width: 100%;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.boost-features li {
  color: var(--text);
}

.boost-select-btn {
  width: 100%;
  margin-top: auto;
}

.ads-listing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ads-listing-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all .15s;
  background: var(--surface);
}

.ads-listing-item:hover,
.ads-listing-item.selected {
  border-color: var(--accent);
  background: #f0f7ff;
}

.ads-listing-thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.ads-listing-info {
  flex: 1;
}

.ads-listing-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.ads-listing-meta {
  font-size: 13px;
  color: var(--text2);
}

.ads-listing-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  font-size: 12px;
}

.ads-listing-item.selected .ads-listing-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ads-active-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.ads-active-badge {
  background: linear-gradient(90deg, #0071e3, #0051a3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.ads-active-info {
  flex: 1;
}

.ads-active-title {
  font-weight: 600;
  font-size: 15px;
}

.ads-active-meta {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}

.ads-active-expires {
  font-size: 12px;
  color: var(--text2);
  text-align: right;
}

@media(max-width:700px) {
  .boost-packages {
    grid-template-columns: 1fr;
  }
}
/* ─── MESSAGES PAGE FULL-HEIGHT FIX ─── */
#page-messages.active {
  height: 100vh;
  min-height: unset;
  overflow: hidden;
  padding-top: 52px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#page-messages.active .messages-layout {
  flex: 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

#page-messages.active .chat-area {
  min-height: 0;
}

#page-messages.active .chat-messages {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
}

  display: none;
}

body:has(#page-messages.active) footer { display: none; }
body:has(#page-messages.active) { overflow: hidden; }
body:has(#page-messages.active) { padding-bottom: 0 !important; }

/* ─── CARD CAROUSEL ARROWS ─── */
.card-arr {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,0.88); border:none; border-radius:50%;
  width:32px; height:32px; font-size:20px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity .2s; z-index:2; color:#1d1d1f;
}
.prop-img:hover .card-arr { opacity:1; }
.card-arr-l { left:8px; }
.card-arr-r { right:8px; }
.prop-img { cursor:pointer; }
/* ─── LIGHTBOX ─── */
#lightbox.open { display:flex !important; }
.listing-hero { cursor:pointer; }

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
  height: 16px;
  pointer-events: none;
}

/* ─── MOBILE LISTING FIXES ─── */
@media(max-width:600px){
  .listing-hero { height:220px; }
  .listing-layout { padding:16px 12px 48px; gap:16px; }
  .listing-section { padding-bottom:20px; margin-bottom:20px; }
  .listing-section-title { font-size:17px; }
  .listing-gallery-img { height:120px; min-width:160px; max-width:calc(100vw - 48px); }
  .listing-facts-grid { grid-template-columns:1fr; gap:12px; }
  .listing-sidebar-card { padding:16px; border-radius:12px; }
  .sidebar-price-main { font-size:20px; }
  .listing-stats-bar { padding:12px; }
  .l-kpi-num { font-size:16px; }
  .listing-main-price { font-size:22px; }
  .listing-desc-text { font-size:14px; }
  #page-listing { overflow-x:hidden; }
  .listing-action-btn { flex:1 1 auto; min-width:80px; font-size:12px; padding:6px 10px; }
}

/* ═══ MOBILE FIXES v9 ═══ */
@media(max-width:600px){
  #page-listing{overflow-x:hidden}
  .listing-layout{padding:12px 12px 60px;max-width:100vw;overflow-x:hidden}
  .listing-facts-grid{grid-template-columns:1fr !important}
  .listing-fact-list li{flex-wrap:wrap}
  .price-analysis-grid{grid-template-columns:1fr !important}
  .listing-gallery-img{height:110px;min-width:140px;max-width:calc(100vw - 40px)}
  .listing-sidebar-col,.listing-sidebar-card{width:100%}
  .listing-sidebar-card{padding:14px}
  .listing-main-price{font-size:22px}
  .listing-desc-text{font-size:14px;word-break:break-word}
  .filters-bar{position:static !important;box-shadow:none}
  .chat-area{position:fixed;top:52px;left:0;right:0;height:calc(100dvh - 52px);z-index:10001;background:var(--bg);display:none;flex-direction:column;overflow:hidden}
  .chat-area.mobile-open{display:flex}
  .chat-messages{flex:1;overflow-y:auto;padding:16px 16px 70px 16px;min-height:0}
  .chat-input-row{position:absolute;bottom:0;left:0;right:0;padding:10px 12px;background:var(--surface);border-top:1px solid var(--border);display:flex;gap:10px;z-index:2}
  .chat-header{padding:12px 16px}
  .msg-list{height:calc(100vh - 52px)}
}
.mobile-back-btn{display:none}
@media(max-width:600px){.mobile-back-btn{display:block}}
@media(max-width:600px){body:has(.chat-area.mobile-open) .chatbot-toggle{display:none !important}body:has(.chat-area.mobile-open) .chatbot-window{display:none !important}}

/* Avatar image support */
.avatar-big { position: relative; }
.avatar-big.has-img { background: none; font-size: 0; padding: 0; overflow: hidden; }
.avatar-big.has-img img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
#avatar-actions.visible { display: flex !important; }
/* Chat message avatars */
.chat-bubble-wrap { display:flex; align-items:flex-end; gap:8px; margin-top:10px; }
.chat-bubble-wrap.wrap-out { flex-direction:row-reverse; }
.chat-avatar { width:28px; height:28px; border-radius:50%; background:var(--accent); color:#fff; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
.chat-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.chat-bubble-wrap .chat-bubble { margin-top:0; }
