*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-color: var(--accent) transparent;
  scrollbar-width: thin;
}

:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --surface2: #fbfbfd;
  --text: #1d1d1f;
  --text2: #3a3a3c;
  --text3: #4a4a4f;
  --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 {
  /* No global smooth scroll: it animated the modal scroll-lock restore
     (closeModal does window.scrollTo(0, savedScroll) after position:fixed
     clamped the page to top), so the background visibly scrolled when opening/
     closing modals. Instant restore = no movement. Explicit behavior:'smooth'
     JS calls (gallery, etc.) still animate. */
  background: var(--bg);
  /* clip sub-pixel horizontal overflow from full-bleed mobil-feed (calc(50%-50vw)); root-niva sa edge-to-edge-bilder ikke beskjaeres; clip bevarer position:sticky */
  overflow-x: clip;
}

body {
  touch-action: manipulation;
  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: clip;
  line-height: 1.47059;
  letter-spacing: -0.022em;
}




/* ─── PROMO BANNER ─── */
#promo-banner{position:fixed;top:0;left:0;right:0;z-index:201;height:40px;background:linear-gradient(90deg,rgb(228,198,120) 0%,rgb(242,229,194) 50%,rgb(232,209,153) 100%);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;color:#1a1a1a;}
.promo-banner-inner{display:flex;align-items:center;gap:16px;}
.promo-banner-cta{color:#1a1a1a;text-decoration:underline;font-weight:500;white-space:nowrap;}@media(min-width:901px){.promo-banner-cta{background:#000;color:rgb(226,227,227);padding:7px 12px;border-radius:4px;font-size:12px;font-weight:500;text-decoration:none;}}
@media(max-width:900px){#promo-banner{font-size:13px;}}
/* ─── NAV ─── */
body > nav {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  z-index: 200;
  height: 48px;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: none;
  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: 24px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap
}

.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: 88px;
  min-height: 100vh;
}

.page.active {
  display: block;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@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: 1000000;
  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
}

/* Språk (language) modal: fullscreen on mobile. Overrides the inline
   max-width:800px;width:95% so it fills the viewport; scrolls the long list. */
@media (max-width: 900px) {
  #modal-language .modal {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 60px 18px 24px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: none !important;
  }
}

/* ─── 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,
.modal 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;
  box-sizing: border-box;
}

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

.form-group textarea,
.modal 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: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 12px;
  background: linear-gradient(180deg, #e8eaf0 0%, #f5f5f7 60%);
  position: relative;
  overflow: clip visible;
  z-index: 100;
}

.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;
}

.hero h1 {
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.hero h1 span {
  background: linear-gradient(110deg, #0071e3 0%, #a855f7 52%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #0071e3;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(13px, 1.6vw, 15px);
  color: var(--text2);
  max-width: none;
  line-height: 1.5;
  margin-top: 18px;
  margin-bottom: 0;
  font-weight: 300;
}

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

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

/* ─── SEARCH BOX ─── */
.search-box {
  width: 100%;
  max-width: 720px;
  background: transparent;
  border-radius: 50px;
  padding: 0;
}

.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: 8px;
  background: #fff;
  border-radius: 50px;
  padding: 10px 18px;
  box-shadow: 0 1px 12px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.08);
  transition: box-shadow .2s;
}

.search-input-wrap:focus-within {
  box-shadow: 0 2px 20px rgba(0,0,0,.15), 0 0 0 2px var(--accent);
}

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

.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)
}

/* AI button sitting inside the search field */
.ai-btn-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  transition: opacity .15s, transform .15s;
  position: relative;
  overflow: visible;
  z-index: 2; /* Create stacking context so z-index: -1 limbs don't go behind search bar */
}

.glitter-particle {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100002;
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255,255,255,0.9);
  will-change: transform;
}

.ai-btn-inline:hover {
  opacity: .95;
}

.ai-limbs {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

/* Capsen! */
.ai-cap {
  position: absolute;
  top: -18px;
  left: 50%;
  margin-left: -22px;
  width: 44px;
  height: 22px;
  background: 
    linear-gradient(90deg, transparent 38%, #00205b 38%, #00205b 48%, transparent 48%), /* Vertical blue */
    linear-gradient(90deg, transparent 33%, #ffffff 33%, #ffffff 53%, transparent 53%), /* Vertical white */
    linear-gradient(180deg, transparent 35%, #00205b 35%, #00205b 60%, transparent 60%), /* Horizontal blue */
    linear-gradient(180deg, transparent 25%, #ffffff 25%, #ffffff 70%, transparent 70%), /* Horizontal white */
    #ba0c2f; /* Red base */
  background-size: 100% 100%;
  border-radius: 22px 22px 0 0;
  z-index: 10;
  transform-origin: bottom center;
  transform: scale(0); /* Skjult som standard */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-cap::after {
  /* Skjermen på capsen (peker til høyre) */
  content: '';
  position: absolute;
  bottom: 0;
  right: -16px;
  width: 26px;
  height: 8px;
  background: #ba0c2f; /* Rød brim */
  border-radius: 0 8px 8px 0;
}
.ai-btn-inline.dancing-intro .ai-cap {
  transform: scale(1);
  animation: ai-intro-cap 0.8s infinite ease-in-out;
}
.ai-btn-inline.dancing-crazy .ai-cap {
  transform: scale(1);
  animation: ai-dance-cap 3.2s infinite ease-in-out;
}

@keyframes ai-dance-cap {
  0%, 20% { transform: scale(1) rotate(15deg); } 
  25% { transform: scale(1) translateY(2px) rotate(15deg); } 
  35%, 45% { transform: scale(1) translateY(10px); } /* Hat flies relative to body during flip */
  50%, 60% { transform: scale(1) translateY(0) rotate(10deg); }
  65%, 85% { transform: scale(1) translateY(4px) rotate(-15deg); } /* Pulled down in pose */
  95%, 100% { transform: scale(1) rotate(15deg); }
}

/* Gullsmykket (Chains) */
.ai-chain {
  position: absolute;
  top: 4px; /* Henger akkurat fra toppen (nakken) */
  left: 0; /* Dekker hele bredden */
  width: 100%;
  height: 22px; /* Henger nedover forsiden */
  border-bottom: 4px dashed #fbbf24;
  border-radius: 0 0 50% 50%;
  z-index: 10; /* Ligger foran teksten! */
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}
.ai-chain::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: -1px;
  border-bottom: 1px solid #ca8a04;
  border-radius: 0 0 50% 50%;
}
.ai-medallion {
  position: absolute;
  bottom: -9px;
  left: 50%;
  margin-left: -9px;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 30% 30%, #fde047, #b45309);
  color: #451a03;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 0 2px #fff;
  z-index: 11;
}
.ai-btn-inline.dancing-intro .ai-chain {
  transform: scale(1);
  animation: ai-intro-chain 0.8s infinite ease-in-out;
  transform-origin: top center;
}
.ai-btn-inline.dancing-crazy .ai-chain {
  transform: scale(1);
  animation: ai-chain-swing 3.2s infinite ease-in-out;
  transform-origin: top center;
}

@keyframes ai-chain-swing {
  0%, 20% { transform: scale(1) translateY(0); }
  25% { transform: scale(1) translateY(5px); } /* Squat */
  35%, 45% { transform: scale(1) translateY(-20px); } /* Flies up in flip */
  50%, 60% { transform: scale(1) rotate(20deg); }
  65%, 85% { transform: scale(1) translateY(10px); } /* Heavy impact */
  95%, 100% { transform: scale(1) translateY(0); }
}

.ai-limb {
  position: absolute;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: 4px;
  z-index: -1;
}

/* Hender og føtter */
.ai-limb::after {
  content: '';
  position: absolute;
  background: #ec4899;
}

/* Arms */
.ai-limb.arm.left {
  width: 18px; height: 8px;
  left: -18px; top: 50%; margin-top: -4px;
  transform-origin: right center;
  transform: rotate(90deg) scaleX(0);
  z-index: 10;
}
.ai-limb.arm.left::after {
  width: 10px; height: 10px;
  border-radius: 50%;
  left: -2px; top: 50%;
  transform: translateY(-50%);
}
.ai-btn-inline.dancing-intro .ai-limb.arm.left {
  animation: ai-intro-arms-left 0.8s infinite ease-in-out;
}
.ai-btn-inline.dancing-crazy .ai-limb.arm.left {
  animation: ai-dance-arms-left 3.2s infinite ease-in-out;
}

.ai-limb.arm.right {
  width: 18px; height: 8px;
  right: -18px; top: 50%; margin-top: -4px;
  transform-origin: left center;
  transform: rotate(-90deg) scaleX(0);
  z-index: 10;
}
.ai-limb.arm.right::after {
  width: 10px; height: 10px;
  border-radius: 50%;
  right: -2px; top: 50%;
  transform: translateY(-50%);
}
.ai-btn-inline.dancing-intro .ai-limb.arm.right {
  animation: ai-intro-arms-right 0.8s infinite ease-in-out;
}
.ai-btn-inline.dancing-crazy .ai-limb.arm.right {
  animation: ai-dance-arms-right 3.2s infinite ease-in-out;
}

/* Legs */
.ai-limb.leg {
  width: 8px; height: 18px;
  bottom: -16px;
  z-index: -1;
}
.ai-limb.leg.left {
  left: 30%;
  transform-origin: top center;
  transform: scaleY(0);
}
.ai-limb.leg.left::after {
  width: 14px; height: 7px;
  border-radius: 3px;
  bottom: -2px; left: -6px;
}
.ai-btn-inline.dancing-intro .ai-limb.leg.left {
  animation: ai-intro-legs-left 0.8s infinite ease-in-out;
}
.ai-btn-inline.dancing-crazy .ai-limb.leg.left {
  animation: ai-dance-legs-left 3.2s infinite ease-in-out;
}

.ai-limb.leg.right {
  right: 30%;
  transform-origin: top center;
  transform: scaleY(0);
}
.ai-limb.leg.right::after {
  width: 14px; height: 7px;
  border-radius: 3px;
  bottom: -2px; right: -6px;
}
.ai-btn-inline.dancing-intro .ai-limb.leg.right {
  animation: ai-intro-legs-right 0.8s infinite ease-in-out;
}
.ai-btn-inline.dancing-crazy .ai-limb.leg.right {
  animation: ai-dance-legs-right 3.2s infinite ease-in-out;
}

/* Danse-animasjoner! */
.ai-btn-inline::after {
  content: '';
  position: absolute;
  top: -30px; left: -20px; right: -20px; bottom: -30px;
  z-index: -2;
}

/* INTRO DANCE (TRICKS, SPINS, TAPPING, JUMPING) */
.ai-btn-inline.dancing-intro { animation: ai-intro-body 4.35s infinite ease-in-out !important; }
.ai-btn-inline.dancing-intro .ai-limb.arm.left { animation: ai-intro-arms-left 4.35s infinite ease-in-out; }
.ai-btn-inline.dancing-intro .ai-limb.arm.right { animation: ai-intro-arms-right 4.35s infinite ease-in-out; }
.ai-btn-inline.dancing-intro .ai-limb.leg.left { animation: ai-intro-legs-left 4.35s infinite ease-in-out; }
.ai-btn-inline.dancing-intro .ai-limb.leg.right { animation: ai-intro-legs-right 4.35s infinite ease-in-out; }
.ai-btn-inline.dancing-intro .ai-cap { animation: ai-intro-cap 4.35s infinite ease-in-out; }
.ai-btn-inline.dancing-intro .ai-chain { animation: ai-intro-chain 4.35s infinite ease-in-out; }

@keyframes ai-intro-body {
  0%   { transform: translateY(-16px) rotate(0deg); }
  10%  { transform: translateY(-40px) rotate(360deg); } /* Jump & Spin */
  15%  { transform: translateY(-16px) rotate(360deg) scale(1.1, 0.9); } /* Land and squat */
  20%  { transform: translateY(-16px) rotate(360deg); }
  
  30%  { transform: translateY(-16px) rotate(380deg); } /* Lean right */
  40%  { transform: translateY(-16px) rotate(340deg); } /* Lean left */
  
  50%  { transform: translateY(-50px) rotate(720deg); } /* Big double spin jump */
  55%  { transform: translateY(-16px) rotate(720deg) scale(1.1, 0.9); } /* Land */
  
  65%  { transform: translateY(-24px) rotate(720deg); } /* Little hop */
  70%  { transform: translateY(-16px) rotate(720deg); }
  
  80%  { transform: translateY(-20px) rotate(750deg); } /* Tilt hop right */
  90%  { transform: translateY(-20px) rotate(690deg); } /* Tilt hop left */
  
  100% { transform: translateY(-16px) rotate(720deg); } /* Back to neutral */
}

@keyframes ai-intro-arms-left {
  0%   { transform: rotate(90deg) scaleX(1); }
  10%  { transform: rotate(180deg) scaleX(1.5); } /* Hands up during jump */
  15%  { transform: rotate(0deg) scaleX(1); } /* Hands down on land */
  20%  { transform: rotate(-45deg) translateY(-12px); } /* Touch hat */
  40%  { transform: rotate(-45deg) translateY(-12px); }
  50%  { transform: rotate(200deg) scaleX(1.5); } /* Hands up! */
  60%  { transform: rotate(90deg) scaleX(1); }
  70%  { transform: rotate(140deg); } /* Pointing */
  100% { transform: rotate(90deg) scaleX(1); }
}

@keyframes ai-intro-arms-right {
  0%   { transform: rotate(-90deg) scaleX(1); }
  10%  { transform: rotate(-180deg) scaleX(1.5); } /* Hands up */
  15%  { transform: rotate(0deg) scaleX(1); } /* Hands down */
  30%  { transform: rotate(-140deg) scaleX(1.5); } /* Pointing */
  40%  { transform: rotate(-140deg) scaleX(1.5); }
  50%  { transform: rotate(-200deg) scaleX(1.5); } /* Hands up! */
  60%  { transform: rotate(-90deg) scaleX(1); }
  80%  { transform: rotate(-45deg); } /* Wave */
  100% { transform: rotate(-90deg) scaleX(1); }
}

@keyframes ai-intro-legs-left {
  0%   { transform: scaleY(1) translateY(0); }
  10%  { transform: scaleY(0.6) translateY(-5px) rotate(20deg); } /* Tucked in jump */
  15%  { transform: scaleY(0.8); } /* Squat */
  20%  { transform: scaleY(1); }
  30%  { transform: scaleY(1) translateY(0); } /* Tapping! */
  32%  { transform: scaleY(0.8) translateY(-6px) rotate(-15deg); } /* Tap up */
  34%  { transform: scaleY(1) translateY(0); } /* Tap down */
  36%  { transform: scaleY(0.8) translateY(-6px) rotate(-15deg); } /* Tap up */
  38%  { transform: scaleY(1) translateY(0); } /* Tap down */
  50%  { transform: scaleY(0.5) translateY(-5px); } /* Double spin jump */
  60%  { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}

@keyframes ai-intro-legs-right {
  0%   { transform: scaleY(1) translateY(0); }
  10%  { transform: scaleY(0.6) translateY(-5px) rotate(-20deg); }
  15%  { transform: scaleY(0.8); }
  20%  { transform: scaleY(1); }
  40%  { transform: scaleY(1) translateY(0); }
  42%  { transform: scaleY(0.8) translateY(-6px) rotate(15deg); } /* Tap right leg */
  44%  { transform: scaleY(1) translateY(0); }
  46%  { transform: scaleY(0.8) translateY(-6px) rotate(15deg); }
  48%  { transform: scaleY(1) translateY(0); }
  50%  { transform: scaleY(0.5) translateY(-5px); }
  60%  { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}

@keyframes ai-intro-cap {
  0%, 100% { transform: scale(1) translateY(0) rotate(15deg); }
  10% { transform: scale(1) translateY(8px) rotate(-10deg); } /* Flips up during jump */
  15% { transform: scale(1) translateY(4px) rotate(15deg); }
}

@keyframes ai-intro-chain {
  0%, 100% { transform: scale(1) rotate(15deg) translateX(2px); }
  10% { transform: scale(1) translateY(-10px) rotate(-20deg); } /* Chain flies up in jump */
  15% { transform: scale(1) translateY(5px) rotate(15deg); } /* Heavy land */
  30% { transform: scale(1) rotate(-15deg) translateX(-4px); } /* Swings */
  40% { transform: scale(1) rotate(15deg) translateX(4px); }
}

@keyframes ai-dance-body {
  0% { transform: translateY(-16px) scale(1); }
  10% { transform: translateY(-8px) scale(1.05, 0.95); }
  20% { transform: translateY(-16px) scale(1); }
  
  25% { transform: translateY(-5px) scale(1.1, 0.9); } /* Prep jump */
  
  35% { transform: translateY(-50px) rotate(-180deg); } /* Jump & Flip */
  45% { transform: translateY(-50px) rotate(-360deg); }
  45.1% { transform: translateY(-50px) rotate(0deg); }
  
  50%, 60% { transform: translateY(-30px) scale(1.1); } /* Float / Matrix time */
  
  65% { transform: translateY(5px) scale(1.2, 0.8); } /* Heavy impact / Superhero land */
  
  70%, 85% { transform: translateY(0px) scale(1); } /* Pose */
  
  95%, 100% { transform: translateY(-16px) scale(1); } /* Stand up */
}

@keyframes ai-dance-arms-left {
  0%, 20% { transform: rotate(90deg) scaleX(1); } 
  25% { transform: rotate(140deg); } 
  35%, 45% { transform: rotate(0deg); } /* Arms out during flip */
  50%, 60% { transform: rotate(45deg) scaleX(1.5); } /* Matrix Punch */
  65%, 85% { transform: rotate(140deg) translateY(5px); } /* Fist to ground */
  95%, 100% { transform: rotate(90deg) scaleX(1); }
}

@keyframes ai-dance-arms-right {
  0%, 20% { transform: rotate(-90deg) scaleX(1); } 
  25% { transform: rotate(-140deg); } 
  35%, 45% { transform: rotate(0deg); } 
  50%, 60% { transform: rotate(-135deg) scaleX(1.5); } /* Arm pulled back */
  65%, 85% { transform: rotate(-20deg) translateY(-10px); } /* Arm up in air */
  95%, 100% { transform: rotate(-90deg) scaleX(1); }
}

@keyframes ai-dance-legs-left {
  0%, 20% { transform: scaleY(1); }
  25% { transform: scaleY(0.5); } /* Squat */
  35%, 45% { transform: scaleY(0.8) rotate(45deg); } /* Tucked in flip */
  50%, 60% { transform: scaleY(1) rotate(60deg) translateY(-10px); } /* Mid-air split */
  65%, 85% { transform: scaleY(0.6) rotate(30deg); } /* Kneeling pose */
  95%, 100% { transform: scaleY(1); }
}

@keyframes ai-dance-legs-right {
  0%, 20% { transform: scaleY(1); }
  25% { transform: scaleY(0.5); }
  35%, 45% { transform: scaleY(0.8) rotate(-45deg); } 
  50%, 60% { transform: scaleY(1) rotate(-60deg) translateY(-10px); } /* Mid-air split */
  65%, 85% { transform: scaleY(1) rotate(-20deg); } /* Straight leg out */
  95%, 100% { transform: scaleY(1); }
}

.ai-btn-inline .ai-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
}

.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: none;
  margin-bottom: 10px
}

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

/* PC: smaller "Siste annonser" heading on the homepage (only section-title there) */
@media (min-width: 901px) {
  #page-home .section-title { font-size: 26px; }
}

.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
}

@keyframes teslaLift {
  from { transform: translateY(16px); }
  to { transform: translateY(0); }
}

.property-card {
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all .35s cubic-bezier(.25, .46, .45, .94);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#home-listings .property-card {
  animation: none;
}

#home-listings .property-card:nth-child(1) { animation-delay: 0.08s; }
#home-listings .property-card:nth-child(2) { animation-delay: 0.16s; }
#home-listings .property-card:nth-child(3) { animation-delay: 0.24s; }
#home-listings .property-card:nth-child(4) { animation-delay: 0.32s; }
#home-listings .property-card:nth-child(5) { animation-delay: 0.40s; }
#home-listings .property-card:nth-child(6) { animation-delay: 0.48s; }
#home-listings .property-card:nth-child(7) { animation-delay: 0.56s; }
#home-listings .property-card:nth-child(8) { animation-delay: 0.64s; }
#home-listings .property-card:nth-child(n+9) { animation-delay: 0.72s; }

.property-card a {
  -webkit-touch-callout: none;
}

@media (hover: hover) {
  .property-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
  }
}

.prop-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  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-card-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  transition: transform 0.2s ease;
}

.cat-card:hover .cat-card-icon svg {
  transform: scale(1.15);
}

.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: none;
  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-wrapper {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.ai-btn {
  background: rgba(255,255,255,0.85);
  color: #a855f7;
  border: 1.5px solid rgba(168,85,247,0.35);
  box-shadow: 0 2px 10px rgba(168,85,247,0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-left: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ai-btn:hover {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(168,85,247,0.4);
}

.ai-submit-btn {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: none;
  transition: all 0.2s ease;
}

.ai-submit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.listing-hero {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #d4e3f5, #a8c8f0);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
}

.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: none;
  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;
  /* Single column by default (mobile + tablet-portrait slide layout). The two-column
     grid is restored at >=926px — Telegram's breakpoint for side-by-side list+chat. */
  grid-template-columns: 1fr;
  height: calc(100vh - 52px)
}

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

.msg-list-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}
.msg-list-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.msg-search-wrap { position: relative; }
.msg-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(120,120,128,0.12);
  color: var(--text);
  box-sizing: border-box;
  outline: none;
}
.msg-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0984e3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.msg-content { flex: 1; min-width: 0; }
.msg-item {
  padding: 12px 16px;
  border-bottom: none;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

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

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

.msg-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

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

.msg-time {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
}

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

.chat-header {
  padding: 16px 24px;
  border-bottom: none;
  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);
  overscroll-behavior: contain;
}

.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: 16px;
  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 max(40px, env(safe-area-inset-bottom, 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: 8px;
  text-transform: none;
  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:900px) {
  .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: 44px;
  height: 44px;
  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: 24px;
  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;
  /* Sits off-screen below at rest; slides UP into place on open and DOWN on close
     (translateY(100%) = its own height). Easing matches the mobile nav (cubic-bezier(.4,0,.6,1)). */
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4, 0, .6, 1), opacity 0.35s cubic-bezier(.4, 0, .6, 1);
}

.chatbot-window.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body:has(.chatbot-window.visible) .chatbot-toggle {
  display: none !important;
}

.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: none;
}

.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: none;
  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: none;
}

.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;
}

/* Update facility chips to be pills */
.facility-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facility-chips label {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 8px 18px !important;
  margin-bottom: 0 !important;
  border-radius: 999px;
  border: 1px solid #dcdcdc !important;
  background: #ffffff !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #1d1d1f !important;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  max-width: 100%;
}
.facility-chips label span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.facility-chips label:hover {
  border-color: #b0b0b0 !important;
}
.facility-chips input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0 !important;
  height: 0 !important;
  margin: 0;
}
.facility-chips label:has(input[type="checkbox"]:checked) {
  border: 1.5px solid #0071e3 !important;
  background: #ffffff !important;
  color: #0071e3 !important;
}
.facility-chips label:has(input[type="checkbox"]:checked) svg {
  stroke: #0071e3 !important;
}
.facility-chips label svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 1.5 !important;
  flex-shrink: 0 !important;
  stroke: #1d1d1f !important;
}

