/* Næringstomter i Flekkefjord – basert på XD-design "Flow 1" (1680px) */
:root {
  --green: #1AB058;
  --green-light: #77FB91;
  --yellow: #EAC00F;
  --text: #222222;
  --bg-soft: #EAF6EE;
  --white: #ffffff;
  --max: 1200px;
  --narrow: 960px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(100% - 48px, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 48px, var(--narrow)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; }
.site-header--overlay { position: absolute; inset: 0 0 auto 0; color: var(--white); }
.site-header--solid { color: #111; background: var(--white); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 34px 0 30px;
}
.brand { display: flex; align-items: center; gap: 22px; text-decoration: none; }
.brand-logo { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.15; font-weight: 500; }
.brand-logo img { width: 46px; height: 52px; object-fit: contain; }
.brand-crest {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid currentColor; display: grid; place-items: center;
}
.brand-crest svg { width: 26px; height: 26px; }
.brand-divider { width: 1px; align-self: stretch; background: currentColor; opacity: .7; min-height: 52px; }
.brand-title { font-size: 20px; line-height: 1.2; font-weight: 500; }

.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.lang { font-size: 12px; display: flex; gap: 6px; align-items: center; opacity: .85; }
.lang a { text-decoration: none; }
.lang a[aria-current="true"] { font-weight: 700; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: currentColor; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: min(100vh, 860px); min-height: 520px; overflow: hidden; background: #3d4a4f url(../images/hero.jpg) center / cover no-repeat; color: var(--white); }
.hero video, .hero .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.45) 100%); }
.hero-text { position: absolute; z-index: 2; left: 0; right: 0; bottom: 14%; }
.hero-text p { max-width: 620px; margin: 0; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.25; }

/* ---------- Typografi ---------- */
h1, h2, h3 { color: var(--green); font-weight: 500; line-height: 1.15; margin: 0 0 18px; }
.h-xl { font-size: clamp(32px, 3vw, 44px); }
.h-md { font-size: clamp(24px, 2vw, 30px); }
.lead p { font-size: clamp(18px, 1.4vw, 22px); margin: 0 0 22px; }

/* ---------- Intro ---------- */
.intro { padding: 90px 0 60px; }

/* ---------- Kart ---------- */
.map-block { position: relative; }
.map { width: 100%; height: 620px; background: #2c3b2f; }
.map--full { height: min(70vh, 640px); }
.map-pin { background: none; border: 0; }
.map-pin svg { width: 34px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.leaflet-popup-content-wrapper { border-radius: 0; padding: 0; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.leaflet-popup-content { margin: 0; width: 280px !important; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; font-size: 22px; top: 6px; right: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.popup-card img, .popup-card .ph { width: 100%; height: 160px; object-fit: cover; }
.popup-card .label { background: var(--green); color: #fff; padding: 12px 16px; font-family: var(--font); }
.popup-card .label strong { display: block; font-size: 16px; }
.popup-card .label span { font-size: 14px; }
.popup-card a { text-decoration: none; }

/* ---------- Kort / karusell ---------- */
.plots { padding: 70px 0 110px; }
.carousel { position: relative; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 32px) / 3);
  gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute; top: 120px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--bg-soft); color: var(--green); cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.carousel-btn:hover { background: var(--green); color: #fff; }
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn.prev { left: -72px; }
.carousel-btn.next { right: -72px; }

.card { scroll-snap-align: start; text-decoration: none; display: block; }
.card .media { aspect-ratio: 4 / 3; overflow: hidden; background: #cfd8d3; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .media img { transform: scale(1.04); }
.card h3 { font-size: 20px; font-weight: 700; margin: 14px 0 2px; }
.card p { color: var(--green); margin: 0; font-size: 18px; }

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

/* ---------- Aktuelt ---------- */
.news { background: var(--bg-soft); padding: 90px 0; }
.news-item { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.news-item + .news-item { margin-top: 80px; }
.news-item.reverse .news-text { order: 2; }
.news-item img { width: 100%; aspect-ratio: 16 / 12.5; object-fit: cover; background: #cfd8d3; }
.news-text { color: var(--green); }
.news-text h2 { font-size: clamp(28px, 2.5vw, 38px); }
.news-text p { margin: 0 0 18px; font-size: 18px; }
.read-more { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.read-more .circle { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.read-more .circle svg { width: 12px; height: 12px; }
.read-more:hover .circle { transform: translateX(3px); }
.read-more .circle { transition: transform .2s; }

/* ---------- Underside ---------- */
.page-intro { padding: 90px 0 50px; }
.page-intro .lead p:first-of-type { font-size: clamp(18px, 1.4vw, 22px); }
.page-intro .lead p { font-size: 16px; }
.page-plots { padding: 0 0 110px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green); color: #fff; padding: 70px 0 40px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 180px 1.4fr 1fr .6fr; gap: 32px; align-items: start; }
.footer-top p { margin: 0 0 14px; }
.footer-top a { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; line-height: 1.1; }
.footer-brand .brand-crest { width: 54px; height: 54px; }
.footer-social { justify-self: end; display: flex; flex-direction: column; gap: 4px; }
.footer-social a { font-weight: 700; font-size: 18px; text-decoration: none; }
.footer-social a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 70px; font-size: 12px; opacity: .9; }
.footer-bottom p { margin: 0 0 2px; }

/* ---------- Responsivt ---------- */
@media (max-width: 1360px) {
  .carousel-btn.prev { left: -14px; }
  .carousel-btn.next { right: -14px; }
  .carousel-btn { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 2; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-right { flex-direction: row-reverse; align-items: center; gap: 16px; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--green); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 24px 20px; }
  .main-nav a { display: block; padding: 12px 0; color: #fff; border-bottom: 1px solid rgba(255,255,255,.25); }
  .brand-title { font-size: 16px; }
  .brand { gap: 14px; }
  .carousel-track { grid-auto-columns: 75%; }
  .news-item, .grid-2 { grid-template-columns: 1fr; }
  .news-item.reverse .news-text { order: 0; }
  .map { height: 460px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-social { justify-self: start; }
}
@media (max-width: 520px) {
  .brand-logo, .brand-divider { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .carousel-track { grid-auto-columns: 86%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
