/* ===== Grunnleggende ===== */
:root {
  --accent: #CDEF9B;
  --dark: #0D1B2A;
  --text: #1c2431;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f6f7f4;
  --border: #e6e8e3;
  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  animation: page-fade-in .35s ease both;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* Myk overgang mellom sider i nettlesere som støtter det (Chrome/Edge m.fl.) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: page-fade-out .18s ease both;
}
::view-transition-new(root) {
  animation: page-fade-in-vt .25s ease both;
}
@keyframes page-fade-out {
  to { opacity: 0; }
}
@keyframes page-fade-in-vt {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
section { padding: 72px 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}

/* ===== Knapper ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-accent {
  background: var(--accent);
  color: var(--dark);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(205,239,155,0.45); }
.btn-outline {
  background: transparent;
  border-color: var(--dark);
  color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); }
.btn-small { padding: 10px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 34px; width: auto; }
.logo-icon { height: 30px; width: auto; }
.logo-word {
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--dark);
}
.logo-fallback { font-weight: 800; font-size: 1.2rem; color: var(--dark); }
.logo-fallback small { font-weight: 500; font-size: 0.7rem; display: block; letter-spacing: 0.08em; }
.logo-fallback.light { color: #fff; }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { font-weight: 600; font-size: 0.95rem; color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .15s ease, color .15s ease; }
.main-nav a:hover, .main-nav a.active { border-color: var(--accent); }
.header-cta { white-space: nowrap; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--dark); display: block; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, #fbfcf8 0%, #ffffff 100%);
  padding: 64px 0 0;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: -0.02em; }
.hero h1 .accent-word { background: linear-gradient(180deg, transparent 55%, var(--accent) 55%); }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4/3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Kart ===== */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-soft); }
.map-embed iframe { width: 100%; height: 420px; display: block; }
@media (max-width: 680px) {
  .map-embed iframe { height: 280px; }
}