.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: 900px) {
  .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 */
.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: 900px) {

  /* 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 {
  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;
  pointer-events: none;
}

.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: #fff;
  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 32px;
  align-items: start;
}

@media(max-width:900px) {
  .listing-layout {
    grid-template-columns: 1fr;
    padding: 32px 24px 32px;
  }
  .listing-map-full {
    padding: 0;
  }
}

/* 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;
  justify-content: space-between;
  width: 100%;
  gap: 0;
  background: transparent;
  padding: 12px 0;
  margin-top: -10px;
  margin-bottom: 24px;
}

.listing-sidebar-card .listing-stats-bar {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.listing-sidebar-card .l-kpi-div {
  display: none;
}
.listing-sidebar-card .l-kpi {
  padding: 0;
  text-align: center;
}

.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-wrapper { position: relative; }

.listing-desc-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text2, #3a3a3c);
  max-height: 126px;
  overflow: hidden;
}
.listing-desc-text.expanded { max-height: none; }
.listing-desc-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg, #ffffff));
  pointer-events: none;
}
.listing-see-more-btn {
  background: none; border: none;
  color: var(--text, #1c1c1e);
  font-weight: 600; font-size: 15px; cursor: pointer;
  padding: 12px 0 0; display: none;
}

/* 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;
  flex-wrap: wrap;
}
.listing-fact-list li span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
.listing-fact-list li strong {
  color: var(--text, #1d1d1f);
  font-weight: 600;
  text-align: right;
  flex: 0 0 auto;
  max-width: 55%;
  word-break: break-word;
}


/* Tesla-style specs — Fakta og egenskaper */
.listing-specs .spec-group {
  padding: 28px 0;
  border-bottom: 1px solid var(--border, #e5e5ea);
}
.listing-specs .spec-group:first-of-type { padding-top: 0; }
.spec-group--last { border-bottom: none !important; padding-bottom: 0; }
.spec-group-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
  margin-bottom: 20px;
}
.spec-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 16px;
}
.spec-item { display: flex; flex-direction: column; gap: 5px; }
.spec-label {
  font-size: 12px;
  color: var(--text3, #aeaeb2);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.spec-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
}
@media(max-width:900px) { .spec-row { grid-template-columns: repeat(3,1fr); } }
@media(max-width:600px) { .spec-row { grid-template-columns: repeat(2,1fr); gap:16px 12px; } }
@media(max-width:380px) { .spec-row { grid-template-columns: 1fr 1fr; } }

/* 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-main-col { min-width: 0; }

.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);
}

/* Sidebar action row under the Kontakt CTA: equal-width Lagre / Del / Rapporter */
.sidebar-action-row { display: flex; gap: 8px; margin-top: 10px; }
.sidebar-action-btn {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 10px;
  padding: 10px 6px;
  font-size: 13px; font-weight: 500;
  font-family: inherit; color: var(--text, #1d1d1f);
  white-space: nowrap; cursor: pointer;
  transition: background .15s;
}
.sidebar-action-btn:hover { background: var(--hover, #f5f5f7); }
.sidebar-action-btn svg { flex: 0 0 auto; }

/* ── 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;
}

/* Draggable mortgage sliders (finn.no-style) */
.mortgage-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  margin: 14px 0 2px;
  background: var(--border, #e5e5ea);
  outline: none;
  cursor: pointer;
}
.mortgage-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue, #0071e3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  cursor: grab;
  transition: transform .12s ease, box-shadow .12s ease;
}
.mortgage-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.14);
  box-shadow: 0 2px 9px rgba(0, 113, 227, .4);
}
.mortgage-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .22);
}
.mortgage-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}
.mortgage-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue, #0071e3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  cursor: grab;
}
/* Utleiekalkulator reuses .mortgage-slider inside .form-group, whose global
   `.form-group input` rule (border/padding/bg) would otherwise box the track. */
.calc-inputs input[type="range"].mortgage-slider {
  padding: 0;
  border: none;
  background: var(--border, #e5e5ea);
  border-radius: 999px;
  height: 6px;
}
.calc-inputs input[type="range"].mortgage-slider:focus {
  border: none;
  box-shadow: none;
}


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

.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: 901px) {
  .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 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
  color: var(--accent);
}

/* Lucide SVG icons inside service boxes */
.service-icon svg,
.naering-icon-wrap svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  transition: transform 0.2s ease;
}

.service-box:hover .service-icon svg,
.naering-cat-box:hover .naering-icon-wrap svg {
  transform: scale(1.15);
}

/* Initialise Lucide when the page's deferred script loads */

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

/* ─── NÆRING KATEGORI-IKONER (SVG) ─── */
.naering-cats-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  max-width: 900px;
  gap: 20px;
}

@media (max-width: 900px) {
  .naering-cats-grid {
    grid-template-columns: 1fr !important;
    max-width: 440px;
    margin: 0 auto;
  }
}

.naering-cat-box {
  flex-direction: column;
  gap: 16px;
  padding: 40px 28px 36px;
  text-align: center;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.naering-cat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 113, 227, 0.18);
}

.naering-icon-wrap {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform 0.22s ease;
}

.naering-icon-wrap svg {
  width: 56px;
  height: 56px;
}

.naering-cat-box:hover .naering-icon-wrap {
  transform: scale(1.04);
}
.naering-cat-box:hover .naering-icon-wrap svg {
  transform: none;
}

.naering-cat-box .service-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .naering-cat-box {
    flex-direction: row;
    padding: 20px 22px;
    gap: 18px;
    text-align: left;
    justify-content: flex-start;
    width: 100% !important;
  }
  .naering-icon-wrap svg {
    width: 44px;
    height: 44px;
  }
  .naering-cat-box .service-label {
    font-size: 15px;
  }
}


@media (max-width: 900px) {
  .services-hero {
    padding: 24px 16px 16px;
  }

  .services-hero h1 {
    font-size: 26px;
  }

  .services-content {
    padding: 20px 12px 40px;
  }

  .services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .service-box {
    width: calc(50% - 6px);
    padding: 24px 12px;
    box-sizing: border-box;
    min-width: 0;
  }

  .service-icon {
    font-size: 34px;
  }

  .service-label {
    font-size: 14px;
  }
}
/* ─── MEGLERE LOCATOR (APPLE-STYLE) ─── */
/* #page-meglere map layout removed to allow normal scrolling */

.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: none;
  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: 901px) {
  .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: none;
  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: 901px) {
  .meglere-map-container {
    min-height: 100%;
  }
}


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

@media (max-width: 900px) {

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

  .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-globe-btn {
    /* Moved into the mobile drawer as a "Språk" item; hidden from the top bar. */
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text1);
    border-radius: 8px;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
  }
  /* No white tap feedback on touch: :hover sticks on mobile, so var(--surface)
     showed a white box when tapping. Keep it transparent. */
  .nav-globe-btn:hover { background: transparent; }
  .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;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-mobile-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px; white-space: nowrap; flex-shrink: 0;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    z-index: 2100;
    margin-left: auto;
    margin-right: 10px;
    box-shadow: 0 2px 12px rgba(0,102,255,0.28);
  }
  .nav-mobile-post-btn:active {
    opacity: 0.85; transform: scale(0.97);
  }

  /* No white tap feedback on the hamburger/X (see .nav-globe-btn note). */
  .nav-hamburger:hover {
    background: transparent;
  }

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

  .hero h1 {
    font-size: clamp(20px, 5vw, 30px);
    line-height: 1.15;
  }

  .hero-sub {
    font-size: 13px;
    max-width: 100%;
    margin: 14px 0 0;
  }

  .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: 8px;
  }

  .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-category-picker,
  #modal-post,
  #modal-post-byggfolk,
  #modal-naering-post,
  #modal-bedrift-post,
  #modal-rent-post,
  #modal-wanted-post,
  #modal-ktl-post,
  #modal-post-utland {
    align-items: stretch !important;
  }
  #modal-category-picker .modal,
  #modal-post .modal,
  #modal-post-byggfolk .modal,
  #modal-naering-post .modal,
  #modal-bedrift-post .modal,
  #modal-rent-post .modal,
  #modal-wanted-post .modal,
  #modal-ktl-post .modal,
  #modal-post-utland .modal {
    margin: 0 !important;
    max-height: none !important;
    height: 100% !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
  }

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

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

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

  /* ── Pages ───────────────────────────────────────────────── */
  .page {
    padding: 84px 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 {
    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: 12px 0;
    gap: 0;
  }

  .l-kpi {
    text-align: center;
    padding-bottom: 8px;
  }
  /* NB: KPIs are separated by .l-kpi-div dividers, so :nth-last-child(-n+2)
     only matched the very last KPI (the 2nd-last child is a divider) — that
     made only the 4th column lose its bottom padding and sit ~4px lower with
     align-items:center. Keep padding uniform across all KPIs so they align. */



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

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

  .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: clip; */
    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: none;
  }

  .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: none;
  }

  .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: 900px) {
  .hide-on-mobile { display: none !important; }
  .listing-hero-wrapper { padding: 0; margin-top: 12px; }
  .listing-body { padding: 24px 0 40px; }
  .main-results .flex.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px !important;
  }
  .main-results .flex.justify-between > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  .prop-img { height: auto; }
  .prop-body { padding: 14px; }
  .prop-price { font-size: 18px; }
}

/* Fix content shift transition */
.main-results {
  transition: padding-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (max-width: 900px) {
.search-results .section {
    padding: 16px 0;
  }
  .search-results .flex.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px !important;
  }
  .search-results .flex.justify-between > .btn-primary {
    width: 100%;
    justify-content: center;
  }
  .search-results .section-title {
    font-size: 20px;
    letter-spacing: -0.01em;
  }
}
@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: 96px 16px 24px;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(18px, 6vw, 24px);
  }

  .hero-stats {
    gap: 16px;
  }

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

  .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-mobile-post-btn { display: none; }
.nav-globe-btn { display: none; }
.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: 0;                  /* collapsed at rest; grows to full on open (= Apple's .globalnav-content) */
  background: #F5F5F7;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 150;
  /* Below the nav bar (200), but above content. Visibility is driven by HEIGHT, not opacity.
     The height transition is added only via .animating during the open/close (then removed),
     so the drawer is never on a live GPU compositor layer at rest -> iOS first tap not swallowed. */
  pointer-events: none;
  transition: none;
  display: flex;
  flex-direction: column;
  padding: 0 40px;            /* vertical padding applied on .open so height:0 is truly collapsed */
  overflow: hidden;
}

/* ===== Apple globalheader menu — ported exactly (panel height-grow + staggered items) =====
   OPEN: the panel grows in height from the nav bar down to full screen (Apple's
   .globalnav-content height transition — the "slide nedover"), while the items cascade in
   (each starts 8px up + transparent, 20ms-per-index delay). CLOSE: the panel shrinks back
   up + the items reverse-stagger (last leaves first). easing cubic-bezier(.4,0,.6,1),
   panel rate .4s, items .24s. The height transition is gated by .animating (added only
   during the open/close, removed after ~520ms) so there's no live GPU layer at rest. */
.mobile-nav-drawer.animating {
  transition: height .4s cubic-bezier(.4, 0, .6, 1);
}
.mobile-nav-drawer.open {
  height: calc(100vh - 52px);
  height: calc(100dvh - 52px);
  padding: 40px 40px;
  pointer-events: auto;
  overflow-y: auto;
}
.mobile-nav-drawer.open.animating { overflow: hidden; }   /* clip content while the height grows */

/* Item cascade (Apple's .globalnav-submenu-trigger-group): 8px up + fade, staggered 20ms/index */
.mobile-nav-drawer .mobile-nav-links > li,
.mobile-nav-drawer .mobile-drawer-auth {
  opacity: 0;
  transform: translateY(-8px);
  transition-delay: calc(.2s + var(--item-index, 0) * 20ms);
  transition-duration: .24s;
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(.4, 0, .6, 1);
}
.mobile-nav-drawer.open .mobile-nav-links > li,
.mobile-nav-drawer.open .mobile-drawer-auth {
  opacity: 1;
  transform: translate(0);
}
/* CLOSE: reverse stagger — last item leaves first, no delay (Apple's closing rule) */
.mobile-nav-drawer.closing .mobile-nav-links > li,
.mobile-nav-drawer.closing .mobile-drawer-auth {
  transition-delay: 0s;
  transition-duration: min(.16s + 20ms * calc(var(--item-total, 10) - var(--item-index, 0)), .24s);
}

.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;
  /* Apple-style dividers */
  /* No entrance animation. A transform OR an opacity transition promotes each
     link to a GPU compositor layer; a tap landing during the transition window
     is swallowed on iOS (tap-twice). Links are shown instantly with the drawer;
     the parent drawer's opacity:0 hides them when closed. The staggered
     nth-child transition-delay rules below are now inert (no transition). */
  opacity: 1;
  transition: none;
  display: block;
}

.mobile-nav-drawer.open a {
  opacity: 1;
}

/* 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;
  /* No entrance animation (transform/transition compositor layer swallowed the
     first tap on iOS). Shown instantly with the drawer. */
  opacity: 1;
}

.mobile-nav-drawer.open .mobile-drawer-auth {
  opacity: 1;
}

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

@media (max-width: 900px) {
  .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: 901px) {

  .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: none;
  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
════════════════════════════════════════════════════ */
/* ═══ ARTICLE SIDEBAR AD LAYOUT ═══ */
.article-outer {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 auto;
}
.article-sidebar-col { display: none; }
.article-sidebar-sticky {
  position: sticky;
  top: 120px;
  width: 160px;
  padding-top: 40px;
}
@media (min-width: 1140px) {
  .article-outer {
    grid-template-columns: 180px minmax(0,740px) 180px;
    max-width: 1140px;
  }
  .article-sidebar-col {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .newsroom-article { margin: 0; max-width: none; }
}
.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: none;
  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: none;
  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: none;
  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: 900px) {
  .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: 900px) {

  /* Hide the footer entirely on map pages */
  body:has(#page-map.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 */
  }

  /* Drag handle indicator removed */

  /* 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: 14px !important;
    border-radius: 20px !important;
    width: calc(100% - 32px) !important;
    margin: 0 auto !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.06) !important;
  }

  .search-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 4px !important;
    margin-bottom: 12px !important;
  }

  .search-tab {
    flex: 1 !important;
    padding: 11px 8px !important;
    font-size: 15px !important;
    min-width: unset !important;
    text-align: center !important;
  }

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

  .search-input-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
  }

  .search-input-wrap input {
    font-size: 16px !important;
  }

  .search-btn,
  .search-btn-ai {
    width: 100% !important;
    padding: 15px !important;
    height: 52px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }

  .ai-btn {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* 2. Property Cards (Emoji/Empty state height) */
  .prop-img:not([style*="background: url"]) {
    height: auto !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: 0 !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: none;
}

.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: 84px;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
}

#page-messages.active .messages-layout {
  flex: 1;
  width: 100%;
  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;
}



body:has(#page-messages.active) footer { display: none !important; }
body:has(#page-messages.active) { overflow: hidden; }
body:has(#page-messages.active) { padding-bottom: 0 !important; }
/* /meldinger: hide the promo banner; pull the nav + chat up to reclaim its 40px so the
   chat fills the screen all the way down (no page peeking behind it). */
body:has(#page-messages.active) #promo-banner { display: none !important; }
body:has(#page-messages.active) > nav { top: 0 !important; }
body:has(#page-messages.active) #page-messages.active { padding-top: 48px !important; }
body:has(#page-messages.active) .chat-area { top: 48px !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 { max-height: none; }
  .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 0; }
  .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;flex-wrap:wrap;gap:0;padding:10px 16px} .search-input-wrap{flex:1 1 100% !important;max-width:100% !important;margin-bottom:8px} .filters-row{display:flex;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;width:100%;padding-bottom:2px} .filters-row::-webkit-scrollbar{display:none}
  .chat-area{position:fixed;top:84px;left:0;right:0;bottom:0;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 85px 16px;min-height:0}
  .chat-input-row{position:absolute;bottom:0;left:0;right:0;padding:8px 12px 10px 12px;background:transparent;border-top:none;display:flex;gap:10px;z-index:2}
  .chat-header{padding:12px 16px}
  .msg-list{height:100%}
}
.mobile-back-btn{display:none;background:none;border:none;font-size:15px;font-weight:600;color:var(--primary);cursor:pointer;padding:0 12px 0 0;white-space:nowrap;flex-shrink:0}
/* Telegram-size back button: 40px (2.5rem) touch target, ~26px icon, pulled to the edge */
.mobile-back-btn{width:40px !important;height:40px !important;align-items:center;justify-content:center;padding:0 !important;margin:0 4px 0 -6px !important;}
.mobile-back-btn svg{width:26px !important;height:26px !important;}
@media(max-width:925px){
  .mobile-back-btn{display:flex !important}
  .msg-list-title { display: none !important; }
  .msg-list-header { border-bottom: none !important; padding: 12px 16px; }
}
@media(max-width:925px){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; }

/* Listing Image Carousel */
.listing-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
  touch-action: manipulation;
}
.listing-carousel-btn:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}
.listing-carousel-btn.prev-btn { left: 16px; }
.listing-carousel-btn.next-btn { right: 16px; }

/* Larger arrow buttons on property cards (override the inline 20px/28px sizes). */
.prop-img .card-arrow { width: 34px !important; height: 34px !important; font-size: 16px !important; }

/* Carousel arrows appear only while hovering the picture (pointer devices only;
   touch keeps its existing behaviour / swipe). Card arrows have inline
   opacity:0.8 so the hidden state needs !important. */
@media (hover: hover) {
  .prop-img .card-arrow { opacity: 0 !important; transition: opacity .15s ease; }
  .prop-img:hover .card-arrow { opacity: 0.8 !important; }
  .listing-hero .listing-carousel-btn { opacity: 0; }
  .listing-hero:hover .listing-carousel-btn { opacity: 1; }
}

.listing-carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
}
.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.carousel-dot.active {
  background: white;
  transform: scale(1.4);
}

/* ─── Nav Category Cards ─── */
.nav-cat-btn {
  padding: 28px 16px 22px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-cat-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}
.nav-cat-icon {
  font-size: 34px;
  margin-bottom: 10px;
  line-height: 1;
}
.nav-cat-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ─── SIDEBAR LAYOUT FOR SEARCH PAGES ─── */
.search-page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width, 280px) 1fr;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  position: relative;
}

.sidebar-filters {
  z-index: 110;
  position: sticky;
  top: 88px;
  height: calc(100vh - 112px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px 24px 0;
  scrollbar-width: thin;
  border-right: 1px solid var(--border);
}
.sidebar-filters::-webkit-scrollbar {
  width: 4px;
}
.sidebar-filters::-webkit-scrollbar-thumb {
  background-color: var(--border2);
  border-radius: 4px;
}
.sidebar-filters::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-section {
  margin-bottom: 0;
  padding: 4px 0;
  border-bottom: none;
}
.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 8px;
  letter-spacing: normal;
  text-transform: none;
}

.sidebar-filters .filter-select,
.sidebar-filters .search-input-wrap {
  width: 100%;
  margin-bottom: 10px;
}

.sidebar-filters .search-input-wrap {
  background: var(--surface);
  border: 1px solid var(--border2);
  padding: 10px 14px;
}

.sidebar-filters .mfp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-filters .mfp-row .filter-select {
  margin-bottom: 0;
}

.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--rs);
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .search-page-layout {
    grid-template-columns: 1fr;
    padding: 16px 0;
    gap: 16px;
  }
  .sidebar-filters {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    resize: none;
    height: 82vh;
    padding-right: 0;
    z-index: 1999;
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    /* same open/close slide as the ChatBot: slide up on open, down on close
       (visibility's duration keeps it shown through the slide-out, hidden after) */
    transition: transform 0.35s cubic-bezier(.4, 0, .6, 1), visibility 0.35s;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.18);
    background: var(--surface);
  }
  .sidebar-filters.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 15px;
    width: 100%;
    margin: 8px 0 4px;
  }
}

/* ═══ LISTING DETAIL — MOBIL OVERHAUL ═══ */
@media (max-width: 900px) {
  .listing-hero-wrapper {
    margin-left: -16px !important;
    margin-right: 0 !important;
    width: calc(100% + 32px) !important;
    margin-top: -16px !important;
    padding: 0 !important;
  }
  .listing-hero {
    padding: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: 4 / 3;
  }
  .listing-carousel-btn { display: none !important; }
  .listing-layout {
    padding: 20px 16px 32px !important;
    gap: 20px !important;
  }
  #listing-detail-map {
    height: 220px !important;
    border-radius: 10px !important;
  }
  .price-analysis-grid { gap: 10px; }
  .price-analysis-card { padding: 14px; border-radius: 10px; }
  .pa-value { font-size: 15px; }
  .pa-label { font-size: 11px; }
  .sidebar-cta { width: 100%; }
  .listing-sidebar-card .sidebar-price-main,
  .listing-sidebar-card .sidebar-price-sub { display: none; }
  .sidebar-fav-btn { width: 100%; }
  .listing-section {
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
  }
  #page-listing{overflow-x:hidden !important}
  .listing-layout{max-width:100vw !important}
  .listing-top-strip{flex-wrap:wrap}
  .listing-main-price{font-size:24px !important;overflow-wrap:break-word}
  .listing-main-address{font-size:14px;word-break:break-word;overflow-wrap:break-word}
  .listing-desc-text{word-break:break-word;overflow-wrap:break-word}
  .listing-section>*{max-width:100%;overflow-wrap:break-word}
  .listing-stats-bar{padding:14px 0 !important;overflow-x:auto}
  .listing-gallery-img{max-width:calc(100vw - 32px) !important}
}

@media (max-width: 900px) {
  .dark-strip {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 900px) {
  #page-home {
    padding-top: 0;
  }
  #page-home .hero {
    margin-left: -16px;
    margin-right: -16px;
    padding-top: 132px;
  }
  body {
    /* Lys body (matcher .page/hero). Var tidligere var(--text)=mørk, som lyste
       gjennom som svart under sideoverganger når .page ikke dekket ennå. */
    background: var(--bg);
  }
  .page {
    background: var(--bg);
  }
}

/* ═══ FILTER BOTTOM SHEET MODAL ═══ */
.filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1998;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.filter-modal-header {
  display: none;
}
.filter-modal-scroll {
  display: block;
}
.filter-modal-footer {
  display: none;
}
/* Drag handle removed */
.filter-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-modal-title-row > span {
  font-size: 17px;
  font-weight: 700;
}
.filter-close-btn {
  display: none;
}
@media (max-width: 900px) {
  .filter-modal-header {
    display: block;
    flex-shrink: 0;
    padding: 10px 20px 16px;
    border-bottom: none;
  }
  .filter-modal-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 8px;
    scrollbar-width: thin;
  }
  .filter-modal-footer {
    display: block;
    flex-shrink: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .filter-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    flex-shrink: 0;
  }
}

