:root {
  --red: #c1121f;
  --ink: #111;
  --muted: #666;
  --bg: #f7f7f7;
  --card: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--ink);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* layout helpers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  height: 44px;
}

.main-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav a.active {
  background: #f2f2f2;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.cta {
  margin-left: 4px;
}

/* hero */
.hero {
  background: var(--bg);
  background-image: linear-gradient(0deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)), var(--hero);
  background-size: cover;
  background-position: center;
  padding: 64px 0;
}

.hero__inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

.hero p {
  margin: 0 auto 16px;
  max-width: 760px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* cards / grid */
.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: 14px;
}

.card h3 {
  margin: 4px 0 6px;
}

.card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.link {
  color: var(--red);
  font-weight: 600;
}

/* page headers */
.page-title {
  margin: 22px 0 10px;
}

.lead {
  color: var(--muted);
  margin: 0 0 18px;
}

/* service sections */
.service {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: center;
  margin: 26px 0;
}

.service img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.service h2 {
  margin: 0 0 6px;
}

/* === GALLERI – kun bilder, ryddig grid === */
.gallery {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-bottom: 3rem;
}

.gallery img {
  width: 100%;
  height: 260px;          /* alle samme høyde */
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* before/after (brukes på referanser) */
.ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0;
}

.ba figure {
  margin: 0;
}

.ba img {
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ba figcaption {
  margin-top: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* footer */
.site-footer {
  padding: 22px 20px;
  text-align: center;
  border-top: 1px solid #eee;
  color: #555;
  margin-top: 30px;
}

/* === LIGHTBOX FOR GALLERI === */
.lightbox {
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: min(1000px, 96vw);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* viktig for PC: bildet skal alltid passe på skjermen */
.lightbox-inner img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  color: #f9fafb;
  font-size: 0.95rem;
  text-align: center;
}

/* knapper */
.lightbox-btn {
  position: absolute;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 30px;
  z-index: 2;
}

/* X oppe til høyre – synlig også på PC */
.lightbox-close {
  top: 16px;
  right: 16px;
}

/* piler midt på hver side av bildet */
.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn:hover {
  background: rgba(30, 64, 175, 0.9);
}

/* small screens */
@media (max-width: 820px) {
  .service {
    grid-template-columns: 1fr;
  }

  /* lightbox – mobil: knapper nærmere bildet */
  .lightbox-inner {
    max-width: 100%;
  }

  .lightbox-btn {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
  }

  .lightbox-prev {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-next {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 520px) {
  .logo {
    height: 36px;
  }

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

  .gallery img {
    height: 220px; /* litt lavere på mobil */
  }
}

/* small screens (du hadde disse to blokkene duplisert – lar de stå urørt) */
@media (max-width: 820px) {
  .service {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .logo {
    height: 36px;
  }

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

  .gallery img {
    height: 220px; /* litt lavere på mobil */
  }
}