/* ===== Fargevelger (flytende boks på bildet) ===== */
.color-card {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  box-shadow: 0 10px 30px rgba(13,27,42,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.color-card-label { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; }
.color-dots { display: flex; flex-direction: column; gap: 10px; }
.color-dot {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(13,27,42,0.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.color-dot:hover { transform: scale(1.12); }
.color-dot.active { box-shadow: 0 0 0 1px rgba(13,27,42,0.12), 0 0 0 3px var(--dark); transform: scale(1.1); }
#model-hero-img { transition: opacity 0.2s ease; }
.color-card-name { font-size: 0.72rem; font-weight: 700; color: var(--dark); text-align: center; max-width: 70px; }

/* ---- Mørk hero med bilde som fader inn i bakgrunnen ---- */
.hero.hero-dark {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
  padding: 0;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-dark .container { position: relative; z-index: 3; padding-top: 100px; }
.hero-media-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-media-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% center;
  filter: brightness(0.62) saturate(0.9);
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, transparent 6%, rgba(0,0,0,0.55) 30%, #000 52%);
  mask-image: linear-gradient(100deg, transparent 0%, transparent 6%, rgba(0,0,0,0.55) 30%, #000 52%);
}
.hero-dark::before {
  /* mørkt lag over hele bildet, sterkest bak teksten, så innhold alltid er lesbart */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6,14,23,0.88) 0%, rgba(6,14,23,0.72) 30%, rgba(6,14,23,0.42) 55%, rgba(6,14,23,0.55) 100%);
  z-index: 2;
  pointer-events: none;
}
.hero-dark::after {
  /* mykt fade nederst mot stats-stripen */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 160px;
  background: linear-gradient(180deg, transparent, var(--dark) 92%);
  z-index: 2;
  pointer-events: none;
}
.hero-text { max-width: 560px; padding-bottom: 56px; }
.hero-dark .eyebrow { color: rgba(255,255,255,0.6); }
.hero-dark h1 { color: #fff; }
.hero-dark p.lead { color: rgba(255,255,255,0.72); }
.btn-outline-light { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--dark); }

/* ===== Stats-stripe ===== */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 56px; border-top: 1px solid var(--border);
}
.stats-strip .stat { padding: 26px 20px; border-right: 1px solid var(--border); text-align: center; }
.stats-strip .stat:last-child { border-right: none; }
.stats-strip .stat .value { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.stats-strip .stat .label { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

.stats-strip.stats-dark {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 40px;
}
.stats-dark .stat { border-right-color: rgba(255,255,255,0.15); }
.stats-dark .stat .value { color: #fff; }
.stats-dark .stat .label { color: rgba(255,255,255,0.6); }

/* ===== Marquee ===== */
.marquee-wrap { background: var(--dark); color: #fff; overflow: hidden; padding: 14px 0; }
.marquee { display: flex; white-space: nowrap; animation: scroll 28s linear infinite; width: max-content; }
.marquee span { padding: 0 18px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; opacity: 0.9; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Modellkort ===== */
.models-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.model-card {
  background: var(--bg-soft); border-radius: var(--radius); padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.model-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(13,27,42,0.1); }
.model-card .model-media { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/10; background: #eceee7; }
.model-card .model-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.model-card:hover .model-media img { transform: scale(1.04); }
.model-card .tag { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.model-card h3 { font-size: 1.5rem; margin: 0; }
.model-specs { display: flex; gap: 22px; margin: 6px 0; }
.model-specs div { font-weight: 800; font-size: 1.1rem; color: var(--dark); }
.model-specs span { display: block; font-weight: 500; font-size: 0.75rem; color: var(--muted); }

/* ===== Priser / awards ===== */
.awards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 36px; align-items: stretch; }
.award-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  height: 100%; padding: 24px 18px; background: var(--bg-soft); border-radius: var(--radius-sm);
  text-decoration: none; color: inherit; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.award-item:hover, .award-item:focus-visible {
  transform: translateY(-3px); box-shadow: 0 10px 24px rgba(13,27,42,0.08); border-color: var(--border);
}
.award-logo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 86px; margin-bottom: 16px;
}
.award-item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.award-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.award-item p { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* ===== Facts / bento ===== */
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 34px; }
.fact-card { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 22px; transition: transform .2s ease, box-shadow .2s ease; }
.fact-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(13,27,42,0.08); }
.fact-card h4 { font-size: 1rem; margin-bottom: 6px; }
.fact-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: #fff; }
.section-dark .muted { color: rgba(255,255,255,0.65); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* ===== Kundeomtaler ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.testimonial-card { background: #fff; border: 1px solid #ebebe4; border-radius: var(--radius-sm); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.testimonial-stars { color: #e0a93a; font-size: 1.05rem; letter-spacing: 2px; }
.testimonial-text { font-size: 0.95rem; color: var(--dark); margin: 0; flex: 1; }
.testimonial-name { font-weight: 700; font-size: 0.88rem; margin: 0; }

/* ===== FAQ ===== */
.faq-list { max-width: 820px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid #ebebe4; border-radius: var(--radius-sm); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; cursor: pointer; text-align: left; font: inherit; font-weight: 700;
  padding: 16px 22px; color: inherit;
}
.faq-question:hover { color: var(--accent); }
.faq-icon { font-size: 1.3rem; font-weight: 400; color: var(--muted); flex-shrink: 0; transition: transform 0.25s ease; line-height: 1; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows 0.3s ease, opacity 0.25s ease, visibility 0s linear 0.3s;
}
.faq-answer.open {
  grid-template-rows: 1fr; opacity: 1; visibility: visible;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease 0.05s, visibility 0s linear 0s;
}
.faq-answer-inner { overflow: hidden; min-height: 0; }
.faq-answer-inner p { margin: 0 22px 18px; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ===== CTA-boks ===== */
.cta-box {
  background: var(--dark); color: #fff; border-radius: var(--radius);
  padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-box h2 { margin-bottom: 6px; }
.cta-box p { color: rgba(255,255,255,0.72); margin: 0; }

/* ===== Skjema ===== */
.form-card {
  background: var(--bg-soft); border-radius: var(--radius); padding: 36px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-family: inherit; font-size: 0.95rem; background: #fff;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* ===== Lånekalkulator (kollapsbar kun på mobil) ===== */
.lanekalkulator-summary {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; padding: 0; font: inherit; text-align: left; color: inherit;
  cursor: pointer;
}
.lanekalkulator-summary h2 { margin-bottom: 0; }
.lanekalkulator-chevron {
  font-size: 0.9rem; color: var(--muted); transition: transform 0.2s ease; flex-shrink: 0; margin-left: 12px;
}
.lanekalkulator-body { margin-top: 18px; }
@media (max-width: 680px) {
  .lanekalkulator-card { padding: 20px 24px; }
  .lanekalkulator-body {
    display: grid; grid-template-rows: 0fr; margin-top: 0; opacity: 0; visibility: hidden;
    transition: grid-template-rows 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease, visibility 0s linear 0.3s;
  }
  .lanekalkulator-body-inner { overflow: hidden; min-height: 0; }
  .lanekalkulator-body.expanded {
    grid-template-rows: 1fr; margin-top: 18px; opacity: 1; visibility: visible;
    transition: grid-template-rows 0.3s ease, opacity 0.3s ease 0.05s, margin-top 0.3s ease, visibility 0s linear 0s;
  }
  .lanekalkulator-toggle[aria-expanded="true"] .lanekalkulator-chevron,
  #lanekalkulator-toggle[aria-expanded="true"] .lanekalkulator-chevron { transform: rotate(180deg); }
}
@media (min-width: 681px) {
  /* På PC skal lånekalkulatoren alltid vises åpen, ikke oppføre seg som en kollapsboks */
  .lanekalkulator-summary { cursor: default; pointer-events: none; }
  .lanekalkulator-chevron { display: none; }
}
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; }
.alert-error { background: #fdeaea; color: #a12222; }
.alert-success { background: #e9f8e2; color: #24632c; }
.alert-info { background: #eaf2fb; color: #1d4e89; font-weight: 400; }
.alert-info code { background: rgba(255,255,255,0.6); padding: 1px 5px; border-radius: 4px; }
.honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; display: none; }

/* ===== Kontaktinfo-kort ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.contact-list { display: flex; flex-direction: column; gap: 18px; }
.contact-list .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.85); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-logo { height: 30px; margin-bottom: 14px; }
.footer-col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: 16px; }
.footer-col a { display: block; margin-bottom: 10px; font-size: 0.9rem; color: rgba(255,255,255,0.75); }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 0.88rem; color: rgba(255,255,255,0.65); margin-bottom: 8px; }
.footer-nav-list a { font-weight: 700; }
.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-row { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact-row svg { flex-shrink: 0; margin-top: 2px; color: rgba(255,255,255,0.55); }
.footer-contact-row a, .footer-contact-row span { font-size: 0.9rem; color: rgba(255,255,255,0.75); line-height: 1.5; }
.footer-contact-row a:hover { color: var(--accent); }
.footer-contact-name { font-weight: 700; color: #fff; font-size: 0.92rem; margin-bottom: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 24px; font-size: 0.8rem; color: rgba(255,255,255,0.55);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.footer-bottom-left { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom-left a { color: rgba(255,255,255,0.55); }
.footer-bottom-left a:hover { color: var(--accent); }
.footer-bottom-sep { color: rgba(255,255,255,0.3); }
.footer-bottom-right { display: flex; align-items: center; gap: 12px; }
.footer-social { display: flex; gap: 10px; margin: 0; }
.footer-social a {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8);
  margin: 0; transition: background .15s ease, color .15s ease;
}
.footer-social a:hover { background: var(--accent); color: var(--dark); }

/* ===== Cookie-banner ===== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  background: var(--dark); color: #fff; border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.cookie-banner.show {
  opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
.cookie-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 22px; max-width: var(--maxw); margin: 0 auto; flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.85); }
.cookie-banner a { text-decoration: underline; }

/* ===== Sider (legal, om oss) ===== */
.page-hero { padding: 56px 0 20px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.legal-content { max-width: 760px; }
.legal-content h2 { margin-top: 2em; font-size: 1.25rem; }
.legal-content ul { padding-left: 20px; }
.legal-content li { margin-bottom: 6px; }

/* ===== Admin ===== */
.admin-body { background: #f2f3ef; min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--dark); color: #fff; padding: 28px 20px; }
.admin-sidebar .brand { font-weight: 800; margin-bottom: 30px; font-size: 1.05rem; }
.admin-sidebar a {
  display: block; padding: 11px 14px; border-radius: 10px; font-weight: 600; font-size: 0.92rem;
  color: rgba(255,255,255,0.8); margin-bottom: 4px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-sidebar form { margin-top: 24px; }
.admin-sidebar .section-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.4); margin: 22px 0 8px; padding: 0 14px; }
.admin-sidebar .section-label:first-of-type { margin-top: 4px; }
.admin-main { padding: 40px; max-width: 980px; }
.admin-card { background: #fff; border-radius: 16px; padding: 28px; margin-bottom: 24px; border: 1px solid #e6e8e3; }
.admin-card h2 { font-size: 1.1rem; margin-bottom: 4px; }
.admin-field { margin-bottom: 18px; }
.admin-field label { font-size: 0.82rem; }
.admin-field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.badge-ny { background: #fde7d0; color: #93450a; }
.badge-lest { background: #e0ecfa; color: #1a4c8a; }
.badge-behandlet { background: #e0f5df; color: #1f6d24; }
.badge-kontaktet { background: #e0ecfa; color: #1a4c8a; }
.badge-venter_pa_svar { background: #fdf3cf; color: #8a6b08; }
.badge-kunde { background: #e0f5df; color: #1f6d24; }
.badge-tapt { background: #f2f2f2; color: #6b6b6b; }
.notes-thread { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.notes-thread-item { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; position: relative; }
.notes-thread-meta { font-size: 0.74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; display: flex; gap: 6px; }
.notes-thread-text { font-size: 0.9rem; color: var(--text); margin: 0; white-space: pre-line; padding-right: 50px; }
.notes-thread-delete { position: absolute; top: 10px; right: 10px; margin: 0; }
.btn-link-small { background: none; border: none; padding: 0; font-size: 0.76rem; color: var(--muted); cursor: pointer; text-decoration: underline; font-family: inherit; }
.btn-link-small:hover { color: #a12222; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.admin-tab { display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--dark); background: #f2f3ef; border: 1px solid transparent; font-family: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; transition: background .15s ease, color .15s ease; }
.admin-tab:hover { background: #e8e9e3; }
.admin-tab.active { background: var(--dark); color: #fff; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #eee; font-size: 0.88rem; vertical-align: top; }
table.admin-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.quicklink-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 10px; }
.quicklink-card { display: block; border: 1px solid #e6e8e3; border-radius: 14px; padding: 18px; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.quicklink-card:hover { box-shadow: 0 6px 18px rgba(13,27,42,0.08); transform: translateY(-2px); }
.quicklink-card strong { display: block; font-size: 0.98rem; margin-bottom: 4px; color: var(--dark); }
.quicklink-card span { font-size: 0.82rem; color: var(--muted); }
.dashboard-section-label { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 28px 0 2px; }
.dashboard-section-label:first-of-type { margin-top: 8px; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.image-card { position: relative; border: 1px solid #e6e8e3; border-radius: 14px; padding: 16px; background: #fff; transition: opacity .15s ease, box-shadow .15s ease; }
.image-card.dragging { opacity: 0.35; }
.image-card[draggable="true"]:hover { box-shadow: 0 4px 14px rgba(13,27,42,0.08); }
.image-drag-handle { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-soft); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: grab; user-select: none; }
.image-drag-handle:active { cursor: grabbing; }
.image-preview { background: #f2f3ef; border-radius: 10px; height: 130px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; }
.image-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--dark); }
.login-card { background: #fff; border-radius: 20px; padding: 40px; width: 100%; max-width: 380px; }

/* ===== Bilannonser (Våre biler) ===== */
.listings-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
input[type="range"] { accent-color: var(--dark); }
.listings-sidebar input[type="range"] { width: 100%; }
.form-card input[type="range"] { width: 100%; }
.listings-sidebar .admin-field label { display: flex; justify-content: space-between; font-size: 0.82rem; }
.listings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.listing-card {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: box-shadow .15s ease, transform .15s ease;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(13,27,42,0.1); }
.listing-card-media { position: relative; aspect-ratio: 16/10; background: var(--dark); }
.listing-card-media img { width: 100%; height: 100%; object-fit: cover; }
.sold-ribbon {
  position: absolute; top: 14px; left: -34px; z-index: 3;
  background: var(--dark); color: #fff; font-weight: 800; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 40px; transform: rotate(-40deg); box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.badge-sold-inline {
  display: inline-block; background: var(--dark); color: #fff; font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 10px; border-radius: 999px;
  vertical-align: middle; margin-left: 10px;
}
.listing-card-body { padding: 16px 18px 20px; }
.listing-card-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.listing-card-subtitle { font-size: 0.85rem; margin-bottom: 12px; }
.listing-card-row { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.listing-card-row:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.listing-label { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.listing-value { display: block; font-weight: 700; font-size: 0.95rem; color: var(--dark); margin-top: 2px; }
.listing-price { color: var(--dark); }

.listing-detail-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; margin-top: 24px; align-items: start; }
.listing-gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); aspect-ratio: 16/10; touch-action: pan-y; }
.gallery-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.gallery-img.active { opacity: 1; pointer-events: auto; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: none; font-size: 1.4rem; cursor: pointer; color: var(--dark);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-img { cursor: zoom-in; }

/* ===== Miniatyrbilder (under hovedbildet, som på Finn.no) ===== */
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; min-width: 0; }
.gallery-thumb {
  flex: 0 0 auto; width: 76px; height: 56px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--bg-soft);
  opacity: 0.6; transition: opacity .15s ease, border-color .15s ease; touch-action: manipulation;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { opacity: 1; border-color: var(--accent); }

.lightbox-counter { color: rgba(255,255,255,0.85); font-size: 0.85rem; font-weight: 600; margin-top: 14px; text-align: center; }
.lightbox-thumbs { display: flex; gap: 8px; margin-top: 10px; max-width: 80vw; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.lightbox-thumbs .gallery-thumb { width: 64px; height: 48px; }

/* ===== Bilde-lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  flex-direction: column; align-items: center; justify-content: center;
  background: rgba(13,27,42,0.86);
  padding: 40px 20px;
  animation: lightbox-fade .15s ease;
}
.lightbox.active { display: flex; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-img-wrap { position: relative; width: 78vw; height: 62vh; display: flex; align-items: center; justify-content: center; touch-action: none; }
.lightbox-img { max-width: 78vw; max-height: 62vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); touch-action: none; }
.lightbox-close {
  position: absolute; top: -18px; right: -18px; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--dark);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.lightbox .gallery-nav { position: fixed; top: 50%; }
#lightbox-prev { left: 24px; }
#lightbox-next { right: 24px; }
@media (max-width: 680px) {
  .lightbox { padding: 16px; }
  .lightbox-img-wrap { width: 92vw; height: 52vh; }
  .lightbox-img { max-width: 92vw; max-height: 52vh; }
  .lightbox-close { top: -14px; right: 2px; width: 38px; height: 38px; }
  .lightbox-thumbs { max-width: 92vw; }
  .lightbox-thumbs .gallery-thumb { width: 52px; height: 40px; }
}

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 24px; margin-top: 14px; }
.listing-description { font-size: 0.95rem; color: var(--text); white-space: pre-line; }
.listing-description.clamped { max-height: 6.6em; overflow: hidden; position: relative; }
.listing-description.clamped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.4em;
  background: linear-gradient(180deg, transparent, #fff);
}

/* ===== Responsivt ===== */
@media (max-width: 960px) {
  .hero-inner, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .stats-strip, .models-grid, .awards-grid, .colors-grid, .facts-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .admin-sidebar .brand { width: 100%; margin-bottom: 10px; }
  .admin-sidebar .section-label { width: 100%; margin: 10px 0 2px; padding: 0 4px; }
  .hero-media-bg img {
    object-position: 50% 30%;
    -webkit-mask-image: linear-gradient(200deg, transparent 0%, transparent 10%, rgba(0,0,0,0.55) 42%, #000 62%);
    mask-image: linear-gradient(200deg, transparent 0%, transparent 10%, rgba(0,0,0,0.55) 42%, #000 62%);
  }
  .listings-layout { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-detail-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .main-nav {
    position: fixed; top: 84px; left: 0; right: 0; background: #fff; flex-direction: column;
    padding: 0 24px; gap: 4px; border-bottom: 1px solid var(--border);
    max-height: 0; opacity: 0; visibility: hidden; overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, visibility 0s linear 0.3s;
  }
  .main-nav.open {
    max-height: 480px; opacity: 1; visibility: visible; padding: 20px 24px;
    transition: max-height 0.3s ease, opacity 0.3s ease 0.05s, padding 0.3s ease, visibility 0s linear 0s;
  }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .stats-strip, .models-grid, .awards-grid, .colors-grid, .facts-grid, .form-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .stats-strip .stat { border-right: none; border-bottom: 1px solid var(--border); }
  section { padding: 48px 0; }
  .cta-box { padding: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-thumb { width: 60px; height: 44px; }
  /* Admin: gjør tabeller/lister scrollbare internt i stedet for at hele siden (inkl. menyen) blir bredere enn skjermen */
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-main { max-width: 100vw; overflow-x: hidden; }
  .listings-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .hero.hero-dark { min-height: 520px; }
  .hero-dark .container { padding-top: 64px; }
  .hero-text { padding-bottom: 32px; }
  .color-card {
    top: auto; bottom: 0; left: 0; right: 0; transform: none;
    border-radius: 0 0 var(--radius) var(--radius);
    flex-direction: row; justify-content: center; gap: 14px; padding: 10px 14px;
  }
  .color-dots { flex-direction: row; }
  .color-card-label { display: none; }
  .color-card-name { max-width: none; }
}