/* --- Collapsible buy-sidebar sections --- */
.ss-header{display:flex;justify-content:space-between;align-items:center;cursor:pointer;user-select:none;margin-bottom:0}
.ss-header:hover{opacity:0.72}
.ss-chev{display:inline-flex;align-items:center;margin-left:auto;flex-shrink:0;color:var(--text);}
.ss-chev svg{transition:transform 0.2s ease;transform:rotate(180deg);}
.ss-chev.ss-chev-closed svg{transform:rotate(0deg);}
.ss-body{margin-top:10px}
.ss-body.ss-closed{display:none!important}
@media(max-width:900px){.ss-header{cursor:default}.ss-chev{display:none}}
.sidebar-filters .ss-chev{display:inline-flex!important}
.sidebar-filters .ss-header{cursor:pointer!important}
body:has(.sidebar-filters.open) .chatbot-toggle{display:none!important}

/* --- Page search header (title above sidebar) --- */
.page-search-header{grid-column:1/-1;padding-bottom:4px}
.has-search-header{padding-top:48px!important}
@media(max-width:900px){.page-search-header{padding-bottom:0}.has-search-header{padding-top:16px!important}}

/* --- Price range slider inputs --- */
.price-range-inputs{display:flex;align-items:center;gap:8px;margin-top:8px}
.price-range-inputs .price-inp{flex:1;padding:8px 10px;border:1.5px solid var(--border2);border-radius:10px;font-size:14px;font-family:inherit;color:var(--text);background:var(--surface);outline:none;width:0;-moz-appearance:textfield;text-align:center}
.price-range-inputs .price-inp::-webkit-outer-spin-button,.price-range-inputs .price-inp::-webkit-inner-spin-button{-webkit-appearance:none}
.price-range-inputs .price-inp:focus{border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,0.15)}
.price-range-inputs span{color:var(--text3);flex-shrink:0;font-size:14px}
/* Slank, moderne range-slider (pris / fellesutgifter) — tynt spor + lite hvitt håndtak */
.noUi-target{height:5px!important;border:none!important;box-shadow:none!important;background:#e6e6eb!important;border-radius:999px!important}
.noUi-connect{background:var(--accent)!important}
.noUi-horizontal .noUi-handle{width:18px!important;height:18px!important;right:-9px!important;top:-7px!important;border-radius:50%!important;border:1px solid rgba(0,0,0,.1)!important;background:#fff!important;box-shadow:0 1px 4px rgba(0,0,0,.18)!important;cursor:grab!important;transition:box-shadow .15s,border-color .15s}
.noUi-handle:hover{border-color:var(--accent)!important;box-shadow:0 2px 6px rgba(0,0,0,.22)!important}
.noUi-handle:active{cursor:grabbing!important;box-shadow:0 0 0 6px rgba(0,113,227,.12),0 2px 6px rgba(0,0,0,.2)!important}
.noUi-handle::before,.noUi-handle::after{display:none!important}

/* --- noUiSlider tooltip boxes --- */
.noUi-tooltip{background:var(--surface,#fff);border:1.5px solid var(--border2,#d1d5db);border-radius:10px;color:var(--text,#111);font-size:13px;font-weight:600;padding:5px 10px;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,0.08)}
.noUi-horizontal .noUi-tooltip{bottom:130%}

.type-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.type-pill{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1.5px solid var(--border2);border-radius:50px;background:var(--surface);font-size:13px;font-weight:500;color:var(--text);cursor:pointer;transition:border-color .15s,background .15s,color .15s;white-space:nowrap;line-height:1}
.type-pill:hover{border-color:#3b82f6;color:#3b82f6}
.type-pill.active{border-color:#3b82f6;background:#eff6ff;color:#1d4ed8}

/* ═══ ROOMS STEPPER ═══ */
.rooms-stepper{display:flex;align-items:center;gap:20px;margin-top:4px}
.rooms-stepper span{font-size:16px;font-weight:500;min-width:28px;text-align:center;color:var(--text)}
.stepper-btn{width:36px;height:36px;border-radius:50%;border:none;background:var(--bg2,#f2f2f7);font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--text);transition:background 0.15s}
.stepper-btn:active{background:var(--border2)}

/* ═══ DISABLE DOUBLE-TAP ZOOM IN FILTER PANEL ═══ */
.sidebar-filters, .sidebar-filters *{touch-action:manipulation}

/* ═══ FILTER BOTTOM SHEET — MOBILE POLISH ═══ */
@media (max-width: 900px) {
  .sidebar-filters { height: 85vh; }
  .filter-modal-scroll { padding: 20px; }
  .sidebar-filters .sidebar-section { margin-bottom:0; padding:4px 0; border-bottom:none; }
  .sidebar-filters .sidebar-section:last-child { border-bottom:none; }
  .sidebar-filters .sidebar-section h4 { font-size:18px; font-weight:600; margin-bottom:8px; letter-spacing:normal; text-transform:none; color:var(--text1); }
  .sidebar-filters .type-pills { gap:10px; }
  .sidebar-filters .type-pill { padding:10px 16px; font-size:14px; }
  .sidebar-filters .filter-select,
  .sidebar-filters input[type="number"] { font-size:16px!important; height:48px; padding:0 14px; border-radius:10px; border:1.5px solid var(--border2); }
  .sidebar-filters [id$="-price-slider"] { margin:0 16px!important; }
  .sidebar-filters .noUi-target { margin-top:30px!important; margin-bottom:18px!important; }
  .sidebar-filters .noUi-tooltip { font-size:13px!important; font-weight:600!important; }
  .sidebar-filters .rooms-stepper { gap:24px; margin-top:6px; }
  .sidebar-filters .stepper-btn { width:44px; height:44px; font-size:22px; }
  .sidebar-filters .rooms-stepper span { font-size:18px; font-weight:600; min-width:36px; }
}
@media (max-width: 900px) {
  .sidebar-filters .noUi-horizontal .noUi-handle { width:22px!important; height:22px!important; right:-11px!important; top:-9px!important; }
  .sidebar-filters .ss-chev svg { width:16px; height:16px; }
  /* facility-chips pill styles handle mobile gracefully */
  .filter-modal-footer { padding:16px 20px 20px; }
  .filter-modal-footer .btn { font-size:17px!important; padding:16px!important; border-radius:14px!important; }
}

/* ═══ FACILITY PILLS ═══ */
.fac-group-label{font-size:13px;font-weight:700;color:var(--text2);margin:16px 0 8px;text-transform:uppercase;letter-spacing:.04em}
.fac-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px}



/* EIENDOMAI MOBILE PANEL */
@media (max-width: 900px) {
  .chatbot-window {
    position:fixed!important;
    top:52px!important;bottom:0!important;left:0!important;right:0!important;
    width:100%!important;max-width:100%!important;
    height:calc(100dvh - 52px)!important;max-height:none!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
    border-radius:18px 18px 0 0!important;opacity:1!important;
    pointer-events:none;visibility:hidden;
    transform:translateY(100%)!important;
    box-shadow:0 -6px 32px rgba(0,0,0,.16)!important;
    /* keep the panel rendered through the slide-DOWN, then hide it (visibility delayed by the
       slide duration) — otherwise visibility:hidden fires instantly and you never see it slide out */
    transition:transform .35s cubic-bezier(.4,0,.6,1),visibility 0s .35s!important;}
  .chatbot-window.visible{transform:translateY(0)!important;pointer-events:auto;visibility:visible;
    transition:transform .35s cubic-bezier(.4,0,.6,1),visibility 0s 0s!important;}
  .chatbot-window .cb-header{border-radius:18px 18px 0 0;}
  body.chatbot-active .chatbot-toggle{display:none!important;}
  body.chatbot-active .nav-hamburger{display:none!important;}
  body.chatbot-active .nav-mobile-post-btn{display:none!important;}
  body.chatbot-active{overflow:hidden!important;}
  .chatbot-window .chat-input-row{position:relative!important;bottom:auto!important;left:auto!important;right:auto!important;flex-shrink:0;}
  .chatbot-window .chat-header{position:relative!important;padding-left:52px!important;padding-top:18px!important;touch-action:none!important;}
  /* swipe-to-close grab handle at the very top of the header */
  .chatbot-window .chat-header::before{content:"";position:absolute;top:7px;left:50%;transform:translateX(-50%);width:38px;height:4px;border-radius:2px;background:#cbd5e1;pointer-events:none;}
  /* bigger close cross + a 44px touch target */
  .chatbot-window .chat-header>button{position:absolute!important;top:50%!important;left:10px!important;right:auto!important;transform:translateY(-50%)!important;font-size:30px!important;line-height:1!important;width:44px!important;height:44px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
}
/* SIDEBAR DESKTOP REDESIGN */
@media (min-width: 901px) {
  .sidebar-filters {
  padding-right:24px; }
  .sidebar-section { padding:4px 0; border-bottom:none; }
  .sidebar-section h4 { font-size:18px;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--text1);margin-bottom:8px; }
  .sidebar-filters .filter-select { height:44px;padding:0 14px;border-radius:12px;border:1.5px solid var(--border2);font-size:14px;background:var(--surface2);transition:all .2s ease; cursor:pointer;}
  .sidebar-filters .filter-select:focus, .sidebar-filters .filter-select:hover { border-color:var(--accent);outline:none;background:var(--surface);box-shadow:0 0 0 3px rgba(0,113,227,.1); }
  .sidebar-filters .search-input-wrap { border-radius:12px;border:1.5px solid var(--border2);background:var(--surface2);transition:all .2s ease; padding: 12px 14px;}
  .sidebar-filters .search-input-wrap:focus-within, .sidebar-filters .search-input-wrap:hover { border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px rgba(0,113,227,.1); }
  .sidebar-filters .search-input-wrap input { background: transparent; font-size:14px;}
  .sidebar-filters .type-pill { padding:8px 16px;font-size:13px;border-radius:100px;border:1.5px solid var(--border2);background:var(--surface); transition:all 0.2s ease;}
  .sidebar-filters .type-pill:hover { border-color:var(--accent); color:var(--accent); transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,0.05); }
  .sidebar-filters .type-pill.active { border-color:var(--accent);background:rgba(0,113,227,.08);color:var(--accent);font-weight:600; box-shadow:none;}
  .fac-group-label { font-size:11px;margin:16px 0 8px; }
  .sidebar-filters .fac-pills { gap:8px; }
  .rooms-stepper { gap:16px; }
  .stepper-btn { width:36px;height:36px;font-size:20px; border-radius:12px; background:var(--surface2); }
  .stepper-btn:hover { background:var(--border2); color:var(--accent); transform:scale(1.05); }
  .rooms-stepper span { font-size:15px;font-weight:600; }
  .ss-chev svg { width:14px;height:14px; }
  .noUi-target { margin-top:24px!important;margin-bottom:16px!important; }
}

/* Custom Checkboxes */
.sidebar-filters input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  height: 20px !important;
  border: 1.5px solid var(--border2);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 0;
}
.sidebar-filters input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.sidebar-filters input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sidebar-filters input[type="checkbox"]:hover {
  border-color: var(--accent);
  box-shadow:0 0 0 3px rgba(0,113,227,.1);
}
.sidebar-filters label:has(input[type="checkbox"]) {
  transition: opacity 0.2s, transform 0.2s;
}
.sidebar-filters label:has(input[type="checkbox"]):hover {
  opacity: 0.9;
  transform: translateX(2px);
}


/* ABOUT PAGE STYLES (MOBILE OPTIMIZED) */
.about-hero-img-wrap { width: 100%; height: 50vh; min-height: 400px; max-height: 600px; border-radius: 16px; position: relative; overflow: hidden; margin-bottom: 40px; }
.about-hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.about-header-wrap { text-align: center; max-width: 800px; margin: 0 auto; padding-top: 20px; padding-bottom: 40px; }
.about-h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -0.02em; }
.about-p { font-size: 1.25rem; color: var(--text2); line-height: 1.6; padding: 0 16px; }
.about-badge { margin-top: 40px; display: inline-flex; align-items: center; gap: 12px; background: var(--bg); padding: 16px 32px; border-radius: 100px; font-weight: 600; font-size: 1.1rem; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,0.06); border: 1px solid var(--border); }
.about-badge-icon { color: #2e7d32; font-size: 1.4rem; }
.about-stats-container { padding-top: 60px; padding-bottom: 60px; }
.about-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center; max-width: 1000px; margin: 0 auto; padding: 60px 0; border-top: 1px solid var(--border); border-bottom: none; }
.about-stat-number { font-size: 3.5rem; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }
.about-stat-label { font-size: 1.1rem; color: var(--text2); font-weight: 500; }
.about-team-section { padding-top: 40px; padding-bottom: 80px; max-width: 1000px; margin: 0 auto; }
.about-h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
.about-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; padding: 0 16px; }
.about-team-card { text-align: center; padding: 48px 32px; background: var(--surface); border-radius: 24px; border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0,0,0,0.03); transition: transform 0.3s ease; }
.about-team-avatar { font-size: 5rem; margin-bottom: 24px; }
.about-team-name { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.about-team-role { color: var(--text2); font-size: 1.1rem; margin-top: 8px; }

@media (max-width: 900px) {
  .about-hero-img-wrap { min-height: 250px; height: 30vh; margin-bottom: 24px; border-radius: 12px; }
  .about-h1 { font-size: 2.2rem; margin-bottom: 20px; }
  .about-p { font-size: 1.05rem; }
  .about-badge { margin-top: 24px; padding: 12px 20px; font-size: 0.95rem; line-height: 1.4; max-width: 90%; text-align: left; }
  .about-stats-container { padding-top: 32px; padding-bottom: 32px; }
  .about-stats-grid { gap: 24px; padding: 32px 0; grid-template-columns: 1fr; border-top: none; }
  .about-stat-number { font-size: 2.5rem; margin-bottom: 4px; }
  .about-team-section { padding-top: 24px; padding-bottom: 48px; }
  .about-h2 { font-size: 1.8rem; }
  .about-team-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 16px; }
  .about-team-card { padding: 32px 24px; }
  .about-team-avatar { font-size: 4rem; margin-bottom: 16px; }
  .about-team-name { font-size: 1.3rem; }
}

/* ── Listing Map Controls ── */
.lmap-search-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.lmap-search-box{flex:1;display:flex;align-items:center;gap:8px;background:var(--surface);border:1.5px solid var(--border);border-radius:30px;padding:10px 16px;}
.lmap-search-box input{flex:1;border:none;background:none;outline:none;font-size:15px;color:var(--text);}
.lmap-cancel-btn{background:none;border:none;color:var(--text);font-weight:600;font-size:15px;cursor:pointer;white-space:nowrap;display:none;}
.lmap-hint{background:var(--surface);border-radius:12px;padding:14px 16px;margin-bottom:10px;}
.lmap-hint-title{font-weight:700;font-size:15px;margin:0 0 4px;color:var(--text);}
.lmap-hint-desc{font-size:13px;color:var(--text2);margin:0;line-height:1.5;}
.lmap-wrap{position:relative;}
.lmap-controls{position:absolute;right:12px;top:12px;display:flex;flex-direction:column;gap:8px;z-index:10;}
.lmap-ctrl-btn{width:44px;height:44px;background:#fff;border:none;border-radius:50%;box-shadow:0 2px 8px rgba(0,0,0,0.2);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:300;color:#333;transition:background 0.15s;}
.lmap-ctrl-btn:hover{background:#f0f0f0;}
.lmap-ctrl-btn.lmap-sat-active{background:#1c1c1e;color:#fff;}
.lmap-ctrl-btn.lmap-sat-active:hover{background:#333;}
.lmap-ctrl-btn.lmap-sat-active svg{stroke:#fff;}
.lmap-zoom-group{display:flex;flex-direction:column;align-items:center;background:#fff;border-radius:30px;box-shadow:0 2px 8px rgba(0,0,0,0.2);overflow:hidden;}
.lmap-zoom-group .lmap-ctrl-btn{border-radius:0;box-shadow:none;height:44px;width:44px;}
.lmap-zoom-group .lmap-ctrl-btn:first-child{border-radius:30px 30px 0 0;}
.lmap-zoom-group .lmap-ctrl-btn:last-child{border-radius:0 0 30px 30px;}
.lmap-zoom-sep{width:60%;height:1px;background:var(--border,#e0e0e0);}
@media(max-width:600px){.lmap-ctrl-btn{width:38px;height:38px;font-size:19px;} .lmap-zoom-group .lmap-ctrl-btn{width:38px;height:38px;}}
.lmap-search-panel{position:absolute;top:12px;left:12px;right:70px;background:#fff;border-radius:16px;padding:12px;box-shadow:0 4px 20px rgba(0,0,0,0.18);z-index:20;display:none;}
.lmap-search-panel.open{display:block;}
.lmap-panel-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.lmap-search-panel .lmap-search-box{flex:1;display:flex;align-items:center;gap:8px;background:#f2f2f7;border-radius:30px;padding:9px 14px;}
.lmap-search-panel .lmap-search-box input{flex:1;border:none;background:none;outline:none;font-size:14px;color:#1c1c1e;}
.lmap-search-panel .lmap-cancel-btn{background:none;border:none;font-weight:700;font-size:15px;cursor:pointer;white-space:nowrap;color:#1c1c1e;padding:4px 0;}
.lmap-search-panel .lmap-hint{background:none;padding:4px 0 0;margin:0;}
.lmap-cats{position:absolute;bottom:50px;left:12px;right:12px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;z-index:10;-webkit-overflow-scrolling:touch;padding-bottom:2px;}
.lmap-cats::-webkit-scrollbar{display:none;}
.lmap-cat-btn{display:flex;align-items:center;gap:6px;background:#fff;border:2px solid var(--cat,#e0e0e0);color:#1c1c1e;border-radius:30px;padding:8px 14px;font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,0.15);transition:all 0.18s;}
.lmap-cat-btn:hover{opacity:0.85;}
.lmap-cat-btn.active{background:var(--cat,#007aff);border-color:var(--cat,#007aff);color:#fff;}

/* ── Facility Grid (Airbnb-style) ── */
.fac-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;}
.fac-item{display:flex;align-items:center;gap:14px;font-size:15px;color:var(--text);}
.fac-item svg{flex-shrink:0;width:24px;height:24px;color:var(--text);}
.fac-show-all{display:inline-block;margin-top:24px;padding:14px 24px;font-size:15px;font-weight:600;background:transparent;border:1.5px solid var(--text);border-radius:12px;cursor:pointer;color:var(--text);transition:background 0.15s,color 0.15s;}
.fac-show-all:hover{background:var(--text);color:var(--bg);}
@media(max-width:600px){.fac-grid{grid-template-columns:1fr;}.fac-show-all{width:100%;text-align:center;}}.lmap-cats{bottom:auto;top:12px;right:70px;}
@media(min-width:901px){#listing-detail-map{height:520px !important;}}
.lmap-route-card{position:absolute;bottom:12px;left:12px;width:260px;background:#fff;border-radius:16px;padding:16px;box-shadow:0 4px 24px rgba(0,0,0,0.22);z-index:20;display:none;}
.lmap-route-hdr{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
.lmap-route-hdr-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
.lmap-route-hdr-icon svg{width:16px;height:16px;stroke:white;fill:none;stroke-width:1.5;}
.lmap-route-hdr-name{font-size:13px;font-weight:600;color:#666;flex:1;}
.lmap-route-close{background:none;border:none;cursor:pointer;font-size:20px;color:#999;padding:0;}
.lmap-route-place{font-weight:700;font-size:17px;margin-bottom:2px;color:#1c1c1e;}
.lmap-route-subtype{font-size:13px;color:#888;margin-bottom:12px;}
.lmap-route-dist{display:flex;gap:10px;padding-top:12px;border-top:1px solid #eee;}
.lmap-route-dist-time{font-weight:600;font-size:14px;color:#1c1c1e;}
.lmap-route-dist-km{font-size:12px;color:#888;margin-top:2px;}
.listing-map-full{max-width:1200px;margin:0 auto;padding:32px 24px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-top:0;}
@media(min-width:901px){.listing-map-full #listing-detail-map{height:540px !important;}}
.lmap-wrap:-webkit-full-screen{width:100%;height:100%;}
.lmap-wrap:fullscreen{width:100%;height:100%;}
.lmap-wrap:fullscreen #listing-detail-map{height:100vh !important;border-radius:0 !important;}
.lmap-wrap:-webkit-full-screen #listing-detail-map{height:100vh !important;border-radius:0 !important;}
@media(max-width:600px){.listing-map-full{padding:24px 0; border-radius:0;}}
@media(max-width:600px){
  .listing-map-full #listing-detail-map{height:62vh !important;border-radius:0 !important;border-left:none !important;border-right:none !important;}
  .lmap-zoom-group{display:none;}
  .lmap-ctrl-btn{width:34px;height:34px;font-size:16px;}
  .lmap-ctrl-btn svg{width:15px;height:15px;}
  .lmap-controls{gap:6px;right:8px;top:8px;}
  .lmap-cats{gap:5px;bottom:auto;top:8px;left:8px;right:50px;}
  .lmap-cat-btn{font-size:11px;padding:5px 9px;gap:4px;border-width:1.5px;}
  .lmap-route-card{width:calc(100% - 24px);left:12px;right:12px;bottom:8px;}
}
@media(max-width:900px){.listing-landlord-cta{display:none !important;}}
.gm-control-active,.gm-bundled-control,.gm-svpc{display:none !important;}
@media(max-width:600px){#lmap-type-btn,#lmap-sv-btn{display:none;}}
.lmap-fs-active #lmap-type-btn,.lmap-fs-active #lmap-sv-btn{display:flex !important;}
.lmap-wrap:-webkit-full-screen #lmap-type-btn,.lmap-wrap:-webkit-full-screen #lmap-sv-btn{display:flex !important;}
.lmap-wrap:fullscreen #lmap-type-btn,.lmap-wrap:fullscreen #lmap-sv-btn{display:flex !important;}
.lmap-fs-active{position:fixed !important;top:0 !important;left:0 !important;width:100vw !important;height:100dvh !important;z-index:99999 !important;border-radius:0 !important;}
.lmap-fs-active #listing-detail-map{height:100dvh !important;border-radius:0 !important;}
@media(max-width:600px){footer{padding-bottom:max(16px,env(safe-area-inset-bottom,16px)) !important;}}

/* ─── SIDEBAR COLLAPSE & GRID COLUMNS OVERRIDES ─── */

.sidebar-scroll-container {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-scroll-container::-webkit-scrollbar {
  display: none;
}

@media (min-width: 901px) {
.search-page-layout {
  position: relative;
}

.sidebar-filters {
  z-index: 110;
  position: sticky;
  top: 88px;
  align-self: start; /* Prevents grid stretching, enabling stickiness! */
  height: calc(100vh - 112px);
  border-right: 1px solid var(--border);
  overflow: visible !important; /* Allow toggle button to float outside */
  z-index: 99;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              padding 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.search-page-layout.sidebar-collapsed {
  grid-template-columns: 0px 1fr !important;
  gap: 0px !important;
}
.search-page-layout.sidebar-collapsed .sidebar-filters {
  z-index: 110;
  width: 0px !important;
  padding: 0px !important;
  border-right: none !important;
}
.search-page-layout.sidebar-collapsed .sidebar-scroll-container {
  display: none !important;
}
.search-page-layout.sidebar-collapsed .main-results {
  padding-left: 48px;
  transition: padding-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
} /* end min-width:901px */
}

/* Premium Styles for Dynamic Toggle Buttons */
.toggle-sidebar-btn {
  position: absolute;
  top: -40px; /* Moved UP to align with Boliger til leie */
  right: -18px; /* Centered on the border line */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2) !important;
  background: var(--surface) !important;
  color: var(--text2) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999 !important; /* Overrides the drag resizer */
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  padding: 0 !important;
}
.search-page-layout.sidebar-collapsed .toggle-sidebar-btn {
  right: -36px; /* Move it fully into the main content area when collapsed */
  top: -28px; /* Counteract upward shift to stay on the same row */
}
.toggle-sidebar-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s ease;
}
.search-page-layout.sidebar-collapsed .toggle-sidebar-btn svg {
  transform: scaleX(-1);
}
.toggle-sidebar-btn:hover {
  background: #e0e0e0 !important;
  color: var(--text) !important;
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .toggle-sidebar-btn {
    display: none !important;
  }
}











/* ══════════════════════════════════════════════════════
   MERKEVAREBYGGING GRID AD — spans all listing columns
   Inserted as first item in property grid by JS
══════════════════════════════════════════════════════ */
@keyframes mbGrad  { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
@keyframes mbOrb   { 0%,100%{transform:translate(0,0)} 40%{transform:translate(24px,-14px)} 70%{transform:translate(-14px,9px)} }
@keyframes mbPulse { 0%,100%{box-shadow:0 4px 32px rgba(108,99,255,.3)} 50%{box-shadow:0 8px 56px rgba(108,99,255,.55),0 0 80px rgba(0,212,255,.15)} }
@keyframes mbScan  { 0%{top:-5%} 100%{top:110%} }
@keyframes mbBlink { 0%,100%{opacity:1;box-shadow:0 0 6px rgba(0,212,255,.9)} 50%{opacity:.2;box-shadow:none} }

.mb-grid-ad {
  grid-column: 1 / -1;
  min-height: 300px;
  display: flex;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #07071a;
  border: 1px solid rgba(108,99,255,.25);
  text-decoration: none;
  cursor: pointer;
  animation: mbPulse 4s ease-in-out infinite;
  transition: transform .25s, border-color .25s;
}
.mb-grid-ad:hover { transform: translateY(-2px); border-color: rgba(108,99,255,.55); }

.mb-grid-ad .mb-bg {
  position:absolute; inset:0; z-index:0;
  background:linear-gradient(135deg,#07071a 0%,#0d0a28 40%,#071828 70%,#07071a 100%);
  background-size:300% 300%; animation:mbGrad 10s ease infinite;
}
.mb-grid-ad .mb-orb {
  position:absolute; border-radius:50%; filter:blur(60px);
  z-index:1; pointer-events:none; animation:mbOrb ease-in-out infinite;
}
.mb-grid-ad .mb-orb1 { width:380px;height:380px; background:rgba(108,99,255,.45); top:-140px; left:-60px; animation-duration:9s; }
.mb-grid-ad .mb-orb2 { width:300px;height:300px; background:rgba(0,212,255,.35); bottom:-120px; right:15%; animation-duration:12s; animation-direction:reverse; animation-delay:-4s; }
.mb-grid-ad .mb-grid-lines {
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background-image:linear-gradient(rgba(108,99,255,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(108,99,255,.055) 1px,transparent 1px);
  background-size:28px 28px;
}
.mb-grid-ad .mb-scan {
  position:absolute; left:0; right:0; height:2px; z-index:2; pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(0,212,255,.5),transparent);
  animation:mbScan 5s linear infinite; opacity:.6;
}
.mb-inner-big {
  position:relative; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  width:100%; height:100%; padding:40px 56px; gap:32px;
}
.mb-grid-ad .mb-left { display:flex; flex-direction:column; gap:16px; }
.mb-grid-ad .mb-tag {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(0,212,255,.1); border:1px solid rgba(0,212,255,.3);
  border-radius:100px; padding:3px 12px;
  font-size:11px; font-weight:800; letter-spacing:.14em;
  text-transform:uppercase; color:#00d4ff; width:fit-content;
}
.mb-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#00d4ff; box-shadow:0 0 6px rgba(0,212,255,.9); animation:mbBlink 1.4s ease-in-out infinite; flex-shrink:0; }
.mb-big-title {
  font-size:clamp(28px,3.5vw,48px); font-weight:900; color:#fff;
  letter-spacing:-.03em; line-height:1.1;
  font-family:'Space Grotesk','Inter',-apple-system,sans-serif;
}
.mb-acc { background:linear-gradient(135deg,#6c63ff,#00d4ff); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.mb-big-sub { font-size:16px; color:rgba(255,255,255,.5); }
.mb-btn-big {
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,#6c63ff,#00d4ff); color:#fff;
  border-radius:100px; padding:14px 28px; font-size:15px; font-weight:700;
  width:fit-content; box-shadow:0 6px 24px rgba(108,99,255,.5);
  transition:transform .2s, box-shadow .2s;
}
.mb-grid-ad:hover .mb-btn-big { transform:scale(1.06); box-shadow:0 8px 32px rgba(108,99,255,.7); }
.mb-domain-big { font-size:13px; font-weight:600; color:rgba(255,255,255,.35); display:flex; align-items:center; gap:6px; white-space:nowrap; align-self:flex-end; }

@media (max-width:900px) {
  .mb-grid-ad { min-height: auto; }
  .mb-inner-big {
    flex-direction: row;
    align-items: center;
    padding: 16px;
    gap: 12px;
  }
  .mb-left {
    gap: 6px;
  }
  .mb-big-title {
    font-size: 16px;
  }
  .mb-big-sub {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mb-btn-big {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  .mb-domain-big {
    display: none;
  }
}


/* ══════════════════════════════════════════════════════
   MERKEVAREBYGGING AUTHORITY BANNER
   Spans full listing grid width, shows trust & authority
══════════════════════════════════════════════════════ */

.mb-grid-ad {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: auto;
  animation: none;
  background: #fff;
  border: 1px solid #ece6db;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60,40,0,.04), 0 12px 30px rgba(120,80,10,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.mb-grid-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(60,40,0,.04), 0 18px 40px rgba(120,80,10,.13);
}
.mb-ad-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: 22px 30px;
  min-width: 0;
}
.mb-ad-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b3a892;
}
.mb-ad-title {
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #1d1810;
  line-height: 1.22;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.mb-trust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mb-trust {
  font-size: 12.5px;
  color: #5f5a50;
  background: #f5f2eb;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 500;
  white-space: nowrap;
}
.mb-ad-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 22px 40px;
  min-width: 240px;
  flex-shrink: 0;
  background: linear-gradient(140deg, #f6b53d 0%, #e08a17 55%, #b9650a 100%);
  color: #fff;
  text-align: center;
}
.mb-panel-note {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  opacity: .95;
}
.mb-btn-gold {
  background: #fff;
  color: #bd6a09;
  border-radius: 11px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(90,50,0,.22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mb-grid-ad:hover .mb-btn-gold {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(90,50,0,.3);
}
.mb-domain-txt {
  font-size: 11.5px;
  color: #fff;
  opacity: .85;
  font-weight: 500;
}
@media (max-width: 760px) {
  .mb-grid-ad { flex-direction: column; align-items: stretch; }
  .mb-ad-left { padding: 18px 20px; gap: 9px; }
  .mb-ad-title { font-size: 17px; }
  .mb-trust-row { gap: 6px; }
  .mb-trust { font-size: 11.5px; padding: 3px 9px; }
  .mb-ad-panel { min-width: 0; padding: 16px 20px 20px; gap: 9px; }
}

/* article sidebar */
.article-outer{display:grid;grid-template-columns:1fr;margin:0 auto;}
.article-sidebar-col{display:none;}
.article-sidebar-sticky{position:sticky;top:120px;width:160px;padding-top:40px;}
@media(min-width:1140px){.article-outer{grid-template-columns:180px minmax(0,740px) 180px;max-width:1140px;}.article-sidebar-col{display:flex;justify-content:center;align-items:flex-start;}.newsroom-article{margin:0;max-width:none;}}

/* paginering */
.art-pagination{display:flex;align-items:center;justify-content:center;gap:12px;padding:40px 0 20px;width:100%;}
.art-pag-btn{padding:10px 22px;border-radius:100px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font-size:14px;font-weight:500;cursor:pointer;transition:background .15s;}
.art-pag-btn:hover:not([disabled]){background:var(--bg2);}
.art-pag-btn[disabled]{opacity:.35;cursor:not-allowed;}
.art-pag-mid{position:relative;display:flex;align-items:center;}
.art-pag-picker{padding:10px 18px;border-radius:100px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:6px;}
.art-pag-picker:hover{background:var(--bg2);}
.art-picker-dd{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 8px 32px rgba(0,0,0,.18);overflow:hidden;z-index:999;min-width:160px;}
.art-picker-item{padding:13px 22px;cursor:pointer;font-size:14px;color:var(--text);transition:background .12s;white-space:nowrap;}
.art-picker-item:hover{background:var(--bg2);}
.art-picker-item.active{background:var(--accent);color:#fff;font-weight:700;}
@media(max-width:600px){.art-pag-btn{padding:8px 14px;font-size:13px;}.art-pag-picker{padding:8px 14px;font-size:13px;}}

/* Prevent layout shift while listings load */
#buy-listings,#rent-listings,#wanted-listings,#korttid-listings {
  min-height:400px;
}

/* page transitions handled via opacity/visibility */

/* ─── NAVIGATION PROGRESS BAR (Airbnb-style) ─────────────────────────────── */
#nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #ff385c, #ff5a5f);
  z-index: 10000;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  border-radius: 0 1px 1px 0;
}
#nav-progress.active {
  opacity: 1;
}
#nav-progress.done {
  width: 100% !important;
  opacity: 0;
  transition: width 0.1s ease, opacity 0.4s ease 0.1s;
}

/* ─── SMOOTH PAGE CONTAINER ────────────────────────────────────────────────── */
body > .page-container {
  position: relative;
}

.date-filter-wrap{position:relative;display:flex;align-items:center;}
.date-filter-wrap>svg{position:absolute;left:10px;z-index:1;pointer-events:none;color:var(--text3);}
.date-filter-wrap input[type="date"]{width:100%;}
input[type="date"]::-webkit-calendar-picker-indicator{opacity:0.4;cursor:pointer;}

/* ─── SKELETON LOADING CARDS (shimmer) ──────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -700px 0 }
  100% { background-position: 700px 0 }
}
.skeleton-card {
  background: var(--surface, #f5f5f7);
  border-radius: 16px;
  overflow: hidden;
}
.skeleton-pulse {
  background: linear-gradient(
    90deg,
    var(--border, #e5e5ea) 25%,
    color-mix(in srgb, var(--border, #e5e5ea) 50%, transparent) 50%,
    var(--border, #e5e5ea) 75%
  );
  background-size: 700px 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 8px;
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 12px 12px 0 0;
}
.skeleton-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-price { height: 22px; width: 55%; }
.skeleton-title { height: 16px; width: 80%; }
.skeleton-addr  { height: 14px; width: 65%; }
.skeleton-meta  { height: 13px; width: 40%; }


/* ─── LAYOUT STABILITY (prevents CLS during page transitions) ──────────────── */

/* nav positioning handled by existing CSS */

/* Fix: page-count text area has stable height to prevent reflow */
#buy-count, #rent-count, #wr-count, #ktl-count, #u-count,
#ns-count, #nl-count, #nt-count, #nb-count, #byggfolk-count {
  min-height: 1.4em;
  display: inline-block;
}

/* Fix: page search header stable layout */
.page-search-header {
  min-height: 48px;
  contain: layout style;
}

/* Fix: property grid has stable skeleton height while loading */
#buy-listings:empty, #rent-listings:empty,
#wr-listings:empty, #ktl-listings:empty,
#u-listings:empty {
  min-height: 400px;
}

/* Fix: All pages start hidden, active gets the animation */
.page {
  /* Ensure will-change is GPU composited for smooth animation */
  will-change: opacity;
}

/* ─── NAV PROGRESS BAR ──────────────────────────────────────────────────────── */
#nav-progress {
  display: none !important;
}

#nav-progress.active {
  opacity: 1;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-progress.done {
  opacity: 0;
  transition: opacity 0.3s ease 0.05s;
}

/* ─── SKELETON LOADING CARDS ──────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -700px 0 }
  100% { background-position:  700px 0 }
}

.skeleton-card {
  background: var(--surface, #f5f5f7);
  border-radius: 16px;
  overflow: hidden;
}

.skeleton-pulse {
  background: linear-gradient(
    90deg,
    var(--border, #e5e5ea) 25%,
    var(--bg, #f9f9fb) 50%,
    var(--border, #e5e5ea) 75%
  );
  background-size: 700px 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 8px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 0;
  margin: 0;
}

.skeleton-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-price { height: 20px; width: 50%; }
.skeleton-title { height: 15px; width: 78%; }
.skeleton-addr  { height: 13px; width: 62%; }
.skeleton-meta  { height: 12px; width: 38%; }

/* ==========================================================================
   PAGINATION (Airbnb-style)
   ========================================================================== */
.ep-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 60px 0;
  width: 100%;
}

.ep-page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
  color: #222222;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  user-select: none;
}

.ep-page-btn:hover:not(.ep-page-active):not(.ep-page-disabled):not(.ep-page-dots) {
  background: #f7f7f7;
}

.ep-page-active {
  background: #222222 !important;
  color: #ffffff !important;
}

.ep-page-disabled {
  color: #dddddd;
  cursor: not-allowed;
}

.ep-page-dots {
  cursor: default;
  color: #222222;
}

.ep-page-arrow {
  font-weight: bold;
  font-size: 16px;
}
/* Leaflet listing map fixes */
.leaflet-container{font-family:inherit;border-radius:inherit;}
.leaflet-control-zoom{display:none!important;}
.leaflet-control-attribution{font-size:10px;opacity:0.7;}
.leaflet-marker-icon{border:none!important;background:transparent!important;}
.leaflet-tooltip{border-radius:8px;font-size:13px;font-weight:600;border:none;box-shadow:0 2px 8px rgba(0,0,0,0.15);}
/* Leaflet stacking context fix */
#listing-detail-map{isolation:isolate;}
.lmap-controls{z-index:1000!important;}
.lmap-cats{z-index:1000!important;}
.lmap-route-card{z-index:1001!important;}
.lmap-cat-btn{display:inline-flex;align-items:center;gap:6px;}
.lmap-cat-btn span svg{display:block;}
.lmap-cat-btn.active span{box-shadow:0 0 0 2px white,0 0 0 4px var(--cat);}
/* MapLibre overrides */
.maplibregl-map{border-radius:inherit;}
.maplibregl-ctrl-bottom-right{z-index:5!important;}
.maplibregl-marker{cursor:pointer;}

/* Fullscreen close btn + touch guard */

.lmap-touch-guard { display: flex; align-items: center; justify-content: center; position: absolute; inset: 0; z-index: 5; cursor: pointer; }
.lmap-touch-guard::after { display: none; }
.lmap-fs-active .lmap-touch-guard { display: none !important; }
@media(max-width:900px) { .lmap-touch-guard { align-items: flex-end; padding-bottom: 60px; } }

#lmap-fs-close-x{display:none;position:absolute;top:16px;right:16px;z-index:100001;background:#fff;color:#111;border:none;border-radius:50%;width:40px;height:40px;font-size:18px;font-weight:700;box-shadow:0 2px 10px rgba(0,0,0,0.25);cursor:pointer;align-items:center;justify-content:center;}
.lmap-fs-active #lmap-fs-close-x{display:flex;}

#lmap-expand-btn{display:flex;}
.lmap-fs-active #lmap-expand-btn{display:none!important;}

.lmap-fs-active .lmap-controls{top:72px;}

/* ── Listing map controls: frosted-glass pills (like the reference), shown only
      in fullscreen (inline map shows just the expand button / tap-to-expand). ── */
.lmap-ctrl-btn{
  background: rgba(255,255,255,0.65);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  color:#1c1c1e;
}
.lmap-ctrl-btn:hover{ background: rgba(255,255,255,0.82); }
.lmap-zoom-group{
  background: rgba(255,255,255,0.65);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
/* inner +/- buttons stay transparent so the group reads as one frosted pill */
.lmap-zoom-group .lmap-ctrl-btn{ background: transparent; -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none; }
.lmap-zoom-group .lmap-ctrl-btn:hover{ background: rgba(0,0,0,0.06); }
.lmap-cat-btn{
  background: rgba(255,255,255,0.65);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#lmap-fs-close-x{
  background: rgba(255,255,255,0.65);
  color:#1c1c1e;
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
/* Layers, zoom and POI category buttons only appear in fullscreen. */
.lmap-wrap:not(.lmap-fs-active) #lmap-type-btn,
.lmap-wrap:not(.lmap-fs-active) .lmap-zoom-group,
.lmap-wrap:not(.lmap-fs-active) .lmap-cats{ display:none !important; }

.report-reason-btn{text-align:left;padding:13px 16px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface);font-size:14px;font-weight:500;cursor:pointer;color:var(--text);width:100%;transition:background .15s,border-color .15s;}
.report-reason-btn:hover{background:var(--bg2,#f3f4f6);border-color:var(--text3,#aaa);}

/* Google Maps autocomplete dropdown over modals */
.pac-container{z-index:1000001!important;pointer-events:auto!important;}

.wr-minmax-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.wr-mm-inp{width:100%;padding:10px 14px;border:1.5px solid var(--border);border-radius:10px;background:var(--bg);color:var(--text);font-size:14px;height:42px;box-sizing:border-box;font-family:inherit;}
.wr-mm-inp:focus{border-color:var(--accent);outline:none;}
.wr-sub-lbl{font-size:11px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.04em;display:block;margin-bottom:5px;}
.wr-filter-minmax{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;}
.wr-filter-minmax input{width:100%;padding:8px 10px;border:1.5px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font-size:13px;box-sizing:border-box;}

.wr-pref-lbl{display:flex;align-items:center;gap:8px;cursor:pointer;padding:8px 12px;border:1.5px solid var(--border);border-radius:10px;font-size:14px;user-select:none;transition:border-color .15s,background .15s;}
.wr-pref-lbl:hover{border-color:var(--accent);background:var(--primary-light,#f0f7ff);}
.wr-pref-lbl input[type=checkbox]{width:16px;height:16px;cursor:pointer;accent-color:var(--accent);flex-shrink:0;}
.wr-pref-lbl.checked{border-color:var(--accent);background:var(--primary-light,#eef4ff);}

/* Artikler Styles */
.artikkel-body {
    padding-top: 88px;
    min-height: 100vh;
}
/* Filter Pills - næring type lokaler */
/* Filter Pills */
.filter-pill{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:980px;border:1.5px solid var(--border2);font-size:13px;font-weight:500;cursor:pointer;color:var(--text);background:var(--surface);transition:all .15s;white-space:nowrap;font-family:inherit;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.filter-pill:hover:not(.active){border-color:var(--accent);color:var(--accent)}
.filter-pill.active{color:var(--accent);border-color:var(--accent);border-width:2px;font-weight:600}

/* ═══ MOBILE CTA STRIP ═══ */
.listing-mobile-cta{display:none;}
.listing-mobile-contact-btn{width:100%;display:block;border-radius:12px;padding:13px;font-size:16px;margin-bottom:10px;}
.listing-mobile-actions{display:flex;gap:8px;margin-bottom:4px;}
.listing-mobile-action-btn{flex:1;background:#fff;border:1px solid var(--border,#e5e5ea);border-radius:10px;padding:10px 6px;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;color:var(--text,#1d1d1f);text-align:center;}
@media(max-width:900px){
  .listing-mobile-cta{display:block;margin-bottom:20px;}
  .sidebar-cta,.sidebar-fav-btn,.sidebar-report-btn,.sidebar-action-row,.sidebar-price-main,.sidebar-price-sub{display:none!important;}
}

/* Lagre/Del removed from the hero image everywhere — they live in the sidebar
   action row (desktop) and the mobile action bar instead. */
.listing-action-lagre,.listing-action-del{display:none!important;}

@media(max-width:900px){.listing-sidebar-card:not(.mortgage-card){display:none!important;}}

@media(max-width:900px){.card-arrow{display:none!important;}}

/* ═══ SELG-SIDE MOBIL ═══ */
@media(max-width:900px){
  .sell-grid{grid-template-columns:1fr!important;gap:20px!important;}
  .sell-col-right{order:-1;}
  .sell-card{padding:24px!important;}
}

/* ═══ UTLAND LANDING MOBIL ═══ */
@media(max-width:900px){
  #utland-landing{padding:24px 16px!important;}
  #utland-landing h1{font-size:1.8rem!important;margin-bottom:8px!important;}
  #utland-landing>p{font-size:1rem!important;margin-bottom:24px!important;}
  #utland-landing>div{grid-template-columns:1fr!important;gap:16px!important;}
  #utland-landing>div>div{padding:28px 20px!important;}
  #utland-landing>div>div h2{font-size:1.2rem!important;}
  #utland-landing>div>div>div:first-child{font-size:36px!important;margin-bottom:10px!important;}
}

/* ═══ AUTH MODAL ═══ */
#google-btn-container{display:inline-block;line-height:0;transform:scale(1.5);margin:16px 0;}#google-btn-container iframe{margin:0!important;}
@media(max-width:600px){
  .auth-modal-box{padding:28px 20px!important;}
  .auth-modal-box .modal-close{top:14px;right:14px;}
  #otp-step-1 > div:first-child{font-size:30px!important;margin-bottom:10px!important;}
  .auth-modal-box h2{font-size:19px!important;}
}

/* ═══ AUTH MODAL v2 ═══ */
@media(max-width:600px){
  .auth-modal-box{padding:28px 22px 32px!important;max-width:100%!important;}
}

/* ═══ AUTH MODAL v3 ═══ */
@media(max-width:600px){
  .auth-modal-box{overflow-y:auto!important;padding-bottom:36px!important;}
  #otp-step-1{padding-bottom:4px;}
}

/* ═══ AUTH MODAL v4 - taller layout ═══ */
@media(max-width:600px){
  #modal-auth .modal{min-height:72vh;display:flex;flex-direction:column;justify-content:center;}
  #modal-auth h2{font-size:27px!important;font-weight:600!important;margin-bottom:18px!important;}
  #modal-auth #otp-step-1{display:flex;flex-direction:column;width:100%;gap:4px;}
  #otp-email-input{padding:16px!important;font-size:16px!important;border-radius:14px!important;}
  #otp-send-btn{padding:16px!important;font-size:16px!important;border-radius:14px!important;margin-top:2px!important;}
}

/* MODAL POLISH */
.modal-close{font-size:0!important;color:transparent!important;}

@keyframes authSlideUp{from{transform:translateY(100%);opacity:0;}to{transform:translateY(0);opacity:1;}}
@media(max-width:600px){#modal-auth .modal{animation:authSlideUp .32s cubic-bezier(0.25,0.46,0.45,0.94)!important;}}
.modal-close::before{content:"";display:block;width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2523333%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%3E%3Cline%20x1%3D%2218%22%20y1%3D%226%22%20x2%3D%226%22%20y2%3D%2218%22%2F%3E%3Cline%20x1%3D%226%22%20y1%3D%226%22%20x2%3D%2218%22%20y2%3D%2218%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;}

/* MODAL FIX v2 */
.modal-close{color:#111!important;}
.modal-close::before{display:none!important;}

@media(max-width:600px){#modal-auth .modal{min-height:84vh!important;}}

/* OTP validation error */
#otp-err1{display:flex;align-items:center;gap:5px;font-size:13px;color:#e53e3e;}

/* OTP input error state */
#otp-email-input.otp-input-err::placeholder{color:#e53e3e;opacity:1;}

/* FLOATING LABEL - otp-email */
.otp-float-wrap{position:relative;margin-bottom:2px;}
#otp-email-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:15px;color:#aaa;pointer-events:none;transition:all .15s ease;line-height:1;background:transparent;}
.otp-float-wrap input:focus~#otp-email-label,.otp-float-wrap input:not(:placeholder-shown)~#otp-email-label{top:10px;transform:translateY(0);font-size:11px;color:#666;}
.otp-float-wrap input.otp-input-err~#otp-email-label{color:#e53e3e!important;}

/* Skjul Like-knapp i annonse-oversikt (kort) */
.prop-heart{display:none!important;}

/* Bedrift bransje checkboxes */
.bedrift-bransje-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px;margin-top:6px;}
.bedrift-cb{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer;color:var(--text,#1d1d1f);}
.bedrift-cb input{width:18px;height:18px;cursor:pointer;flex-shrink:0;}

/* Skjul resultat-teller i listevisninger */
#buy-count,#rent-count,#wr-count,#ns-count,#nl-count,#nt-count,#nb-count,#u-count,#ktl-count,#byggfolk-count{display:none!important;}

/* ═══ HERO TYPEAHEAD ═══ */
/* Skjul hero helt når en modal er åpen – forhindrer søkefelt fra å dukke opp over modalen */
body:has(.modal-overlay.open) .hero { display: none !important; }
body:has(.modal-overlay.open) .search-box { display: none !important; }
.search-box { position: relative; z-index: 100; }
.hero-suggest { position:absolute; top:calc(100% + 8px); left:0; right:0; background:#fff; border-radius:16px; box-shadow:0 12px 48px rgba(0,0,0,.22); padding:8px 0 12px; text-align:left; z-index:1000; max-height:72vh; overflow-y:auto; display:none; }
.hero-suggest.open { display:block; }
.hero-sug-group-title { font-size:17px; font-weight:700; padding:14px 22px 6px; color:var(--text,#1d1d1f); }
.hero-sug-item { padding:9px 22px; font-size:16px; color:var(--text,#1d1d1f); cursor:pointer; line-height:1.3; }
.hero-sug-item:hover, .hero-sug-item.active { background:var(--bg,#f5f5f7); }
.hero-sug-item b { color:var(--accent,#0071e3); font-weight:700; }
.hero-sug-count { color:var(--text3,#8a8a8e); font-size:15px; }

/* ═══ MOBIL SØK v2 ═══ */
.hero h1 { text-wrap: balance; }
#hero-back { display:none; background:none; border:none; cursor:pointer; padding:6px; color:var(--text,#1d1d1f); align-items:center; justify-content:center; flex:0 0 auto; }
#hero-clear { display:none; background:none; border:none; cursor:pointer; padding:6px; color:#70757a; align-items:center; justify-content:center; flex:0 0 auto; }
@media(max-width:900px){
  .search-box { width:calc(100% - 16px)!important; padding:10px!important; }
  .search-row { flex-direction:row!important; gap:6px!important; align-items:center!important; }
  .search-input-wrap { flex:1 1 auto!important; width:auto!important; min-width:0!important; padding:12px 14px!important; }
  .search-btn { width:auto!important; height:auto!important; padding:11px 13px!important; font-size:13px!important; flex:0 0 auto!important; }
  #ai-search-btn { width:auto!important; height:auto!important; padding:11px 12px!important; font-size:13px!important; flex:0 0 auto!important; }
  body.lt-stuck > nav { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.1s ease-out; }
}

/* MOBIL FULLSKJERM SOK */
@media(max-width:900px){
  body.hero-search-active{overflow:hidden!important;position:fixed!important;width:100%!important;left:0!important;right:0!important;}
  body.hero-search-active .hero{z-index:100000!important;}
  body.hero-search-active .chatbot-toggle{display:none!important;}
  body.hero-search-active .search-box{position:fixed!important;inset:0!important;z-index:100000!important;width:100%!important;max-width:none!important;height:100dvh!important;margin:0!important;border-radius:0!important;box-shadow:none!important;padding:10px 10px 0!important;display:flex!important;flex-direction:column!important;background:#f5f5f7!important;}
  body.hero-search-active #hero-back{display:flex!important; position:absolute!important; top:16px!important; right:16px!important; color:#86868b!important; background:transparent!important; border:none!important; padding:4px!important; z-index:10!important; width:auto!important; height:auto!important; margin:0!important;}
  body.hero-search-active .search-btn,body.hero-search-active #ai-search-btn{display:none!important;}
  body.hero-search-active .search-row{flex:0 0 auto!important; border:none!important; margin:50px 20px 0 20px!important; padding:0!important; align-items:center!important; position:static!important;}
  body.hero-search-active .search-input-wrap{background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;padding:0!important;display:flex!important;align-items:center!important;}
  body.hero-search-active .search-input-wrap > svg{display:block!important; width:28px!important; height:28px!important; fill:#86868b!important; margin-right:12px!important;}
  body.hero-search-active #hero-search{font-size:32px!important; font-weight:600!important; color:#1d1d1f!important; line-height:normal!important; padding:0!important; margin:0!important; height:auto!important; background:transparent!important;}
  body.hero-search-active #hero-search::placeholder{color:#86868b!important; font-weight:600!important;}
  body.hero-search-active #hero-search:not(:placeholder-shown) ~ #hero-clear{display:flex!important; position:absolute; right:20px;}
  body.hero-search-active .hero-suggest{display:block!important;position:static!important;flex:1 1 auto!important;max-height:none!important;box-shadow:none!important;border-radius:0!important;margin-top:6px!important;overflow-y:auto!important;background:transparent!important;}
  
  /* Quick Links */
  .hero-quick-links { display: none; margin: 40px 20px 0 20px; }
  body.hero-search-active .hero-quick-links { display: block; }
  body.hero-search-active:has(#hero-suggest.open) .hero-quick-links { display: none; }
  .ql-title { font-size: 15px; font-weight: 500; color: #86868b; margin-bottom: 16px; }
  .ql-item { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; color: #1d1d1f; text-decoration: none; padding: 12px 0; }
  .ql-item svg { stroke: #86868b; width: 20px; height: 20px; }
}

/* MOBIL SOK v3 */
@media(max-width:900px){
  body.hero-search-active > nav{display:none!important;}
  body.hero-search-active #promo-banner{display:none!important;}
  body.hero-search-active .search-box{padding-top:calc(env(safe-area-inset-top, 0px) + 14px)!important;}
}

/* Hide quick links on PC */
@media(min-width:901px){
  .hero-quick-links { display: none !important; }
}

/* Hjemmeside: fjern hvitt kort, bredere gratt felt m/outline */
@media(max-width:900px){
  .search-box{background:transparent!important;box-shadow:none!important;padding:0!important;width:100%!important;}
  .search-input-wrap{border:1px solid #cfcfcf!important;background:#f1f3f4!important;border-radius:24px!important;padding:13px 16px!important;}
}

/* AI-ikon i felt + Google-pille mobil */
#ai-search-btn{display:inline-flex;align-items:center;gap:6px;}
#ai-search-btn .ai-icon{width:20px;height:20px;flex:0 0 auto;}
@media(max-width:900px){
  .search-row{position:relative!important;}
  .search-btn:not(.ai-btn){display:none!important;}
  .search-input-wrap{flex:1 1 auto!important;width:auto!important;background:#fff!important;border:1px solid #dfe1e5!important;border-radius:28px!important;box-shadow:0 1px 4px rgba(0,0,0,0.08)!important;padding:15px 56px 15px 18px!important;}
  #ai-search-btn{position:absolute!important;right:8px!important;top:0!important;bottom:0!important;height:auto!important;transform:none!important;width:46px!important;min-width:0!important;padding:0!important;margin:0!important;background:transparent!important;border:none!important;display:flex!important;align-items:center!important;justify-content:center!important;line-height:0!important;box-shadow:none!important;z-index:2!important;}
  #ai-search-btn .ai-text{display:none!important;}
  #ai-search-btn .ai-icon{width:24px!important;height:24px!important;transform:translateY(-2px)!important;}
  #ai-search-btn svg{fill:var(--accent,#0071e3)!important;}
  body.hero-search-active #ai-search-btn{display:none!important;}
}

/* === Mobil liste-toolbar (Filter | Sorter etter | +) === */
@media(max-width:900px){
  .lt-toolbar{position:-webkit-sticky!important;position:sticky!important;top:40px!important;z-index:205!important;background:rgba(245,245,247,0.9)!important;backdrop-filter:saturate(180%) blur(20px)!important;-webkit-backdrop-filter:saturate(180%) blur(20px)!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:nowrap!important;margin:0 -16px 14px -16px!important;padding:0 16px!important;border:none!important;box-shadow:0 1px 0 rgba(0,0,0,0.05)!important;height:44px!important;min-height:44px!important;width:calc(100% + 32px)!important;max-width:none!important;box-sizing:border-box!important;}
  .lt-toolbar .lt-right{display:flex!important;align-items:center!important;gap:10px!important;margin-left:auto!important;min-width:0!important;}
  .lt-toolbar .mobile-filter-toggle{display:inline-flex!important;align-items:center!important;gap:6px!important;background:none!important;border:none!important;box-shadow:none!important;border-radius:0!important;padding:0!important;margin:0!important;width:auto!important;max-width:none!important;font-size:15px!important;font-weight:500!important;color:var(--text,#1d1d1f)!important;cursor:pointer!important;}
  .lt-toolbar .lt-sort-label{font-size:15px!important;color:var(--text3,#86868b)!important;white-space:nowrap!important;}
  .lt-toolbar .lt-sort-select{border:none!important;background-color:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0 16px 0 0!important;margin:0!important;height:auto!important;min-height:0!important;width:auto!important;max-width:42vw!important;font-size:15px!important;font-weight:500!important;color:var(--text,#1d1d1f)!important;-webkit-appearance:none!important;appearance:none!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right center!important;background-size:12px!important;text-overflow:ellipsis!important;}
  .lt-toolbar .btn-primary.lt-post{background:none!important;background-color:transparent!important;border:none!important;box-shadow:none!important;color:var(--accent,#0071e3)!important;font-size:20px!important;line-height:1!important;font-weight:300!important;padding:0!important;margin:0!important;width:auto!important;min-width:0!important;height:auto!important;}
}

/* Fix 2026-06-20: mobil liste-toolbar klippet "+" pa sma skjermer (null slakk). Skjul "Sorter etter:"-label pa telefon + la select krympe. */
@media(max-width:480px){ .lt-toolbar .lt-sort-label{display:none!important;} }
@media(max-width:900px){ .lt-toolbar .lt-sort-select{min-width:0!important;flex:0 1 auto!important;} .lt-toolbar .lt-right{flex-shrink:1!important;min-width:0!important;} }
/* === PC sort-rad === */
.sort-lbl-pc{font-size:14px;color:var(--text3,#86868b);white-space:nowrap;}
.lt-post-icon{background:transparent!important;background-color:transparent!important;border:none!important;box-shadow:none!important;padding:2px!important;color:#000!important;min-width:0!important;width:auto!important;height:auto!important;}
.lt-post-icon svg{display:inline-block;stroke:#000;vertical-align:middle;}
.lt-sort-select-pc{border:none!important;background-color:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0 20px 0 0!important;font-size:14px!important;font-weight:500!important;color:var(--text)!important;-webkit-appearance:none!important;appearance:none!important;background-repeat:no-repeat!important;background-position:right center!important;background-size:12px!important;}

/* nav-mobile-post-btn: ren ikonknapp (ingen pille) */
@media(max-width:900px){
  .nav-mobile-post-btn{background:transparent!important;color:#000!important;border:none!important;border-radius:0!important;box-shadow:none!important;padding:4px!important;height:auto!important;line-height:0!important;margin-right:8px!important;}
  .nav-mobile-post-btn svg{stroke:#000;display:block;}
}

/* === Nav auth-knapper === */
.nav-auth-btn{background:transparent;border:none;cursor:pointer;padding:3px;display:inline-flex;align-items:center;justify-content:center;color:var(--text,#1d1d1f);border-radius:50%;}
.nav-auth-btn:hover{background:transparent;}
.nav-avatar-img{width:30px;height:30px;border-radius:50%;object-fit:cover;display:block;border:1.5px solid var(--border,#e0e0e0);}
.nav-auth-icon svg{display:block;}

/* nav auth */
.nav-auth-btn{background:transparent;border:none;cursor:pointer;padding:3px;display:inline-flex;align-items:center;justify-content:center;color:var(--text,#1d1d1f);border-radius:50%;}
.nav-auth-btn:hover{background:transparent;}
.nav-avatar-img{width:30px;height:30px;border-radius:50%;object-fit:cover;display:block;border:1.5px solid #e0e0e0;}
.nav-auth-icon svg{display:block;}

/* === PC sort-rad: ingen flash, ren CSS (ingen JS transform) === */
@media(min-width:901px){
  .main-results > div:first-child{display:flex!important;align-items:center!important;gap:8px!important;justify-content:flex-end!important;}
  .main-results select[id$="-sort"], .search-results select[id$="-sort"]{border:none!important;background-color:transparent!important;box-shadow:none!important;border-radius:0!important;padding:0 18px 0 0!important;font-size:14px!important;font-weight:500!important;color:var(--text)!important;-webkit-appearance:none!important;appearance:none!important;background-repeat:no-repeat!important;background-position:right center!important;background-size:12px!important;}
}
@media(min-width:901px){
  .main-results select[id$="-sort"], .search-results select[id$="-sort"]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important;}
}

/* === Nav ikon-knapper (språk + meldinger) === */
.nav-icon-btn{background:transparent!important;border:none!important;cursor:pointer;padding:0!important;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;color:#333;border-radius:0!important;transition:background .15s;flex:0 0 auto;box-shadow:none!important;}
.nav-icon-btn:hover{background:transparent!important;}
.nav-icon-btn svg{display:block;}
.nav-msg-btn{background:transparent!important;width:40px;height:40px;padding:0!important;}
.nav-msg-btn:hover{background:transparent!important;}

/* === Mobil drawer: Apple-stil, hvit bg === */
.mobile-nav-drawer{background:#F5F5F7!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.mobile-nav-drawer a,.mobile-nav-post,.mobile-auth-link{font-size:20px!important;font-weight:600!important;font-family:"SF Pro Display","SF Pro Icons","Helvetica Neue",Helvetica,Arial,sans-serif!important;letter-spacing:-0.02em!important;color:#161617!important;padding:14px 0!important;border-bottom:none!important;display:flex!important;align-items:center!important;gap:12px!important;background:transparent!important;border:none!important;width:100%!important;text-align:left!important;box-shadow:none!important;border-radius:0!important;cursor:pointer!important;line-height:1.2!important;}
.mobile-nav-post svg{width:28px!important;height:28px!important;flex:0 0 auto!important;fill:currentColor!important;}
.mobile-drawer-auth{margin-top:0!important;border-top:none;padding-top:0!important;}
.mobile-auth-logout{background:transparent;border:none;cursor:pointer;font-family:"SF Pro Display","SF Pro Icons","Helvetica Neue",Helvetica,Arial,sans-serif;color:#86868b;font-size:15px;font-weight:500;padding:8px 0;display:block;text-align:left;width:100%;}

/* Drawer bulletproof (ID) */
#mobile-nav-drawer{background:#F5F5F7!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
#mobile-nav-drawer a,#mobile-nav-drawer .mobile-nav-post,#mobile-nav-drawer .mobile-auth-link{font-size:20px!important;font-weight:600!important;font-family:"SF Pro Display","SF Pro Icons","Helvetica Neue",Helvetica,Arial,sans-serif!important;letter-spacing:-0.02em!important;color:#161617!important;border-bottom:none!important;padding:14px 0!important;display:flex!important;align-items:center!important;gap:12px!important;background:transparent!important;border:none!important;width:100%!important;text-align:left!important;border-radius:0!important;box-shadow:none!important;}
#mobile-nav-drawer .mobile-nav-post svg{width:28px!important;height:28px!important;fill:currentColor!important;flex:0 0 auto!important;}

/* Hides promo banner and shifts nav to top when mobile menu is active */
body.mobile-nav-active #promo-banner {
  display: none !important;
}
body.mobile-nav-active > nav {
  top: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  /* When open, the logo + action buttons are display:none, leaving the
     hamburger/X as the only flex child. With space-between a lone child sits at
     the start (left); flex-end keeps the X on the right where it belongs. */
  justify-content: flex-end !important;
}
body.mobile-nav-active .nav-logo,
body.mobile-nav-active .nav-actions,
body.mobile-nav-active .nav-globe-btn,
body.mobile-nav-active .nav-mobile-post-btn,
body.mobile-nav-active .chatbot-toggle {
  display: none !important;
}
body.mobile-nav-active #mobile-nav-drawer {
  top: 0 !important;
  height: 100dvh !important;
  padding-top: 70px !important;
}

/* ═══ MOBILE NAV: NUKE ALL PILL / BTN STYLING ═══
   These rules must be last to win specificity wars.
   They override .btn, .btn-primary, inline styles, etc.
*/
#mobile-nav-drawer .mobile-nav-post,
#mobile-nav-drawer .mobile-auth-link,
.mobile-nav-drawer .mobile-nav-post,
.mobile-nav-drawer .mobile-auth-link {
  /* Kill pill / btn */
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 11px 0 !important;
  /* Text matching other nav links */
  font-size: 36px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: #161617 !important;
  font-family: inherit !important;
  line-height: 1.15 !important;
  /* Layout */
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  text-align: left !important;
  cursor: pointer !important;
}

/* SVG icons scale with font */
#mobile-nav-drawer .mobile-nav-post svg,
#mobile-nav-drawer .mobile-auth-link svg,
.mobile-nav-drawer .mobile-nav-post svg,
.mobile-nav-drawer .mobile-auth-link svg {
  width: 1em !important;
  height: 1em !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  fill: currentColor !important;
  display: block !important;
}
.msg-item { border-bottom: none !important; }

/* ═══ TELEGRAM-STIL MELDINGER (redesign) ═══ */
@media(min-width:926px){
  /* Two-column list+chat only at >=926px (Telegram's breakpoint). Below this the chat
     slides in as a full-screen overlay (mobile-style), incl. iPad Air/Surface portrait. */
  /* Telegram-style proportional chat-list width: scales with viewport, clamped (min 16rem, max 26rem). Resizer overrides via inline --msg-sidebar-w. */
  #page-messages.active .messages-layout{--msg-sidebar-w:clamp(16rem, 30vw, 26rem);grid-template-columns:var(--msg-sidebar-w) 1fr;position:relative;}
  @media(min-width:1276px){ #page-messages.active .messages-layout{--msg-sidebar-w:clamp(18rem, 27vw, 30rem);} }
  #page-messages .chat-messages.tg-chat{padding:14px 6%;}
  #page-messages .chat-input-row{padding:8px 6% 10px !important;}
  /* Sidebar is a query container so it can collapse to avatars-only when dragged narrow */
  #page-messages .msg-list{container-type:inline-size;}
}
/* Collapse the conversation list to profile pictures only (macOS Messages style) when narrow */
@container (max-width:150px){
  #page-messages .msg-item{justify-content:center;gap:0;padding:8px 0;margin:1px 0;border-radius:0;}
  #page-messages .msg-item .msg-content{display:none;}
  #page-messages .msg-item .msg-avatar{width:48px;height:48px;font-size:19px;}
  #page-messages .msg-item.active{background:transparent;}
  #page-messages .msg-item.active .msg-avatar{box-shadow:0 0 0 2px #fff,0 0 0 4px #3390ec;}
  #page-messages .msg-item:hover{background:transparent;}
  #page-messages .msg-item:hover .msg-avatar{box-shadow:0 0 0 2px #fff,0 0 0 4px #e9eaee;}
  #page-messages .msg-list-header{justify-content:center;padding:8px 0 !important;}
  #page-messages .msg-list-header .msg-search-wrap{display:none;}
  #page-messages .msg-list-header .msg-header-menu{display:none;}
}
.msg-resizer{position:absolute;top:0;bottom:0;left:var(--msg-sidebar-w,320px);width:9px;transform:translateX(-5px);cursor:col-resize;z-index:40;touch-action:none;}
.msg-resizer::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:2px;transform:translateX(-1px);background:transparent;transition:background .12s;}
.msg-resizer:hover::after,.msg-resizer.dragging::after{background:#3390ec;}
body.msg-resizing{cursor:col-resize;user-select:none;}
@media(max-width:925px){.msg-resizer{display:none;}}
/* Touch devices (iPad/Surface): bigger grab area for the resizer */
@media(pointer:coarse){.msg-resizer{width:28px;transform:translateX(-14px);}}
#page-messages .msg-list{background:#fff;border-right:1px solid #e9eaee;}
#page-messages .msg-list-header{background:#fff;border-bottom:none;padding:10px 12px 8px;}
/* Telegram-style search bar (mobile + PC): rounded, gray, accent border + white bg on focus */
#page-messages .msg-search{height:40px !important;background:#f4f4f5 !important;border:2px solid #f4f4f5 !important;border-radius:22px !important;padding:0 14px 0 42px !important;font-size:15px !important;color:#1c1c1e !important;box-sizing:border-box !important;outline:none !important;transition:border-color .15s ease, background-color .15s ease !important;}
#page-messages .msg-search::placeholder{color:#8e8e93 !important;}
#page-messages .msg-search:focus{border-color:#3390ec !important;background:#fff !important;}
#page-messages .msg-search-wrap svg{width:20px !important;height:20px !important;left:13px !important;transition:stroke .15s ease;}
#page-messages .msg-search-wrap:focus-within svg{stroke:#3390ec !important;}
#page-messages .msg-item{padding:8px 10px;margin:1px 7px;border-radius:12px;gap:11px;border-bottom:none !important;}
#page-messages .msg-item:hover{background:rgba(0,0,0,.04);}
/* Touch devices: don't let the hover background stick after a tap */
@media(hover:none){#page-messages .msg-item:hover{background:transparent;}}
#page-messages .msg-item.active{background:#3390ec;}
#page-messages .msg-item.active .msg-name,#page-messages .msg-item.active .msg-preview,#page-messages .msg-item.active .msg-time{color:#fff !important;}
#page-messages .msg-avatar{width:54px;height:54px;font-size:21px;}
#page-messages .msg-name{font-size:15px;font-weight:600;color:#0a0a0a;}
#page-messages .msg-time{font-size:12px;color:#a8abb2;font-weight:400;}
#page-messages .msg-preview{font-size:14px;color:#8b8e95;}
.msg-unread{min-width:21px;height:21px;padding:0 6px;border-radius:11px;background:#3390ec;color:#fff;font-size:12px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;margin-left:auto;flex-shrink:0;}
#page-messages .msg-item.active .msg-unread{background:#fff;color:#3390ec;}
#page-messages .chat-header{margin:0 !important;border-radius:0 !important;box-shadow:0 1px 0 rgba(0,0,0,.06),0 2px 8px rgba(0,0,0,.04) !important;padding:9px 18px !important;background:#fff !important;}
#page-messages .chat-messages.tg-chat{background-color:#d9e2d3;background-image:radial-gradient(rgba(255,255,255,.5) 1.4px,transparent 1.5px),radial-gradient(rgba(255,255,255,.28) 1.4px,transparent 1.5px),linear-gradient(160deg,#e6efe0 0%,#d4e2d7 45%,#cedde2 100%);background-size:26px 26px,26px 26px,100% 100%;background-position:0 0,13px 13px,0 0;gap:2px;}
.tg-date-sep{display:flex;justify-content:center;margin:14px 0 10px;position:sticky;top:4px;z-index:3;pointer-events:none;transition:opacity .3s ease;}
.tg-date-sep span{background:rgba(0,0,0,.16);color:#fff;font-size:12.5px;font-weight:600;padding:4px 12px;border-radius:14px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);}
/* Telegram-style: the pinned (floating) date shows while scrolling, fades when idle; inline dates stay */
#page-messages .chat-messages.tg-chat:not(.chat-scrolling) .tg-date-sep.is-stuck{opacity:0;}
/* Telegram-style new-message mount: slide up + fade, applied only to freshly-appended bubbles */
@keyframes chat-msg-mount{from{transform:translateY(1rem);opacity:0}to{transform:translateY(0);opacity:1}}
#page-messages .chat-bubble-wrap.msg-mount{animation:chat-msg-mount .2s ease-out}
/* Telegram-style menu scale-in: dropdowns pop open from their anchor corner (plays when display flips from none) */
@keyframes chat-menu-pop{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
/* Telegram bubble-menu styling for the chat-header dropdown (PC + mobile):
   right-top placement, scale .85->1 + opacity over 150ms cubic-bezier(.2,0,.2,1),
   padding .5rem 0, min-width 13.5rem, soft shadow, custom-scroll. */
#chat-header-menu{
  transform-origin:top right;
  padding:.5rem 0 !important;
  min-width:216px !important; width:auto !important;
  border:none !important;
  background:rgba(255,255,255,.93) !important;-webkit-backdrop-filter:blur(20px) saturate(1.6);backdrop-filter:blur(20px) saturate(1.6);
  border-radius:12px !important;
  box-shadow:0 4px 8px 2px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.08) !important;
  max-height:min(70vh,460px); overflow-y:auto !important; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:rgba(0,0,0,.18) transparent;
}
#chat-header-menu::-webkit-scrollbar{width:6px;}
#chat-header-menu::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18);border-radius:3px;}
#chat-header-menu::-webkit-scrollbar-track{background:transparent;}
#chat-header-menu button{padding:12px 16px !important;gap:16px !important;font-size:15px !important;border-bottom:none !important;line-height:1.5;transition:background .12s ease;}
#chat-header-menu button:hover{background:rgba(0,0,0,.06) !important;}
/* Telegram MenuItem: gray ~22px icons (destructive = red), more space to the label */
#chat-header-menu button svg{width:22px !important;height:22px !important;color:#8a8a8e;flex-shrink:0;}
#chat-header-menu button[style*="ef4444"] svg{color:#ef4444;}
/* General (chat) settings — Telegram card layout: gray panel, white rounded cards, section labels */
#panel-chat-settings-content{background:#f2f2f7 !important;}
.set-section-label{font-size:13px;color:#8a8a8e;font-weight:500;padding:16px 6px 7px;}
.set-section-label:first-child{padding-top:2px;}
.set-card{background:#fff;border-radius:12px;overflow:hidden;}
.set-card .set-row{display:flex;align-items:center;gap:14px;padding:13px 16px;font-size:15px;color:#1c1c1e;margin:0;}
.set-card .set-row + .set-row{border-top:1px solid #ececec;}
.set-row-col{flex-direction:column;align-items:stretch;gap:10px;}
.set-row-head{display:flex;justify-content:space-between;align-items:center;width:100%;}
.set-val{color:#8a8a8e;}
.set-row.clickable{cursor:pointer;}
.set-row.clickable:active{background:rgba(0,0,0,.04);}
.set-slider{width:100%;accent-color:var(--accent,#0071e3);}
.set-radio{width:20px;height:20px;accent-color:var(--accent,#0071e3);flex-shrink:0;margin:0;}
#sidebar-menu-dropdown{transform-origin:top left;animation:chat-menu-pop .14s ease-out}
#chat-attach-menu{transform-origin:bottom right;}
/* send-button press pop */
#page-messages .chat-input-row .btn-primary{transition:transform .1s ease}
#page-messages .chat-input-row .btn-primary:active{transform:scale(.86)}
/* Telegram grow-icon: pop the delivery checkmark when a sent message confirms */
@keyframes chat-grow-pop{0%{transform:scale(.5);opacity:.8}50%{transform:scale(1.1);opacity:1}100%{transform:scale(1)}}
#page-messages .bubble-status.status-pop{animation:chat-grow-pop .3s ease-out}
/* emoji picker: rise + scale in */
/* Telegram desktop: scale 0.85 -> 1 + fade, 150ms in / 200ms out (their Menu .bubble) */
@keyframes ep-pop-in{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes ep-pop-out{from{transform:scale(1);opacity:1}to{transform:scale(.85);opacity:0}}
#emoji-picker.open{animation:ep-pop-in 150ms cubic-bezier(0.2,0,0.2,1);transform-origin:left bottom;}
#emoji-picker.ep-closing{animation:ep-pop-out 200ms ease-in forwards;transform-origin:left bottom;}
/* Telegram mode-switch: fade + slide the body content when swapping emoji/gif/sticker panes */
@keyframes ep-fade-slide{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
#emoji-picker .emoji-body.ep-anim{animation:ep-fade-slide .2s ease}
/* sidebar item hover/press feedback */
#page-messages .msg-item{transition:background .12s ease}
/* "new message" jump indicator pops in */
.virt-new-msg-btn{animation:chat-grow-pop .25s ease-out}
/* emoji menu internals: emojis pop on hover/tap, smooth tab/mode + gif hover */
#emoji-picker .emoji-cell{transition:transform .1s ease, background .12s ease}
#emoji-picker .emoji-cell:hover{transform:scale(1.25)}
#emoji-picker .emoji-cell:active{transform:scale(.9)}
#emoji-picker .emoji-tab,#emoji-picker .ep-mode,#emoji-picker .ep-back{transition:background .15s ease, color .15s ease, opacity .15s ease}
#emoji-picker .gif-cell{transition:transform .12s ease}
#emoji-picker .gif-cell:hover{transform:scale(1.05)}
#page-messages .chat-bubble-wrap{margin-top:2px;align-items:flex-end;gap:0;}
#page-messages .chat-bubble{position:relative;max-width:74%;padding:5px 9px 4px 10px;border-radius:16px;font-size:14.5px;line-height:1.34;box-shadow:0 1px 1px rgba(0,0,0,.13);display:flex;flex-direction:column;}
#page-messages .bubble-in{background:#fff !important;color:#0a0a0a !important;border-bottom-left-radius:5px;}
#page-messages .bubble-out{background:#effdde !important;color:#0a0a0a !important;border-bottom-right-radius:5px;}
/* Telegram-style grouping: bigger gap between sender runs; tail/round only at group edges */
#page-messages .chat-bubble-wrap.first-in-group{margin-top:10px;}
#page-messages .wrap-out:not(.first-in-group) .chat-bubble{border-top-right-radius:6px;}
#page-messages .wrap-out:not(.last-in-group) .chat-bubble{border-bottom-right-radius:6px;}
#page-messages .chat-bubble-wrap:not(.wrap-out):not(.first-in-group) .chat-bubble{border-top-left-radius:6px;}
#page-messages .chat-bubble-wrap:not(.wrap-out):not(.last-in-group) .chat-bubble{border-bottom-left-radius:6px;}
/* Telegram curl tail (SVG appendix) on last text bubble of a group; .corner matches bubble bg */
#page-messages .svg-appendix{position:absolute;bottom:-1px;width:9px;height:20px;}
#page-messages .bubble-in .svg-appendix{left:-8px;}
#page-messages .bubble-in .svg-appendix .corner{fill:#fff;}
#page-messages .bubble-out .svg-appendix{right:-8px;}
#page-messages .bubble-out .svg-appendix .corner{fill:var(--accent,#0071e3);}
.bubble-text{white-space:pre-wrap;word-break:break-word;}
.bubble-meta{align-self:flex-end;margin-top:1px;font-size:11px;line-height:1;color:#9aa0a6;user-select:none;white-space:nowrap;}
.bubble-out .bubble-meta{color:#62a85a;}
.tg-checks{margin-left:2px;letter-spacing:-2px;}
.tg-checks.tg-read{color:#4ead4e;}
#page-messages .chat-input{background:#fff !important;border:none !important;border-radius:22px !important;box-shadow:0 1px 3px rgba(0,0,0,.12) !important;padding:12px 18px 12px 46px !important;font-size:15px;}
@media(max-width:600px){#page-messages .chat-messages.tg-chat{padding:16px 12px 90px;}}

/* === Telegram meldinger justeringer v2 === */
#page-messages .bubble-out{background:var(--accent,#0071e3) !important;color:#fff !important;}
.bubble-out .bubble-meta{color:rgba(255,255,255,.72) !important;}
#page-messages .msg-list{overflow-x:hidden;}
#page-messages .msg-item{width:auto !important;}
#page-messages .msg-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#page-messages .chat-header{height:52px !important;box-sizing:border-box;}
#page-messages .chat-area{background-color:#dfe7e8 !important;background-image:radial-gradient(rgba(255,255,255,.5) 1.4px,transparent 1.5px),radial-gradient(rgba(255,255,255,.28) 1.4px,transparent 1.5px),linear-gradient(160deg,#e6efe0 0%,#d8e3dd 45%,#d2dde2 100%);background-size:26px 26px,26px 26px,100% 100%;background-position:0 0,13px 13px,0 0;}
#page-messages .chat-messages.tg-chat{background:transparent !important;}
/* Emoji-knapp + picker */
.chat-input-wrap{position:relative;flex:1;display:flex;}
.chat-emoji-btn{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:30px;height:30px;border:none;background:none;cursor:pointer;color:#8a9aa5;display:flex;align-items:center;justify-content:center;padding:0;border-radius:50%;z-index:2;}
.chat-emoji-btn:hover{color:var(--accent,#0071e3);}
/* Telegram-style light frosted-glass panel */
#emoji-picker{position:fixed;z-index:100000;width:384px;max-width:92vw;height:358px;background:rgba(255,255,255,.86);-webkit-backdrop-filter:blur(25px) saturate(1.6);backdrop-filter:blur(25px) saturate(1.6);border:1px solid rgba(0,0,0,.06);border-radius:20px;box-shadow:0 12px 44px rgba(0,0,0,.18);display:none;flex-direction:column;overflow:hidden;}
#emoji-picker.open{display:flex;}
/* Telegram-identical top icon bar: fixed-size square icons, scrollable, space-between, grey active pill */
.emoji-tabs{display:flex;align-items:center;justify-content:space-between;overflow-x:auto;overflow-y:hidden;white-space:nowrap;border-bottom:1px solid rgba(0,0,0,.07);padding:6px 8px;flex-shrink:0;scrollbar-width:none;}
.emoji-tabs::-webkit-scrollbar{height:0;}
.emoji-tab{flex:0 0 auto;width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;line-height:1;padding:0;border-radius:8px;color:#8a9aa5;transition:color .15s ease,background .15s ease;}
.emoji-tab svg{width:24px;height:24px;display:block;pointer-events:none;}
.emoji-tab:hover{background:rgba(0,0,0,.05);}
.emoji-tab.active{color:#1c1c1e;}                          /* Telegram: active category = dark text colour (--color-text), no pill */
.emoji-tab.anim-cat.active{background:rgba(0,0,0,.08);}    /* animoji-image tabs can't be recoloured, so keep a pill */
.emoji-tab-ic{width:23px;height:23px;display:block;pointer-events:none;object-fit:contain;}
.emoji-grid{flex:1;overflow-y:auto;padding:4px 10px 12px;}
.emoji-cat-title{font-size:11px;font-weight:700;color:#9aa0a6;margin:10px 2px 4px;text-transform:uppercase;letter-spacing:.4px;}
.emoji-grid-row{display:grid;grid-template-columns:repeat(8,1fr);gap:1px;}
/* one-long-list category sections; titles scroll with content (Telegram has NO sticky title) */
.symbol-set{position:relative;margin-bottom:6px;}
.symbol-set-title{display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:500;color:rgba(112,117,121,.9);margin:0;padding:8px 4px 3px;}
.symbol-set-container{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;}
/* animert/gif/sticker chrome: compact frosted category pills + slim search (Telegram-clean) */
.ep-cat-bar{display:flex;gap:6px;overflow-x:auto;white-space:nowrap;padding:8px 10px 9px;border-bottom:1px solid rgba(0,0,0,.07);scrollbar-width:none;}
.ep-cat-bar::-webkit-scrollbar{height:0;}
.ep-cat-btn{flex:0 0 auto;padding:6px 13px;border:none;border-radius:15px;background:rgba(0,0,0,.05);color:#3a3a3c;cursor:pointer;font-size:13px;font-weight:500;transition:background .15s ease,color .15s ease;}
.ep-cat-btn:hover{background:rgba(0,0,0,.09);}
.ep-cat-btn.active{background:rgba(0,113,227,.14);color:var(--accent,#0071e3);}
.ep-search-bar{padding:8px 10px;position:sticky;top:0;background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:2;}
.ep-search{width:100%;box-sizing:border-box;border:none;background:rgba(0,0,0,.05);border-radius:18px;padding:8px 14px;font-size:14px;outline:none;color:#1a1a1a;}
.ep-search::placeholder{color:#9aa0a6;}
.emoji-cell{border:none;background:none;cursor:pointer;font-size:23px;line-height:1;padding:5px 0;border-radius:8px;}
.emoji-cell:hover{background:rgba(0,0,0,.06);}
/* Fjern grå bar/border rundt chat-input — flytende som Telegram */
#page-messages .chat-input-row{background:transparent !important;border-top:none !important;}

/* === Emoji-picker v2: bunnlinje + GIF === */
#emoji-picker{height:358px !important;}  /* Telegram --symbol-menu-height 22.375rem */
.emoji-body{flex:1;overflow-y:auto;padding:4px 10px 10px;}
.emoji-foot{height:46px;flex-shrink:0;border-top:1px solid rgba(0,0,0,.08);display:flex;align-items:center;gap:2px;padding:0 8px;}
.ep-mode{border:none;background:none;cursor:pointer;font-size:18px;font-weight:700;color:#8a9aa5;width:42px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
.ep-mode.active{background:rgba(0,0,0,.06);color:#1c1c1e;}
.ep-mode[data-m=gif]{font-size:12px;letter-spacing:.5px;}
.ep-mode svg,.ep-back svg{width:24px;height:24px;display:block;}
.ep-back{margin-left:auto;border:none;background:none;cursor:pointer;color:#8a9aa5;width:42px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;}
.ep-back:hover,.ep-mode:hover{background:rgba(0,0,0,.05);}
.emoji-cat-title{display:flex;align-items:center;justify-content:space-between;}
.ep-clear-recent{border:none;background:none;cursor:pointer;color:#c0c4c9;font-size:13px;padding:2px 6px;border-radius:6px;line-height:1;}
.ep-clear-recent:hover{background:rgba(0,0,0,.05);color:#888;}
.gif-search-wrap{padding:4px 2px 8px;position:sticky;top:0;background:rgba(255,255,255,.85);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:2;}
.gif-search{width:100%;box-sizing:border-box;border:none;background:#f1f2f5;border-radius:18px;padding:9px 14px;font-size:14px;outline:none;}
.gif-grid{column-count:2;column-gap:6px;}
.gif-cell{border:none;background:none;padding:0;margin:0 0 6px;cursor:pointer;width:100%;break-inside:avoid;display:block;}
.gif-cell img{width:100%;border-radius:10px;display:block;}
.bubble-gif{max-width:230px;width:100%;border-radius:12px;display:block;}
#page-messages .chat-bubble.has-gif{padding:3px !important;background:transparent !important;box-shadow:none !important;position:relative;}
#page-messages .chat-bubble.has-gif .bubble-meta{position:absolute;right:9px;bottom:8px;background:rgba(0,0,0,.45);color:#fff !important;padding:1px 7px;border-radius:9px;margin:0;}
/* Animert emoji + GIF-opplasting */
.anim-emoji{padding:3px !important;}
.anim-emoji img{width:30px;height:30px;display:block;margin:0 auto;}
.gif-bar{padding:2px 2px 8px;position:sticky;top:0;background:rgba(255,255,255,.85);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:2;}
.gif-upload-btn{width:100%;border:1px dashed #c9ccd2;background:#f7f8fa;color:#666;border-radius:12px;padding:9px;font-size:13px;font-weight:600;cursor:pointer;}
.gif-upload-btn:hover{background:#eef0f3;}
.gif-cell img{min-height:40px;background:#f1f2f5;}
/* GIF 3x3-grid */
#emoji-picker .gif-grid{column-count:unset !important;display:grid !important;grid-template-columns:repeat(3,1fr);gap:6px;}
#emoji-picker .gif-cell{margin:0 !important;aspect-ratio:1;overflow:hidden;border-radius:10px;width:auto !important;}
#emoji-picker .gif-cell img{width:100% !important;height:100% !important;object-fit:cover;border-radius:10px;min-height:0 !important;}
/* Stickers: vis hele bildet (ikke beskjær) */
#sticker-grid .gif-cell img{object-fit:contain !important;}
/* Telegram mobile: emoji menu = full-width bottom sheet, --symbol-menu-height 17.6875rem; input bar lifts above it */
@keyframes ep-slide-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes ep-slide-down{from{transform:translateY(0)}to{transform:translateY(100%)}}
@media (max-width:925px){
  #emoji-picker{left:0 !important;right:0 !important;bottom:0 !important;top:auto !important;width:100vw !important;max-width:100vw !important;height:17.6875rem !important;border-radius:16px 16px 0 0 !important;box-shadow:0 -6px 24px rgba(0,0,0,.16) !important;}
  /* Telegram mobile slide: translateY over 300ms cubic-bezier(0.33,1,0.68,1) (--layer-transition) */
  #emoji-picker.open{animation:ep-slide-up 300ms cubic-bezier(0.33,1,0.68,1) !important;transform-origin:bottom;}
  #emoji-picker.ep-closing{animation:ep-slide-down 300ms cubic-bezier(0.33,1,0.68,1) forwards !important;}
  /* Lift the chat area above the open emoji panel; the input (position:absolute;bottom:0)
     rides up with it, so it lands exactly on the panel top. NOTE: do NOT also position:fixed
     the input — the chat-area's slide transform makes IT the containing block, so a fixed
     bottom:17.6875rem would stack on top of this lift (input ended up mid-screen). */
  body.ep-open .chat-area{bottom:17.6875rem !important;transition:bottom 300ms cubic-bezier(0.33,1,0.68,1);}
  /* slightly bigger emoji on the wider mobile grid */
  #emoji-picker .emoji-cell{font-size:26px;}
}

/* Mobil meldinger: fyll dynamisk viewport, ingen overscroll/gap */
#page-messages.active{ height:100dvh !important; padding-bottom: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
html:has(#page-messages.active){ overscroll-behavior:none; height:100%; }
body:has(#page-messages.active){ overscroll-behavior:none; overflow:hidden; height:100dvh; }
/* Mobile messaging layout applies for the WHOLE range below the desktop grid (769px),
   not just <=600 — otherwise 601-768px is a dead zone. chat-area fills via top+bottom.
   Open/close = TRANSFORM TRANSITION like Telegram (#MiddleColumn slides translateX
   0<->100vw over --layer-transition); both list + chat stay mounted (interruptible). */
@media(max-width:925px){
  #page-messages.active .msg-list{ overscroll-behavior:none; height:100%; transition:transform 300ms cubic-bezier(0.33,1,0.68,1); }
  /* Default = NO transition, so closing via the iOS edge-swipe-back is instant (its native gesture
     provides the animation; our own 300ms slide on top of it made the chat bounce). JS adds
     .slide-anim for app-initiated actions (opening a chat + the in-app back button ←) so those keep
     the Telegram slide. Bug 2026-06-16. */
  .chat-area{position:fixed;top:48px;left:0;right:0;bottom:0;z-index:10001;background:var(--bg);display:flex;flex-direction:column;overflow:hidden;height:auto !important;transform:translateX(100%);transition:none;}
  .chat-area.slide-anim{transition:transform 300ms cubic-bezier(0.33,1,0.68,1);}
  .chat-area.mobile-open{transform:translateX(0);}
  /* Telegram parallax: list shifts slightly left while the chat covers it (#LeftColumn -5rem) */
  .messages-layout:has(.chat-area.mobile-open) .msg-list{transform:none;}
  #page-messages.active .chat-messages{flex:1;overflow-y:auto;padding:16px 16px 85px 16px;min-height:0;overscroll-behavior:none;}
  .chat-input-row{position:absolute;bottom:0;left:0;right:0;padding:8px 12px 10px 12px;background:transparent;border-top:none;display:flex;gap:10px;z-index:2;}
  .chat-header{padding:12px 16px}
}

/* TABLET PORTRAIT (769-925px, e.g. iPad Air / Surface Pro stående): 2-column like
   desktop, BUT opening a chat takes over full-screen with a slide-in, and Back collapses
   back to the 2-column view (so you never see a full-width message list). Overrides the
   single-column slide block above for this range. */
@keyframes tgChatPaneIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
@media(min-width:769px) and (max-width:925px){
  /* 2-column grid, 50/50 split (equal list + chat) on tablet portrait */
  #page-messages.active .messages-layout{grid-template-columns:1fr 1fr;}
  /* chat sits in the right column by default -> 2-column is visible (this is the "back" state) */
  .chat-area{position:relative;top:auto;left:auto;right:auto;bottom:auto;transform:none;z-index:auto;}
  /* tapping a chat: full-screen overlay that slides in over the list */
  .chat-area.mobile-open{position:fixed;top:48px;left:0;right:0;bottom:0;z-index:10001;transform:none;animation:tgChatPaneIn 300ms cubic-bezier(0.33,1,0.68,1);}
  /* back button only while a chat is full-screen; in the 2-column state the list is already visible */
  .mobile-back-btn{display:none !important;}
  .chat-area.mobile-open .mobile-back-btn{display:flex !important;}
}

/* Chat select mode background */
.chat-select-mode .chat-bubble-wrap {
    cursor: pointer;
    margin-left: -6.8181818%;
    margin-right: -6.8181818%;
    padding-left: 6.8181818%;
    padding-right: 6.8181818%;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-top: -2px;
    margin-bottom: -2px;
    transition: background 0.15s ease;
}
.chat-select-mode .chat-bubble-wrap.selected {
    background-color: rgba(0, 113, 227, 0.12);
}
@media(max-width: 600px) {
    .chat-select-mode #page-messages .chat-messages.tg-chat .chat-bubble-wrap {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* ─── FULLSCREEN IMAGE VIEWER ─── */
#chat-image-viewer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 15, 15, 0.95);
    z-index: 100000;
    display: flex;
    flex-direction: column;
}
.civ-header {
    height: 56px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    background: transparent;
    z-index: 10;
}
.civ-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
}
.civ-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}
.civ-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* We'll handle panning via js */
    position: relative;
    cursor: grab;
}
.civ-body:active {
    cursor: grabbing;
}
.civ-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease;
    transform-origin: center center;
    pointer-events: none; /* Let the body catch the mouse events */
}
.civ-zoom-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    z-index: 10;
}
.civ-zoom-bar input[type="range"] {
    width: 150px;
    accent-color: #fff;
    cursor: pointer;
}

/* Update border-radius to 8px in listings */
#page-listing .btn,
#page-listing .listing-action-btn,
#page-listing .listing-mobile-action-btn,
.listing-stats-bar,
.listing-sidebar-card {
  border-radius: 8px !important;
}

@media (min-width: 901px) {
  .listing-hero {
    border-radius: 8px !important;
  }
}

/* Animoji Navigation */
.animoji-nav-scroll::-webkit-scrollbar {
    display: none;
}
.animoji-nav-scroll {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}




.lt-post-text { display: none; }
@media (min-width: 901px) {
  .lt-post-text {
    display: inline-block;
    margin-left: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    color: #000;
  }
  /* Pull the + icon closer to the "Legg ut annonse" text (was .btn gap 8px + 6px) */
  .btn.lt-post-icon { gap: 4px; }
}

@media(min-width:901px){
  .hide-on-desktop { display: none !important; }
}

/* ── Tesla About Us Redesign ──────────────────────────────── */
#page-about {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
  background: #000;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99; /* Below the fixed nav (z-index 100) */
}

#page-about::-webkit-scrollbar {
  display: none;
}

.tesla-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.tesla-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.tesla-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 2;
}

.tesla-hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  text-align: center;
  padding: 0 5%;
  max-width: 900px;
}

.tesla-hero-content.align-left {
  text-align: left;
  align-self: flex-start;
  margin-left: 8%;
}

.tesla-hero-content.align-right {
  text-align: right;
  align-self: flex-end;
  margin-right: 8%;
}

.tesla-hero-title {
  font-size: 64px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.tesla-hero-subtitle {
  font-size: 24px;
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tesla-section-title {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.tesla-section-text {
  font-size: 22px;
  line-height: 1.6;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tesla-hero-stats {
  position: absolute;
  bottom: 8vh;
  left: 0;
  width: 100%;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 120px;
  color: #fff;
  text-align: center;
  padding: 0 20px;
}

.tesla-stat-number {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tesla-stat-label {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tesla-badge-overlay {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  margin-top: 40px;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 18px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.tesla-badge-overlay svg { color: #10b981; }

.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .tesla-hero-title { font-size: 40px; }
  .tesla-hero-subtitle { font-size: 18px; }
  .tesla-section-title { font-size: 32px; }
  .tesla-section-text { font-size: 18px; }
  
  .tesla-hero-stats { flex-direction: column; gap: 30px; bottom: 5vh; }
  
  .tesla-hero-content.align-left, .tesla-hero-content.align-right {
    text-align: center;
    align-self: center;
    margin: 0;
  }
  
  .tesla-badge-overlay {
    flex-direction: column;
    text-align: center;
    font-size: 16px;
  }
}

/* ── Navbar overwrites ONLY for About Page ── */
body:has(#page-about.active) #promo-banner {
  display: none !important;
}

body:has(#page-about.active) nav {
  background: transparent !important;
  position: absolute !important; /* Non-sticky */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

body:has(#page-about.active) .nav-logo {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

body:has(#page-about.active) .nav-links a {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

body:has(#page-about.active) .nav-right .login-btn {
  color: #fff !important;
  border-color: rgba(255,255,255,0.4) !important;
  background: rgba(255,255,255,0.1) !important;
}

body:has(#page-about.active) .mobile-nav-toggle {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

body:has(#page-about.active) .nav-right .add-btn {
  /* Keep standard button colors or customize if needed */
}

/* Additional fixes for nav on About page */
body:has(#page-about.active) nav {
  top: 0 !important;
}
body:has(#page-about.active) nav .btn,
body:has(#page-about.active) nav .nav-icon-btn,
body:has(#page-about.active) nav .nav-auth-btn,
body:has(#page-about.active) nav .nav-msg-btn,
body:has(#page-about.active) nav .nav-globe-btn,
body:has(#page-about.active) nav .nav-hamburger,
body:has(#page-about.active) nav .nav-mobile-post-btn,
body:has(#page-about.active) nav .lt-post-icon {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

/* Facility checkbox lists in the post modal — extracted from 66x repeated
   inline styles (label + checkbox). Selector specificity (label.fac-label =
   0,1,1) matches/beats `.form-group label`, and the descendant rule beats
   `.form-group input`, so layout is unchanged whether or not a .form-group
   wraps the facilities section. */
label.fac-label { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; }
label.fac-label input[type="checkbox"] { width:16px; height:16px; cursor:pointer; }

/* Close-button "X" icon — extracted from the identical inline style repeated
   on the <svg> in every modal-close button (16x across modal templates).
   No other rule targets `.modal-close svg`, so computed styles are unchanged. */
.modal-close svg { display:block; height:16px; width:16px; stroke:currentColor; stroke-width:3; overflow:visible; }

/* ═══ ALLE SIDEFILTRE — grupperte, sammenleggbare seksjoner ═══ */
.sidebar-filters .sidebar-section { padding:16px 0; border-top:1px solid var(--border); }
.sidebar-filters .sidebar-section:first-child, .sidebar-filters .buy-top, .sidebar-filters .sidebar-top, .sidebar-filters .buy-reset, .sidebar-filters .sidebar-reset { border-top:none; }
.sidebar-filters .buy-top, .sidebar-filters .sidebar-top { padding-top:2px; }
.sidebar-filters .sidebar-section > h4 { display:flex; align-items:center; gap:8px; margin:0; padding:2px 0; font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:#6e6e73; }
.sidebar-filters .sidebar-section > h4 .ss-icon { width:15px; height:15px; flex-shrink:0; color:var(--accent); opacity:.85; }
.sidebar-filters .ss-header:hover { opacity:1; color:var(--text); }
.sidebar-filters .ss-chev { color:#9b9ba0; }
.sidebar-filters .ss-body { margin-top:13px; }

/* Søkefelt: flatt (ingen drop-skygge) — matcher selects/range-boksene, kun blå ring ved fokus */
.sidebar-filters .search-input-wrap { box-shadow:none; border:1.5px solid var(--border2); background:var(--surface2); border-radius:12px; }
.sidebar-filters .search-input-wrap:focus-within { box-shadow:0 0 0 3px rgba(0,113,227,.1); border-color:var(--accent); background:var(--surface); }

.filter-sublabel { font-size:13px; font-weight:600; color:var(--text2); margin:15px 0 8px; }

.fac-check-list { display:flex; flex-direction:column; gap:1px; margin-top:4px; }
.fac-check-row { display:flex; align-items:center; gap:11px; padding:8px; font-size:14px; color:var(--text); cursor:pointer; border-radius:8px; transition:background .15s; }
.fac-check-row:hover { background:var(--surface2); }
.fac-check-row input[type="checkbox"] { flex-shrink:0; }
.fac-check-row span { line-height:1.25; }

/* Slanke min–maks range-felt (pris/fellesutgifter/areal/tomt) med inline kr/m²-suffiks */
.range-row { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.range-box { flex:1; min-width:0; display:flex; align-items:center; height:36px; padding:0 11px; border:1.5px solid var(--border2); border-radius:10px; background:var(--surface2); transition:border-color .15s, background .15s, box-shadow .15s; }
.range-box:focus-within { border-color:var(--accent); background:var(--surface); box-shadow:0 0 0 3px rgba(0,113,227,.1); }
.sidebar-filters .range-box input { flex:1; min-width:0; width:100%; height:auto !important; border:none !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; outline:none; font-size:14px; color:var(--text); font-family:inherit; padding:0 !important; -moz-appearance:textfield; }
.range-box input::-webkit-outer-spin-button, .range-box input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.range-box input::placeholder { color:var(--text3); }
.range-box em { flex-shrink:0; margin-left:6px; font-style:normal; font-size:13px; color:var(--text3); }
.range-sep { flex-shrink:0; color:var(--text3); font-size:15px; }
@media (max-width:900px) {
  .range-box { height:44px; padding:0 13px; }
  .sidebar-filters .range-box input { font-size:16px !important; }
}

/* ═══ MOBIL: filter-bunnark — perfeksjonert (gjelder alle filter-sider) ═══ */
@media (max-width: 900px) {
  .sidebar-filters { height: 88vh !important; }
  .filter-backdrop { background: rgba(0,0,0,.55); }

  /* Header: dra-håndtak + sentrert tittel + lukk-X oppe til høyre */
  .filter-modal-header { padding: 18px 20px 12px !important; position: relative; }
  .filter-modal-header::before { content:""; position:absolute; top:8px; left:50%; transform:translateX(-50%); width:40px; height:5px; border-radius:3px; background:#d6d6dc; pointer-events:none; }
  .filter-modal-title-row { justify-content: center; position: relative; min-height: 32px; }
  .filter-modal-title-row > span { font-size: 17px; font-weight: 700; color: var(--text); }
  .filter-modal-title-row > span:empty::before { content: "Filter"; }
  .filter-close-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }

  /* Footer: klistret, safe-area, primær CTA dominerer */
  .filter-modal-footer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)) !important; box-shadow: 0 -1px 0 var(--border); }
  .filter-modal-footer > div { gap: 10px !important; }
  .filter-modal-footer .btn { font-size: 16px !important; padding: 15px !important; border-radius: 14px !important; font-weight: 600 !important; }
  .filter-modal-footer .filter-result-btn { flex: 2 1 0 !important; }
  .filter-modal-footer .btn:not(.btn-primary) { flex: 1 1 0 !important; }

  /* Touch-mål: fasilitet-checkbokser luftigere */
  .sidebar-filters .fac-check-row { padding: 11px 8px; }
  .sidebar-filters .fac-check-row input[type="checkbox"] { width: 22px !important; height: 22px !important; }
}

@media (max-width:900px) {
  .sidebar-filters .sidebar-section > h4 { font-size:15px; letter-spacing:.02em; }
  .sidebar-filters .sidebar-section { padding:14px 0; }
}

/* ─── OFFENTLIG PROFIL — Instagram-stil (/bruker) ─── */
.uprofile{max-width:935px;margin:24px auto 0;padding:16px 20px 28px;background:transparent}
.uprofile-grid{display:grid;grid-template-columns:auto 1fr;column-gap:56px;align-items:start;grid-template-areas:"avatar name" "avatar stats" "avatar identity"}
.uprofile-avatar-ring{grid-area:avatar;align-self:center;flex:none;display:inline-flex}
.uprofile-name{grid-area:name;font-size:24px;font-weight:600;letter-spacing:-.01em;color:var(--text)}
.uprofile-avatar{width:140px;height:140px;border-radius:50%;background:var(--accent);color:#fff;font-size:54px;font-weight:600;display:flex;align-items:center;justify-content:center;margin:0;overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,.08)}
.uprofile-stats{grid-area:stats;margin-top:18px;gap:34px}
.uprofile-identity{grid-area:identity;margin-top:16px}
.ustat{display:flex;align-items:baseline;gap:6px;font-size:16px;color:var(--text2)}
.ustat b{font-weight:700;color:var(--text);font-size:17px}
.uprofile-role{font-size:14px;color:var(--text2)}
.uprofile-meta{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-top:6px;font-size:13px;color:var(--text3)}
.uprofile-bio{margin-top:6px;max-width:560px;font-size:15px;line-height:1.5;color:var(--text);white-space:pre-wrap}
.uprofile-actions{display:flex;gap:8px;margin-top:24px}
.uprofile-actions .btn{flex:1;background:#e9e9eb;color:#262626;border:none;border-radius:10px;font-weight:600;font-size:15px;padding:10px 16px;cursor:pointer;transition:background .15s}
.uprofile-actions .btn:hover{background:#dededf}
.up-tabs{display:flex;justify-content:center;gap:64px;border-top:1px solid var(--border);max-width:935px;margin:8px auto 0;padding:0 20px}
.up-tab{display:flex;align-items:center;gap:7px;background:none;border:0;border-top:1px solid transparent;margin-top:-1px;padding:15px 4px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text3);cursor:pointer;font-family:inherit}
.up-tab.active{color:var(--text);border-top-color:var(--text)}
.up-tab:hover{color:var(--text2)}
.up-pane .section{max-width:935px;padding:30px 20px 50px}
@media(max-width:700px){
.uprofile{padding:18px 16px;margin:0}
.uprofile-grid{column-gap:22px;align-items:center;grid-template-areas:"avatar stats" "name name" "identity identity"}
.uprofile-avatar{width:88px;height:88px;font-size:34px;box-shadow:none}
.uprofile-name{margin-top:18px;font-size:20px}
.uprofile-stats{margin-top:0;gap:0;justify-content:space-around}
.ustat{flex-direction:column;align-items:center;gap:1px;font-size:13px}
.ustat b{font-size:18px}
.uprofile-identity{margin-top:6px}
.uprofile-actions{margin-top:16px}
.up-tabs{gap:0;justify-content:space-around;padding:0}
.up-pane .section{padding:22px 16px 40px}
}

/* ─── MIN PROFIL (/profil) — Apple-innstillinger-stil ─── */
.aprofile{max-width:560px;margin:0 auto;padding:36px 20px 60px}
.aprofile-head{text-align:center;margin-bottom:30px}
.aprofile-avatar{width:96px;height:96px;border-radius:50%;background:var(--accent);color:#fff;font-size:38px;font-weight:600;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;overflow:hidden}
.aprofile-name{font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
.aprofile-email{font-size:15px;color:var(--text2);margin-top:3px}
.aprofile-group{background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden;margin-bottom:22px}
.aprofile-row{display:flex;align-items:center;gap:13px;width:100%;padding:12px 16px;background:none;border:0;border-top:1px solid var(--border);cursor:pointer;font-family:inherit;font-size:16px;color:var(--text);text-align:left;transition:background .12s}
.aprofile-row:first-child{border-top:0}
.aprofile-row:hover{background:var(--surface2)}
.arow-icon{flex:none;width:29px;height:29px;border-radius:7px;display:flex;align-items:center;justify-content:center;color:#fff}
.arow-icon svg{width:17px;height:17px}
.arow-label{flex:1}
.arow-chev{color:var(--text3);font-size:22px;line-height:1}
.aprofile-detail-head{max-width:935px;margin:0 auto;display:flex;align-items:center;gap:16px;padding:24px 20px 0}
.aprofile-back{background:none;border:0;color:var(--accent);font-size:16px;cursor:pointer;font-family:inherit;padding:6px 0}
.aprofile-detail-title{font-size:22px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
#prof-detail .section{max-width:935px;margin:0 auto;padding:24px 20px 60px}
@media(max-width:600px){.aprofile{padding:28px 14px 50px}}

/* Avoid layout-shift on search pages: hide layout until JS finishes restructuring,
   then reveal. CSS fallback reveals after .8s if JS never runs. */
.search-page-layout:not(.layout-ready){visibility:hidden;animation:epLayoutReveal .01s linear .8s forwards}
@keyframes epLayoutReveal{to{visibility:visible}}
.search-page-layout.layout-ready{visibility:visible}



/* ════ TikTok-style profile (page-profile) ════ */
#page-profile .tt-profile{max-width:1100px;margin:0 auto;padding:32px 24px 60px}
.tt-prof-head{display:flex;gap:28px;align-items:flex-start;margin-bottom:26px}
.tt-avatar{width:116px;height:116px;border-radius:50%;flex:0 0 auto;background:var(--surface2);display:flex;align-items:center;justify-content:center;font-size:46px;font-weight:600;color:var(--text2);overflow:hidden}
.tt-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.tt-prof-main{flex:1;min-width:0;padding-top:8px}
.tt-prof-name{font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1.15}
.tt-prof-sub{font-size:15px;color:var(--text2);margin-top:2px}
.tt-prof-actions{display:flex;gap:8px;align-items:center;margin:16px 0 14px}
.tt-btn{height:38px;border-radius:8px;border:1px solid var(--border2);background:var(--surface);font-size:15px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s;color:var(--text)}
.tt-btn-edit{padding:0 22px}
.tt-btn-icon{width:38px;padding:0}
.tt-btn:hover{background:var(--surface2)}
.tt-prof-bio{font-size:15px;line-height:1.5;color:var(--text);white-space:pre-wrap;max-width:600px;word-break:break-word}
.tt-tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:24px}
.tt-tab{flex:0 0 auto;min-width:170px;display:flex;align-items:center;justify-content:center;gap:8px;height:48px;background:none;border:none;cursor:pointer;font-size:16px;font-weight:600;color:var(--text3);position:relative;transition:color .15s}
.tt-tab svg{opacity:.85}
.tt-tab.active{color:var(--text)}
.tt-tab.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--text);border-radius:2px}
.tt-tab:hover{color:var(--text2)}
.tt-tab-badge{background:var(--accent);color:#fff;border-radius:50px;padding:1px 7px;font-size:11px;font-weight:700}
.tt-tab-content{display:none}
.tt-tab-content.active{display:block}
@media(max-width:700px){#page-profile .tt-profile{padding:20px 14px 50px}.tt-prof-head{gap:16px;margin-bottom:18px}.tt-avatar{width:84px;height:84px;font-size:34px}.tt-prof-name{font-size:22px}.tt-prof-actions{flex-wrap:wrap}.tt-tab{min-width:0;flex:1}.tt-tab span:not(.tt-tab-badge){display:none}}

/* ════ Apple-style settings (page-settings) ════ */
#page-settings .set-wrap{max-width:1000px;margin:0 auto;padding:28px 24px 60px;display:grid;grid-template-columns:248px 1fr;gap:34px;align-items:start}
.set-back{display:inline-flex;align-items:center;gap:6px;background:none;border:none;color:var(--text2);font-size:15px;font-weight:500;cursor:pointer;margin-bottom:14px}
.set-back:hover{color:var(--text)}
.set-sidebar{position:sticky;top:88px}
.set-nav-item{display:flex;align-items:center;gap:12px;width:100%;padding:9px 12px;border-radius:10px;background:none;border:none;cursor:pointer;font-size:15px;font-weight:500;color:var(--text);text-align:left;transition:background .15s}
.set-nav-ic{width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;color:#fff}
.set-nav-item:hover{background:var(--surface2)}
.set-nav-item.active{background:var(--surface2);font-weight:600}
.set-panel{display:none}
.set-panel.active{display:block}
.set-panel h2{font-size:26px;font-weight:700;letter-spacing:-.02em;margin:0 0 18px}
.set-group-title{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text3);margin:26px 0 8px;padding-left:4px}
.set-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;overflow:hidden}
.set-row{display:flex;align-items:center;gap:14px;padding:13px 18px;border-bottom:1px solid var(--border);min-height:56px}
.set-card .set-row:last-child{border-bottom:none}
.set-row-label{flex:1;min-width:0}
.set-row-label .l1{font-size:15px;font-weight:500;color:var(--text)}
.set-row-label .l2{font-size:13px;color:var(--text3);margin-top:2px}
.set-row input[type=text],.set-row input[type=email],.set-row input[type=tel]{border:none;background:none;text-align:right;font-size:15px;color:var(--text2);outline:none;flex:1;min-width:0}
.set-chev{color:var(--text3);flex:0 0 auto}
.set-row.danger .l1{color:#ff3b30}
.set-row.tappable{cursor:pointer}
.set-row.tappable:hover{background:var(--surface2)}
.set-toggle{width:46px;height:28px;border-radius:50px;background:var(--border2);position:relative;cursor:pointer;flex:0 0 auto;transition:background .2s}
.set-toggle.on{background:#34c759}
.set-toggle::after{content:"";position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.set-toggle.on::after{transform:translateX(18px)}
.set-select{border:none;background:none;font-size:15px;color:var(--text2);text-align:right;outline:none;cursor:pointer}
.set-save-bar{margin-top:18px;display:flex;justify-content:flex-end}
@media(max-width:760px){#page-settings .set-wrap{grid-template-columns:1fr;gap:14px}.set-sidebar{position:static}.set-nav{display:flex;overflow-x:auto;gap:6px;-webkit-overflow-scrolling:touch}.set-nav-item{white-space:nowrap}}

/* ════ Edit-profile modal ════ */
.ep-edit-photo{display:flex;justify-content:center;margin:6px 0 2px}
.ep-edit-avatar{width:96px;height:96px;border-radius:50%;background:var(--surface2);display:flex;align-items:center;justify-content:center;font-size:38px;font-weight:600;color:var(--text2);overflow:hidden;position:relative;cursor:pointer}
.ep-edit-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.ep-edit-pencil{position:absolute;right:0;bottom:0;width:30px;height:30px;border-radius:50%;background:var(--surface);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.15)}
.ep-edit-field{margin-top:18px}
.ep-edit-field>label{display:block;font-size:13px;font-weight:600;color:var(--text2);margin-bottom:6px}
.ep-edit-field textarea,.ep-edit-field input{width:100%;border:1px solid var(--border2);border-radius:10px;padding:11px 14px;font:inherit;font-size:15px;background:var(--surface);color:var(--text);box-sizing:border-box}
.ep-edit-field textarea{resize:vertical;min-height:84px}
.ep-edit-count{text-align:right;font-size:12px;color:var(--text3);margin-top:5px}

/* ════ Settings v2 — macOS 2-col (mirrors /meldinger) ════ */
#page-settings.active{height:100vh;min-height:unset;overflow:hidden;padding-top:84px;padding-left:0;padding-right:0;box-sizing:border-box;display:flex;flex-direction:column;width:100%}
#page-settings.active .set-layout{flex:1;width:100%;min-height:0;overflow:hidden;display:grid;grid-template-columns:1fr;height:auto}
@media(min-width:768px){#page-settings.active .set-layout{grid-template-columns:clamp(220px,26vw,300px) 1fr}}
body:has(#page-settings.active) footer{display:none!important}
body:has(#page-settings.active){overflow:hidden;padding-bottom:0!important}
body:has(#page-settings.active) #promo-banner{display:none!important}
body:has(#page-settings.active) > nav{top:0!important}
body:has(#page-settings.active) #page-settings.active{padding-top:48px!important}
.set-sidebar{border-right:1px solid var(--border);overflow-y:auto;background:var(--surface);padding:14px 12px;position:static;top:auto}
.set-side-title{font-size:22px;font-weight:700;letter-spacing:-.02em;padding:4px 10px 12px}
.set-nav{display:flex;flex-direction:column;gap:2px}
.set-nav-item.active{background:#0a84ff;color:#fff;font-weight:600}
.set-nav-item.active:hover{background:#0a84ff}
.set-content{display:flex;flex-direction:column;height:100%;overflow:hidden;background:var(--bg);min-width:0}
.set-content-head{display:flex;align-items:center;gap:6px;padding:14px 24px;border-bottom:1px solid var(--border);flex:0 0 auto}
.set-content-title{font-size:20px;font-weight:700;letter-spacing:-.01em}
.set-mobile-back{display:none;background:none;border:none;cursor:pointer;color:var(--accent);padding:0;width:34px;height:34px;align-items:center;justify-content:center;margin-left:-8px}
.set-content-body{flex:1;overflow-y:auto;padding:22px 24px 60px;max-width:760px;width:100%}
.set-content-body .set-group-title:first-child{margin-top:4px}
@media(max-width:767px){
  #page-settings .set-content{position:fixed;top:48px;left:0;right:0;bottom:0;z-index:60;transform:translateX(100%);transition:transform .25s ease;will-change:transform}
  #page-settings .set-content.mobile-open{transform:translateX(0)}
  #page-settings .set-mobile-back{display:flex}
  #page-settings .set-side-title{padding-top:8px}
}
.set-list-back{display:none;align-items:center;gap:3px;background:none;border:none;cursor:pointer;color:var(--accent);font-size:16px;font-weight:600;padding:2px 6px 10px;margin-left:-6px}
@media(max-width:767px){#page-settings .set-list-back{display:flex}}

/* ── Frem oppføring — featured ("Fremhevet") listing badge + highlight ── */
.prop-badge-promoted{background:rgba(99,99,102,.92);color:#fff;font-weight:600;z-index:2}

/* ════ Frem oppføring (page-frem) ════ */
#page-frem .frem-wrap{max-width:1000px;margin:0 auto;padding:28px 24px 60px;display:grid;grid-template-columns:1fr;gap:24px}
@media(min-width:880px){#page-frem .frem-wrap{grid-template-columns:1fr 360px;align-items:start}}
.frem-title{font-size:28px;font-weight:700;letter-spacing:-.02em;margin:0 0 14px}
.frem-banner{background:#eef4ff;color:#1d4ed8;border-radius:12px;padding:12px 16px;font-size:14px;font-weight:500;margin-bottom:18px}
.frem-active-note{background:#fff7e6;border:1px solid #f0c674;border-radius:12px;padding:12px 16px;font-size:14px;margin-bottom:18px}
.frem-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:18px;margin-bottom:18px}
.frem-card-h{font-size:16px;font-weight:700;margin-bottom:14px}
.frem-pkg{display:flex;align-items:center;gap:14px;border:1.5px solid var(--border2);border-radius:12px;padding:14px 16px;margin-bottom:10px;cursor:pointer;transition:border-color .15s,background .15s;position:relative}
.frem-pkg:last-child{margin-bottom:0}
.frem-pkg input{position:absolute;opacity:0;pointer-events:none}
.frem-pkg.selected{border-color:var(--accent);background:rgba(0,113,227,.05)}
.frem-pkg-main{flex:1;display:flex;flex-direction:column;gap:2px}
.frem-pkg-price{font-size:18px;font-weight:700;color:var(--accent)}
.frem-pkg-sub{font-size:13px;color:var(--text3)}
.frem-pkg-radio{width:22px;height:22px;border-radius:50%;border:2px solid var(--border2);flex:0 0 auto;position:relative}
.frem-pkg.selected .frem-pkg-radio{border-color:var(--accent)}
.frem-pkg.selected .frem-pkg-radio::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--accent)}
.frem-preview{border:1px solid var(--border);border-radius:12px;overflow:hidden}
.frem-preview-img{height:150px;background-color:#e9ecf1;background-size:cover;background-position:center;position:relative}
.frem-preview-badge{position:absolute;top:10px;left:10px;background:linear-gradient(90deg,#f7c948,#f0a500);color:#1a1a1a;font-weight:700;font-size:12px;padding:4px 10px;border-radius:8px}
.frem-preview-body{padding:12px 14px}
.frem-preview-price{font-size:18px;font-weight:700}
.frem-preview-addr{font-size:14px;color:var(--text2);margin-top:2px}
.frem-preview-type{font-size:13px;color:var(--text3);margin-top:2px}
.frem-sum-row{display:flex;justify-content:space-between;font-size:15px;padding:8px 0;color:var(--text2)}
.frem-sum-total{font-weight:700;color:var(--text);border-top:1px solid var(--border);margin-top:4px;padding-top:12px;font-size:17px}
.frem-pay-btn{width:100%;margin-top:14px;height:46px;border:none;border-radius:12px;background:var(--accent);color:#fff;font-size:16px;font-weight:600;cursor:pointer}
.frem-pay-btn:disabled{opacity:.5;cursor:default}
.frem-pay-note{text-align:center;font-size:12px;color:var(--text3);margin-top:10px}
.frem-limit-note{background:#fff7e6;border-radius:10px;padding:10px 12px;font-size:13px;margin-top:10px}

/* ── Frem oppføring — stub checkout (page-frem-betal) ── */
#page-frem-betal .frem-betal-wrap{max-width:440px;margin:40px auto;padding:0 20px}
.frem-betal-card{text-align:center;padding:30px 26px}
.frem-betal-icon{font-size:34px;margin-bottom:6px}
.frem-betal-h{font-size:24px;font-weight:700;margin:0 0 4px}
.frem-betal-sub{font-size:14px;color:var(--text3);margin:0 0 22px}
.frem-betal-line{display:flex;justify-content:space-between;gap:10px;font-size:15px;color:var(--text2);padding:9px 0;text-align:left}
.frem-betal-total{border-top:1px solid var(--border);margin-top:6px;padding-top:14px;font-size:18px;font-weight:700;color:var(--text)}
.frem-betal-cancel{display:block;margin-top:14px;font-size:14px;color:var(--text3);text-decoration:none}






/* Tesla-style listing v6 */
.listing-contact-bar{display:none}
.listing-thumbs{display:none}
.l-kpi-div{display:none!important}
.listing-section{border-top:none!important;border-bottom:none!important}
.listing-stats-bar{border:none!important}
@media(min-width:901px){
.listing-detail{display:grid;grid-template-columns:minmax(0,1fr) 408px;gap:40px;max-width:none;margin:0;padding:0 clamp(20px,3.5vw,72px);align-items:start}
.listing-gallery-col{position:sticky;top:88px;height:calc(100vh - 96px);align-self:start;display:flex;flex-direction:column;gap:6px;overflow:visible}
.listing-gallery-col .listing-hero-wrapper{flex:1 1 auto;min-height:0;max-width:none;margin:0;padding:0;width:100%}
.listing-gallery-col .listing-hero{aspect-ratio:auto;height:100%;width:100%;border-radius:0;background:transparent}
.listing-gallery-col .lazy-slide{background:transparent!important}
.listing-gallery-col #listing-slides img{object-fit:contain!important;opacity:1!important}
.listing-carousel-dots{display:none!important}
.listing-content-col{min-width:0}
.listing-content-col .listing-top-strip{display:none}
.listing-content-col .listing-layout{display:block;max-width:none;margin:0;padding:0}
.listing-content-col .listing-sidebar-col{position:static;width:100%;margin-top:24px}
.listing-content-col .listing-sidebar-card:not(.mortgage-card){display:none}
.listing-content-col .listing-map-full{padding:0;margin-top:8px}
.listing-thumbs{display:flex;flex:0 0 auto;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0}
.listing-thumbs::-webkit-scrollbar{display:none}
.listing-thumb{flex:0 0 auto;width:128px;height:84px;border:2px solid transparent;border-radius:0;overflow:hidden;padding:0;cursor:pointer;background:#f0f0f3}
.listing-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.listing-thumb.active{border-color:var(--accent,#0071e3)}
.listing-contact-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;bottom:0;width:100%;min-height:70px;box-sizing:border-box;margin-top:18px;z-index:1001;background:#fff;border:1px solid var(--border,#e5e5ea);border-radius:16px 16px 0 0;padding:11px 20px;box-shadow:0 -8px 24px rgba(0,0,0,.10)}
.listing-contact-bar>div{flex:1 1 auto;min-width:0}
.lcb-amount{font-size:20px;font-weight:800;letter-spacing:-.02em;color:var(--text,#1d1d1f);line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lcb-label{font-size:12px;color:var(--text3,#86868b);margin-top:2px}
.lcb-btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent,#0071e3);color:#fff;border:none;border-radius:12px;padding:12px 22px;font-size:15px;font-weight:700;cursor:pointer;transition:filter .15s;white-space:nowrap;flex-shrink:0}
.lcb-btn:hover{filter:brightness(1.07)}
body:has(#page-listing.active) footer{display:none!important}
body:has(#page-listing.active) #chatbot-toggle{left:24px;right:auto}
body:has(#page-listing.active) #chatbot-window{left:24px;right:auto}
}

/* round10 fixes: overflow, dividers, map 16:9, facilities 1-col */
body:has(#page-listing.active){overflow-x:clip}
.specs-group{border:none!important}
@media(min-width:901px){
.listing-detail{overflow-x:clip}
.listing-gallery-col .listing-hero{overflow:hidden}
.listing-content-col .listing-map-full #listing-detail-map{height:auto!important;aspect-ratio:16/9!important}

}

/* Filter: pills -> stacked checkbox rows + slider full width */
.sidebar-filters .type-pills{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:1px}
.sidebar-filters .type-pill{justify-content:flex-start;width:100%;border:none!important;background:transparent!important;border-radius:8px!important;padding:8px!important;font-size:14px!important;font-weight:400!important;color:var(--text)!important;box-shadow:none!important;transform:none!important;gap:11px;text-align:left}
.sidebar-filters .type-pill svg{display:none}
.sidebar-filters .type-pill:hover{background:var(--surface2)!important;color:var(--text)!important;border-color:transparent!important}
.sidebar-filters .type-pill::before{content:"";width:20px;height:20px;flex-shrink:0;border:1.5px solid var(--border2);border-radius:6px;background:var(--surface);box-sizing:border-box}
.sidebar-filters .type-pill.active{background:transparent!important;color:var(--text)!important;font-weight:400!important}
.sidebar-filters .noUi-target{margin:14px 11px 16px!important}
.sidebar-filters .type-pill.active::before{background:var(--accent,#0071e3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;border-color:var(--accent,#0071e3)}

/* Sticky filter sidebar on sparse result pages: ensure results column tall enough */
.search-page-layout .main-results{min-height:calc(100vh + 100px)}

/* === Legg ut annonse: rydd opp i skjema === */
#modal-post .form-row,#modal-post-utland .form-row{grid-template-columns:1fr!important;flex-direction:column!important;gap:0!important}

/* === Meldinger-composer: Telegram-stil auto-grow textarea === */
#page-messages textarea.chat-input{resize:none;overflow-y:hidden;line-height:1.35;min-height:44px;max-height:26rem;display:block;}
.chat-input-wrap{align-items:flex-end;}
#page-messages .chat-emoji-btn,#page-messages .chat-file-btn{top:auto!important;bottom:7px!important;transform:none!important;}


/* Composer max-height like Telegram: 26rem desktop / 16rem mobile (input-scroller) */
@media(max-width:925px){
  #page-messages textarea.chat-input{max-height:16rem;}
  /* Telegram --vh: chat-area = visual viewport height, so composer stays above the soft keyboard */
  .chat-area{height:calc(var(--vh,1vh)*100 - 48px)!important;bottom:auto!important;}
  body.ep-open .chat-area{height:calc(var(--vh,1vh)*100 - 48px - 17.6875rem)!important;bottom:auto!important;}
}

/* === Telegram-style ripple === */
.has-ripple{position:relative;overflow:hidden;}
.ep-ripple-container{pointer-events:none;position:absolute;inset:0;overflow:hidden;border-radius:inherit;}
.ep-ripple-wave{pointer-events:none;position:absolute;transform:scale(0);display:block;border-radius:50%;background:var(--ep-ripple-color,rgba(0,0,0,.07));animation:ep-ripple 650ms;}
@keyframes ep-ripple{from{transform:scale(0);opacity:1}50%{opacity:1}to{transform:scale(2);opacity:0}}

/* === Telegram-style menu open/close === */
#chat-header-menu.ep-menu{transform-origin:top right;}
#chat-attach-menu.ep-menu{transform-origin:bottom right;}
.ep-menu{transition:opacity .15s cubic-bezier(.2,0,.2,1),transform .15s cubic-bezier(.2,0,.2,1);transform:scale(.85);opacity:0;}
.ep-menu.menu-open{transform:scale(1);opacity:1;}
.ep-menu.menu-closing{transition:opacity .18s ease-in,transform .18s ease-in;transform:scale(.85);opacity:0;}

/* === Message right-click context menu === */
.ep-ctx-menu{position:fixed;z-index:100002;min-width:184px;background:#fff;border-radius:12px;box-shadow:0 6px 28px rgba(0,0,0,.18);padding:6px 0;overflow:hidden;transition:opacity .15s cubic-bezier(.2,0,.2,1),transform .15s cubic-bezier(.2,0,.2,1);transform:scale(.85);opacity:0;}
.ep-ctx-menu.menu-open{transform:scale(1);opacity:1;}
.ep-ctx-menu.menu-closing{transition:opacity .18s ease-in,transform .18s ease-in;transform:scale(.85);opacity:0;}
.ep-ctx-item{display:flex;align-items:center;gap:13px;padding:10px 16px;font-size:15px;color:#111;cursor:pointer;position:relative;overflow:hidden;user-select:none;}
.ep-ctx-item:hover{background:rgba(0,0,0,.05);}
.ep-ctx-item.danger{color:#e0322f;}
.ep-ctx-item svg{width:19px;height:19px;flex-shrink:0;}

/* Ripple visibility: subtle on menus, Telegram-blue on chat list rows */
.has-ripple{--ep-ripple-color:rgba(0,0,0,.11);}
#msg-list .msg-item.has-ripple{--ep-ripple-color:rgba(0,0,0,.10);}
.ep-ctx-item{--ep-ripple-color:rgba(0,0,0,.09);}

/* Chat list/items: ripple is the only press feedback (Telegram-style) — no grey flash */
#page-messages .msg-item,#page-messages .chat-bubble-wrap,.ep-ctx-item{-webkit-tap-highlight-color:transparent;}

/* Active (selected, blue) chat row: white ripple so it shows on the blue bg */

/* ════════════════════════════════════════════════════════════════════════
   MOBIL REDESIGN — ANNONSE-FEED (oversikt).  Lagt til 2026-06-20.
   Gjelder ALLE bredder (PC ogsa fra 2026-06-20), KUN oversikts-/feed-visninger (.property-grid /
   .property-card — disse brukes ikke på detaljsiden). Desktop og detaljside
   er uendret (.property-card brukes ikke der). Mal: store, nesten kant-til-kant-bilder med et lett, luftig og
   "app-aktig" infoområde (a la YouTube mobil) — rolig, premium uttrykk.
   ════════════════════════════════════════════════════════════════════════ */

/* Pris flettes inn i fakta-linja KUN på mobil; skjult på desktop (uendret der) */
.property-card .meta-price { display: none; }

/* — Kort-utseende: fjern den tunge hvite boksen, la bildet bære kortet — */
@media all {  /* 2026-06-20: gjelder na ALLE bredder (PC ogsa), ikke kun mobil */
  .property-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .property-card .prop-img {
    border-radius: 12px;
    aspect-ratio: 16 / 11;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  }
  /* YouTube-stil infoområde: adresse som tittel, pris + fakta på én grå linje */
  .property-card .prop-body { display: flex; flex-direction: column; padding: 8px 2px 0; }
  /* adressen blir tittelen (øverst, mørk, medium) */
  .property-card .prop-address {
    order: -1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* den frittstående prisen skjules når den er flyttet inn i fakta-linja */
  .property-card .prop-body:has(.meta-price) .prop-price { display: none; }
  .property-card .prop-price { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  /* fakta-linje: lett grå, prikk-separert, uten ikoner, én linje */
  .property-card .prop-meta {
    display: block;
    border-top: none;
    padding-top: 0;
    margin-bottom: 0;
    font-size: 13px;
    color: var(--text3);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .property-card .prop-meta svg { display: none; }
  .property-card .meta-item {
    display: inline;
    font-size: 13px;
    color: var(--text3);
  }
  /* pris litt fremhevet i linja (mørkere/medium), men fortsatt lett */
  .property-card .meta-item.meta-price { color: var(--text2); font-weight: 500; }
  .property-card .meta-item + .meta-item::before {
    content: "·";
    margin: 0 4px 0 7px;
    color: var(--text3);
    font-weight: 400;
  }
}

/* — Telefon: én kolonne, store bilder nesten kant-til-kant — */
@media (max-width: 700px) {
  #home-listings, #buy-listings, #rent-listings, #ktl-listings,
  #u-listings, #ns-listings, #nl-listings, #nt-listings,
  #nb-listings, #byggfolk-listings, #wr-listings,
  #city-ssr .property-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
    /* ekte full-bleed: bildene går helt ut til skjermkanten (0 sidemarg).
       calc(50% - 50vw) tilpasser seg nesting-dybden automatisk. */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
  }
  /* bildet kant-til-kant, firkantede hjørner (ingen avrunding), flatt */
  .property-card .prop-img {
    aspect-ratio: 3 / 2;
    border-radius: 0;
    box-shadow: none;
  }
  /* teksten beholder luft mot skjermkanten */
  .property-card .prop-body { padding: 8px 16px 0; }
}
/* ═══ slutt MOBIL REDESIGN — ANNONSE-FEED ═══ */

/* iOS-fix 2026-06-20: .main-results er grid-element med min-width:auto. Pa iOS Safari krymper
   ikke input-felt (ventelista) -> kolonnens min-innhold > viewport -> grid-sporet vokser forbi
   skjermen -> full-bleed-feed (calc(50%-50vw)) ble skjovet til hoyre. minmax(0,1fr)+min-width:0
   klemmer kolonnen til containerbredden. (Chrome krymper feltene, sa dette syntes bare pa iOS.) */
@media (max-width: 900px) {
  .search-page-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .search-page-layout .main-results { min-width: 0 !important; }
}

/* 2026-06-20: Bredere listing-layout pa mobil. Annonsesiden hadde dobbel sidepadding
   (.page 16px + .listing-layout 16px = 32px inn) sa tekst-innhold var bare 329px pa 393px-skjerm.
   Fjerner .listing-layout sin horisontale padding -> innhold 16px fra kant (361px, som resten av
   siden). Galleriet (.listing-hero-wrapper) beholder full-bleed via egen margin/width-calc. */
@media (max-width: 900px) {
  .listing-layout { padding-left: 0 !important; padding-right: 0 !important; }
}

/* 2026-06-20: Fjern hover-effekter pa PC (mus). (1) Property card: ingen lift/skygge-animasjon
   ved hover. (2) Filter-sidebar: ingen bevegelses-/lift-animasjon ved hover (type-pill + checkbox-rad).
   Beholder karusell-piler og fokus-feedback i input/select. */
@media (hover: hover) {
  .property-card:hover { transform: none !important; box-shadow: none !important; }
  .sidebar-filters .type-pill:hover { transform: none !important; box-shadow: none !important; }
  .sidebar-filters label:has(input[type="checkbox"]):hover { transform: none !important; }
}

/* 2026-06-20: Ny minimal footer (Tesla-stil) — en sentrert rad, 70px, lys bakgrunn. */
footer {
  background: var(--bg) !important;
  color: var(--text3) !important;
  min-height: 70px !important;
  padding: 16px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-top: 1px solid var(--border) !important;
  box-sizing: border-box;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  max-width: 1120px;
  width: 100%;
}
.footer-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
@media (max-width: 700px) {
  .footer-links { gap: 8px 16px; }
  .footer-links a { font-size: 11px; }
}

/* 2026-06-20: favicon-ikon til venstre for brand-teksten i nav */
.nav-logo { display: inline-flex; align-items: center; gap: 8px; }
.nav-logo-icon { width: 22px; height: 22px; flex-shrink: 0; display: block; border-radius: 5px; }


/* 2026-06-20: Tesla-stil seksjonsheader (tittel + sort/handlinger pa en rad). */
@media (max-width: 900px) { .page-search-header { display: contents !important; } }
@media (min-width: 901px) {
  .page-search-header select[id$="-sort"] { border:none; background-color:transparent; box-shadow:none; border-radius:0; padding:0 20px 0 0; font-size:14px; font-weight:500; color:var(--text); -webkit-appearance:none; appearance:none; cursor:pointer; background-repeat:no-repeat; background-position:right center; background-size:12px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}

/* 2026-06-20: main-results (grid-element, min-width:auto) blaste opp 1fr-sporet nar det kun
   inneholder annonse-grid-en (auto-fill min-innhold). min-width:0 klemmer det til tilgjengelig bredde. */
.search-page-layout .main-results { min-width: 0; }

/* 2026-06-20: Gammel .main-results > div:first-child{display:flex} (sort-rad) matchet na annonse-grid-en
   (forste barn etter Tesla-header). Tving grid-en tilbake til grid. */
.search-page-layout .main-results > .property-grid { display: grid !important; align-items: normal !important; gap: 20px !important; justify-content: normal !important; }


/* 2026-06-21: Sidebar sticky + intern scroll (PC). Fester seg UNDER den sticky Tesla-headeren
   (88px nav + ~74px header = 162), sa toppen ikke dekkes. Scroll-container scroller lange lister. */
@media (min-width: 901px) {
  .sidebar-filters { position: sticky !important; top: 88px !important; height: calc(100vh - 80px) !important; max-height: none !important; overflow: visible !important; align-self: start !important; }
  .sidebar-scroll-container { height: 100% !important; max-height: none !important; overflow-y: auto !important; padding-bottom: 16px !important; }
}

/* 2026-06-21: .search-results (naering/utland) manglet min-hoyde -> strakk seg bare til
   sidebar-hoyden (500=500) = 0 sticky-rekkevidde. Match .main-results sa sidebaren far feste. */
.search-page-layout .search-results { min-height: calc(100vh + 100px); min-width: 0; }
