/* ====== Tema ====== */
:root{
  --navy:#0f1a2b;           /* mørk header/footer */
  --navy-2:#111f36;         /* mørk kortbakgrunn i hero */
  --page:#f5f6f8;           /* lys bakgrunn for innhold */
  --card:#ffffff;           /* kort bakgrunn */
  --ink:#1f2937;            /* primær tekst */
  --muted:#6b7280;          /* sekundær tekst */
  --gold:#cfa252;           /* aksent (gull) */
  --line:#e6e8ee;           /* lys kantlinje */
  --shadow:0 12px 32px rgba(16,24,40,.08);
  --radius:14px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}

/* ====== Global layout ====== */
body{font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:var(--ink); background:var(--page); line-height:1.65}
.wrap{max-width:1120px;margin:0 auto;padding:28px}

/* ====== HERO ====== */
.site-header{background:var(--navy); color:#fff; padding:40px 0 28px; border-bottom:4px solid var(--gold)}
.site-header .wrap{padding-top:0;padding-bottom:0}
.site-header h1{margin:0 0 10px; font-size:clamp(36px,5vw,56px); letter-spacing:-.02em}
.site-header .lede{color:#e5e7eb; max-width:920px}
.hero-cta{display:flex; justify-content:center; margin:18px 0 8px}
.hero-cta .btn{background:#0f172a; color:#fff; border:2px solid var(--gold); padding:10px 16px; border-radius:999px; font-weight:700}
.hero-divider{height:6px;background:var(--gold)}

/* ====== Seksjonstittel (intro under hero) ====== */
.intro{ text-align:center; color:var(--ink); padding:22px 0 10px }
.intro p{ margin:0 0 12px }

/* ====== Grid ====== */
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:24px}
@media (max-width:860px){ .grid-2{grid-template-columns:1fr} }

/* ====== Kort (listings) ====== */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden}
.listing{display:block; transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
.listing:hover{transform:translateY(-2px); box-shadow:0 16px 40px rgba(16,24,40,.12); border-color:#e3e6ee}
.listing picture{display:block; aspect-ratio: 16/10; background:#ddd; overflow:hidden}
.listing img{width:100%;height:100%;object-fit:cover}
.listing-body{padding:18px}
.listing h2{margin:.3rem 0 .6rem; font-size:clamp(20px,2.4vw,24px)}
.bullets{list-style:none; padding:0; margin:0 0 14px; color:var(--ink)}
.bullets li{display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line)}
.bullets li::before{content:""; width:10px; height:10px; border-radius:999px; background:var(--gold); flex:0 0 10px}
.bullets li:last-child{border-bottom:0}
.linkish{display:block; text-align:center; font-weight:700; padding:10px 14px; border:2px solid #0f172a; border-radius:999px; background:#0f172a; color:#fff}
.linkish:hover{filter:brightness(1.03)}

/* ====== Beliggenhet + Kontakt (kort side-ved-side) ====== */
.section-split{padding-top:28px; padding-bottom:40px; border-top:6px solid var(--gold); margin-top:26px}
.block-title{display:flex; align-items:center; gap:10px; font-weight:800; color:#243145; margin:0 0 12px}
.block-title .icon{width:20px;height:20px; display:inline-grid; place-items:center; color:var(--gold)}

.map-wrap{width:100%; border-radius:12px; overflow:hidden; border:1px solid var(--line); background:#f2f3f6}
.map-wrap.small{aspect-ratio:4/3}
.map{width:100%; height:100%; border:0}

.contact-box p{margin:0 0 10px}
.btn{display:inline-flex; align-items:center; gap:10px; padding:10px 16px; border-radius:999px; font-weight:700; cursor:pointer}
.btn.primary{background:#0f172a; color:#fff; border:2px solid var(--gold)}
.btn.outline{background:#fff; color:#0f172a; border:2px solid var(--gold)}

/* ====== Footer ====== */
.site-footer{background:var(--navy); color:#d1d5db; text-align:center; padding:28px 0; margin:0; font-size:.9em; border-top:4px solid var(--gold)}

/* ——— Info-kort felles ——— */
.info-card { padding: 18px; display: grid; gap: 12px }
.info-card .muted { color: var(--muted) }

.card-head {
  display:flex; align-items:center; gap:10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.card-head h2 { margin:0; font-size: clamp(18px, 2vw, 20px) }
.card-icon { display:inline-grid; place-items:center; width:28px; height:28px;
  border-radius:999px; background:#f7f7f9; border:1px solid var(--line) }

/* ——— Kart (interaktivt) ——— */
.map-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #eef1f5;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;   /* kompakt og konsekvent */
}
.map { width:100%; height:100%; border:0 }
.map-actions { display:flex; gap:10px; flex-wrap:wrap }

/* ——— Statisk kart (alternativ) ——— */
.map-static {
  position:relative; display:block; border:1px solid var(--line);
  border-radius:12px; overflow:hidden; box-shadow: var(--shadow);
}
.map-static img { display:block; width:100%; height:auto }
.map-static-cta {
  position:absolute; bottom:10px; right:10px;
  background:#0f172a; color:#fff; border:2px solid var(--gold);
  padding:6px 10px; border-radius:999px; font-weight:700; font-size:.9em;
}

/* ——— Kontakt ——— */
.contact-list {
  list-style:none; padding:0; margin:4px 0 6px; display:grid; gap:8px
}
.contact-list .ci { width:22px; display:inline-block }
.contact-list .link { color: var(--ink); border-bottom:1px dotted rgba(0,0,0,.15) }
.contact-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:2px }

/* Små knapper når de står sammen med links under kartet */
.btn.sm { padding:8px 12px; font-size:.95em }

/* Kortstil som matcher leilighetskort */
.info-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2em;
  font-weight: 700;
  margin: 0;
}

.block-title .icon {
  font-size: 1.1em;
}

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}

.map {
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn.sm {
  padding: 8px 14px;
  font-size: 0.9em;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 6px;
}

.contact-list a {
  color: var(--ink);
  text-decoration: underline;
}

/* Smal hero på undersider */
.page-header{
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  padding: 20px 0;
}
.page-header h1{
  margin: 6px 0 4px;
  font-size: clamp(26px,3.5vw,36px);
  letter-spacing: -.02em;
}
.page-header .lede{ color:#e5e7eb }

/* Tilbake-lenke som pille */
.back-link{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  border:1.5px solid rgba(255,255,255,.35);
  color:#fff;
  background: rgba(255,255,255,.06);
  text-decoration:none;
  font-weight:600;
}
.back-link:hover{ background: rgba(255,255,255,.12) }

/* Galleri-kort spacing */
.gallery-card{ margin-top: 18px; }

/* === Bildekarusell === */
.carousel{position:relative; overflow:hidden; border-radius:12px; border:1px solid var(--line); background:#fff}
.c-track{display:flex; transition:transform .35s ease}
/* Show whole image (letterbox if needed) */
.c-slide{
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f5; /* subtle backdrop behind images */
}

.c-slide img{
  width: 100%;
  height: 56vh;        /* visible area height; adjust if you want */
  min-height: 320px;
  object-fit: contain; /* <- no cropping */
  display: block;
}

.c-btn{position:absolute; top:50%; transform:translateY(-50%); padding:8px 12px;
  border-radius:999px; border:1px solid var(--line); background:#fff; font-size:22px; cursor:pointer}
.c-btn.prev{left:10px} .c-btn.next{right:10px}

.c-dots{position:absolute; left:0; right:0; bottom:10px; display:flex; gap:8px; justify-content:center}
.c-dots button{width:10px; height:10px; border-radius:50%; border:1px solid #c9ced6; background:#eef1f5; cursor:pointer}
.c-dots button.is-active{background:#0f172a; border-color:#0f172a}

.block-title .icon {
  display: none;
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.open{ display: flex; }

.lightbox img{
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.lightbox .lb-close{
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
}

/* Tving visning av forrige-knapp i karusellen */
.carousel .c-btn.prev {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  z-index: 9999;              /* foran alt */
  opacity: 1 !important;
  visibility: visible !important;
}
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  user-select: none;
}

.lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background: rgba(0,0,0,0.3);
  border: none;
  padding: 10px;
  cursor: pointer;
}

.lightbox .prev-btn { left: 20px; }
.lightbox .next-btn { right: 20px; }

.lightbox .close-btn {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}
.lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.9);
  display:none; align-items:center; justify-content:center; z-index:9999;
}
.lightbox.open{ display:flex; }
.lightbox img{
  max-width:95vw; max-height:95vh; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.lb-btn{
  position:absolute; background:rgba(255,255,255,.15); color:#fff;
  border:1px solid rgba(255,255,255,.35); border-radius:999px; padding:8px 12px;
  cursor:pointer; backdrop-filter: blur(4px); font-size:22px;
}
.lb-prev{ top:50%; left:16px; transform:translateY(-50%); }
.lb-next{ top:50%; right:16px; transform:translateY(-50%); }
.lb-close{ top:12px; right:12px; }

.img-caption{ text-align:center; font-size:.9em; color:#555; margin-top:6px; }
.lightbox{ position:fixed; inset:0; background:rgba(0,0,0,.9); display:none; align-items:center; justify-content:center; z-index:9999; }
.lightbox.open{ display:flex; }
.lb-wrap{ display:flex; flex-direction:column; align-items:center; gap:10px; }
.lightbox img{ max-width:95vw; max-height:85vh; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.5); user-select:none; }
.lightbox-caption{ color:#fff; font-size:1rem; text-align:center; }
.lb-btn{ position:absolute; background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:999px; padding:8px 12px; cursor:pointer; backdrop-filter:blur(4px); font-size:22px; }
.lb-prev{ top:50%; left:16px; transform:translateY(-50%); }
.lb-next{ top:50%; right:16px; transform:translateY(-50%); }
.lb-close{ top:12px; right:12px; }

/* Legg caption UNDER bildet i hver slide */
.c-slide{
  display: flex;               /* <- viktig */
  flex-direction: column;      /* bilde over, tekst under */
  align-items: center;
  padding-bottom: 36px;        /* plass så dots ikke overlapper teksten */
}

.c-slide img{
  display: block;
  width: 100%;
  /* behold contain hvis du bruker det i karusellen */
  object-fit: contain;
}

/* selve teksten under bildet */
.img-caption{
  margin-top: 8px;
  text-align: center;
  font-size: .95rem;
  color: #6b7280;              /* grå, matcher stilen din */
}

/* flytt prikkene litt ned så de ikke dekker caption */
.c-dots{
  bottom: 8px;
}


/* Sett pil selv om knappen skulle være tom 
.carousel .c-btn.prev::before {
  content: '‹';
  font-size: 22px;
  line-height: 1;
}*/