/* ============================================================
   css/style.css  –  Nya Onsalavägen · Ljust & mörkt tema
   ============================================================ */

/* ── TEMA: MÖRKT (standard) ── */
:root,
[data-theme="dark"] {
  --bg:          #0d1117;
  --bg2:         #161b22;
  --bg3:         #1c2333;
  --bg4:         #21262d;
  --border:      #30363d;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-faint:  #484f58;
  --gold:        #e8a020;
  --gold-hover:  #f5c05a;
  --shadow:      rgba(0,0,0,0.6);
  --panel-bg:    rgba(22,27,34,0.97);
  --header-bg:   rgba(13,17,23,0.96);
  --source-bg:   #0d1117;
}

/* ── TEMA: LJUST ── */
[data-theme="light"] {
  --bg:          #f5f5f0;
  --bg2:         #ffffff;
  --bg3:         #f0ede8;
  --bg4:         #e8e4de;
  --border:      #d0c8bc;
  --text:        #1a1a1a;
  --text-muted:  #555555;
  --text-faint:  #aaaaaa;
  --gold:        #c47a10;
  --gold-hover:  #e8a020;
  --shadow:      rgba(0,0,0,0.15);
  --panel-bg:    rgba(255,255,255,0.98);
  --header-bg:   rgba(245,245,240,0.97);
  --source-bg:   #f0ede8;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  gap: 12px;
}

.header-left    { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-logo    { font-size: 1.3rem; }
.header-title   { font-size: 0.95rem; font-weight: 700; color: var(--gold); letter-spacing: 0.3px; }
.header-sub     { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }

/* ── SEARCH BOX ── */
.header-search {
  flex: 1;
  max-width: 320px;
}

#

#
#

/* ── NAV ── */
.header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-btn {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-btn:hover  { border-color: var(--gold); color: var(--gold); }
.nav-btn.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 600; }

/* ── THEME TOGGLE ── */
.theme-toggle {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px; height: 34px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* ── VIEWS ── */
.view { display: none !important; }
.view.active { display: block !important; }
.view.active.film-fullpage { display: flex !important; }

/* ── MAP ── */
#map {
  width: 100%;
  height: calc(100vh - 60px);
  margin-top: 60px;
}

/* ── INFO PANEL ── */
.info-panel {
  display: none;
  position: fixed;
  top: 72px; right: 16px;
  width: 340px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  z-index: 500;
  box-shadow: 0 16px 48px var(--shadow);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.info-panel.active { display: block; }

.close-btn {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover { background: var(--gold); color: #000; border-color: var(--gold); }

.category-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 10px; letter-spacing: 0.8px; text-transform: uppercase;
}

.info-panel h2 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; padding-right: 32px; line-height: 1.4; }
.info-panel p  { font-size: 0.85rem; line-height: 1.65; color: var(--text-muted); }
.info-panel .meta { margin-top: 14px; font-size: 0.75rem; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 10px; }

/* ── LEGEND ── */
.legend {
  position: fixed;
  bottom: 70px; left: 16px;
  background: var(--panel-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  z-index: 500;
  font-size: 0.75rem;
}

.legend h3        { color: var(--gold); margin-bottom: 8px; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.legend-item      { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--text-muted); }
.legend-dot       { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── STATS BOX ── */
.stats-box {
  position: fixed;
  bottom: 122px; left: 16px;
  background: var(--panel-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 12px 16px;
  z-index: 500;
  font-size: 0.75rem;
  min-width: 180px;
}

.stats-box h3     { color: var(--gold); margin-bottom: 8px; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.stat-row         { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 4px; color: var(--text-muted); }
.stat-row span:last-child { color: var(--text); font-weight: 600; }

/* ── CONTENT PAGES ── */
.content-page {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  padding: 40px 24px 60px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.content-page h2   { font-size: 1.4rem; color: var(--gold); margin-bottom: 8px; font-weight: 700; }
.content-page .lead { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; line-height: 1.6; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
  padding: 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: fadeUp 0.4s ease both;
  transition: border-color 0.2s;
}

.tl-item:hover { border-color: var(--gold); }

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

.tl-dot {
  position: absolute;
  left: -28px; top: 20px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.25);
}

.tl-dot.future { background: var(--bg4); border-color: var(--gold); }

.tl-tag {
  display: inline-block;
  font-size: 0.68rem; padding: 2px 8px;
  border-radius: 20px; margin-bottom: 6px;
  font-weight: 600;
}

.tl-year  { font-size: 0.72rem; font-weight: 700; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.tl-title { font-size: 0.97rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.tl-text  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 12px; }

/* Källor i tidslinje */
.tl-sources { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.tl-sources-label { font-size: 0.7rem; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px; }
.tl-source-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: var(--gold);
  text-decoration: none; margin-right: 10px; margin-bottom: 3px;
  opacity: 0.85; transition: opacity 0.2s;
}
.tl-source-link:hover { opacity: 1; text-decoration: underline; }

/* ── NEWS ── */
.news-grid { display: grid; gap: 16px; }

.news-loading { color: var(--text-muted); font-size: 0.85rem; padding: 20px 0; }

.news-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--shadow);
}

.news-auto-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.66rem; color: var(--text-faint);
  margin-bottom: 10px; font-style: italic;
}

.news-date   { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.news-title  { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.news-text   { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; }
.news-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.news-tag    { display: inline-block; font-size: 0.68rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.news-source { font-size: 0.72rem; color: var(--text-faint); }
.news-source a { color: var(--gold); text-decoration: none; }
.news-source a:hover { text-decoration: underline; }

.news-status {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #81c784;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── FILM ── */
.film-fullpage {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  flex-direction: column;
  padding: 20px 24px 24px;
  box-sizing: border-box;
  width: 100%;
}

.film-header {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.film-header h2 {
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}

.film-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Spelaren fyller all tillgänglig höjd */
.film-player {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px var(--shadow);
  background: #000;
  margin-bottom: 14px;
  position: relative;
}

.film-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.video-meta {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  flex-shrink: 0;
}

.video-meta-item {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.video-meta-item a { color: var(--gold); text-decoration: none; }
.video-meta-item a:hover { text-decoration: underline; }

/* Ta bort news-status */
.news-status { display: none; }


/* ═══════════════════════════════════
   STARAGÅRDEN
═══════════════════════════════════ */

.sg-page {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* Hero */
.sg-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.sg-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.55);
}

.sg-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.sg-hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  background: rgba(232,160,32,0.15);
  border: 1px solid rgba(232,160,32,0.3);
  padding: 3px 12px;
  border-radius: 20px;
}

.sg-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.sg-hero-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

/* Content */
.sg-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.sg-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.sg-section-dark {
  background: var(--bg2);
  margin: 0 -24px;
  padding: 32px 24px;
  border-bottom: 1px solid var(--border);
}

.sg-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sg-h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.sg-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Two column */
.sg-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.sg-two-col-reverse { direction: rtl; }
.sg-two-col-reverse > * { direction: ltr; }

.sg-col-img img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sg-img-caption {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 6px;
  line-height: 1.4;
}

/* Finds grid */
.sg-finds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.sg-find-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}

.sg-find-card:hover { border-color: var(--gold); }

.sg-find-icon { font-size: 1.5rem; margin-bottom: 8px; }
.sg-find-title { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sg-find-text  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Image row */
.sg-img-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.sg-img-item img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Video */
.sg-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  margin-top: 16px;
}

.sg-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* External button */
.sg-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 20px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.sg-external-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* Mini timeline */
.sg-mini-tl {
  margin-top: 16px;
  border-left: 2px solid var(--gold);
  padding-left: 20px;
}

.sg-tl-item {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  align-items: baseline;
}

.sg-tl-future .sg-tl-year { color: var(--text-faint); }

.sg-tl-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  min-width: 70px;
  flex-shrink: 0;
}

.sg-tl-text {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sources */
.sg-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sg-source-link {
  color: var(--gold);
  font-size: 0.82rem;
  text-decoration: none;
  opacity: 0.85;
}

.sg-source-link:hover { opacity: 1; text-decoration: underline; }

/* Responsive */
@media (max-width: 700px) {
  .sg-two-col, .sg-finds-grid, .sg-img-row { grid-template-columns: 1fr; }
  .sg-hero-title { font-size: 1.4rem; }
  .sg-hero { height: 280px; }
  .sg-two-col-reverse { direction: ltr; }
}

/* Fix view.active for sg-page */
.view.active:has(.sg-page) { display: block !important; }


/* ── HAMBURGARMENY ── */
.hamburger {
  display: none;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.hamburger:hover { border-color: var(--gold); color: var(--gold); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--header-bg);
  border-bottom: 2px solid var(--gold);
  backdrop-filter: blur(16px);
  z-index: 999;
  padding: 14px 12px 18px;
  box-shadow: 0 8px 32px var(--shadow);
}

.mobile-menu.open { display: block; }

/* Sökruta i mobilmenyn */
.mobile-menu-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.mobile-search-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
#map-search-input-mobile {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#map-search-input-mobile::placeholder { color: var(--text-muted); }
#map-search-input-mobile:focus { border-color: var(--gold); }

/* 2-kolumns rutnät */
.mobile-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-nav-btn {
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 12px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: center;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
}

.mobile-nav-btn .nav-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.mobile-nav-btn:hover  { border-color: var(--gold); color: var(--gold); }
.mobile-nav-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
}

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .hamburger   { display: flex; }
  .header-search { display: none; }

  /* Info-knapp på mobil */
  .legend, .stats-box { display: none; }

  .map-info-btn {
    position: fixed;
    bottom: 24px; right: 16px;
    background: var(--gold);
    border: none;
    color: #000;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
  }

  .map-info-panel {
    position: fixed;
    bottom: 84px; right: 16px;
    width: calc(100vw - 32px);
    max-height: 60vh;
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    z-index: 500;
    box-shadow: 0 8px 32px var(--shadow);
    display: none;
  }

  .map-info-panel.open { display: block; }

  .map-info-panel h3 {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
  }

  .map-info-panel .stat-row {
    display: flex; justify-content: space-between;
    font-size: 0.82rem; margin-bottom: 5px;
    color: var(--text-muted);
  }

  .map-info-panel .stat-row span:last-child { color: var(--text); font-weight: 600; }

  .map-info-panel .legend-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px;
  }

  .map-info-panel .legend-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  }
}

/* ── PANEL LÄNK-KNAPP ── */
.panel-link-btn {
  display: block;
  margin-top: 14px;
  padding: 8px 14px;
  background: var(--bg4);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.panel-link-btn:hover { background: var(--gold); color: #000; }


/* ═══════════════════════════════════
   JURIDIK
═══════════════════════════════════ */
.juridik-page { max-width: 860px; }

.jur-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.jur-section-highlight {
  background: rgba(232,160,32,0.06);
  border: 1px solid rgba(232,160,32,0.2);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 8px 0;
}

.jur-h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.jur-text {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Parter */
.jur-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.jur-party {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  border-left: 3px solid var(--border);
}

.jur-against { border-left-color: #ef9a9a; }
.jur-for     { border-left-color: #81c784; }
.jur-neutral { border-left-color: #4fc3f7; }

.jur-party-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.jur-party-icon { font-size: 1.3rem; flex-shrink: 0; }
.jur-party-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.jur-party-role { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.jur-party-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }

.jur-link {
  font-size: 0.75rem;
  color: var(--gold);
  text-decoration: none;
}
.jur-link:hover { text-decoration: underline; }

/* Överklaganden timeline */
.jur-timeline { display: flex; flex-direction: column; gap: 14px; }

.jur-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  border-left: 4px solid var(--border);
  transition: border-color 0.2s;
}

.jur-item:hover { border-color: var(--gold); }
.jur-won     { border-left-color: #ef9a9a; }
.jur-lost    { border-left-color: #81c784; }
.jur-mixed   { border-left-color: #fff176; }
.jur-ongoing { border-left-color: #4fc3f7; }

.jur-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.jur-verdict {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.jur-verdict-against { background: #81c78422; color: #81c784; border: 1px solid #81c78440; }
.jur-verdict-for     { background: #ef9a9a22; color: #ef9a9a; border: 1px solid #ef9a9a40; }
.jur-verdict-win     { background: #81c78422; color: #81c784; border: 1px solid #81c78440; }
.jur-verdict-mixed   { background: #fff17622; color: #b8b000; border: 1px solid #fff17640; }
.jur-verdict-ongoing { background: #4fc3f722; color: #4fc3f7; border: 1px solid #4fc3f740; }

.jur-year      { font-size: 0.75rem; font-weight: 600; color: var(--gold); }
.jur-item-title { font-size: 0.93rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.jur-item-who  { font-size: 0.75rem; color: var(--text-faint); margin-bottom: 8px; font-style: italic; }
.jur-item-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.jur-item-outcome { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.jur-item-ref  { font-size: 0.72rem; color: var(--text-faint); margin-bottom: 6px; }

.jur-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  margin-top: 4px;
}
.jur-doc-link:hover { text-decoration: underline; }

/* Källor */
.jur-sources { display: flex; flex-direction: column; gap: 8px; }
.jur-source-link { color: var(--gold); font-size: 0.82rem; text-decoration: none; opacity: 0.85; }
.jur-source-link:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 700px) {
  .jur-parties { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════
   ARKEOLOGI
═══════════════════════════════════ */
.ark-hero { position: relative; height: 320px; overflow: hidden; }
.ark-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.ark-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,17,23,0.92) 0%, rgba(13,17,23,0.3) 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px 32px;
}
.ark-hero-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #ce93d8; margin-bottom: 8px; }
.ark-hero-title { font-size: 2rem; font-weight: 800; color: #e6edf3; line-height: 1.15; margin-bottom: 8px; }
.ark-hero-sub { font-size: 0.88rem; color: #8b949e; }

.ark-content { max-width: 860px; margin: 0 auto; padding: 32px 20px 60px; }
.ark-section { padding: 28px 0; border-bottom: 1px solid var(--border); }
.ark-tag { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; letter-spacing: 0.8px; text-transform: uppercase; }
.ark-h2 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.ark-text { font-size: 0.87rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }

.ark-periods { display: flex; flex-direction: column; gap: 28px; margin-top: 16px; }
.ark-period { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.ark-period-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ark-period-icon { font-size: 1.5rem; flex-shrink: 0; }
.ark-period-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.ark-period-sub { font-size: 0.75rem; color: var(--text-faint); margin-top: 2px; }
.ark-period-text { font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.ark-period-img { width: 100%; border-radius: 8px; margin-bottom: 6px; }
.ark-img-caption { font-size: 0.72rem; color: var(--text-faint); font-style: italic; }

.ark-facts-section { border: none; }
.ark-facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ark-fact { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 20px 12px; text-align: center; }
.ark-fact-num { display: block; font-size: 1.6rem; font-weight: 800; color: #ce93d8; }
.ark-fact-label { display: block; font-size: 0.72rem; color: var(--text-faint); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

.ark-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; margin-top: 16px; }
.ark-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.ark-link { display: inline-block; margin-top: 10px; color: var(--gold); font-size: 0.85rem; text-decoration: none; }
.ark-link:hover { text-decoration: underline; }

.ark-sources { display: flex; flex-direction: column; gap: 8px; }
.ark-source-link { color: var(--gold); font-size: 0.82rem; text-decoration: none; opacity: 0.85; }
.ark-source-link:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 600px) {
  .ark-hero-title { font-size: 1.4rem; }
  .ark-facts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Arkeologi feed */
.ark-feed { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ark-feed-loading { font-size: 0.82rem; color: var(--text-faint); }
.ark-feed-empty { font-size: 0.82rem; color: var(--text-faint); }
.ark-feed-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; text-decoration: none;
  transition: border-color 0.2s;
}
.ark-feed-item:hover { border-color: var(--gold); }
.ark-feed-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ark-feed-text { flex: 1; }
.ark-feed-date { font-size: 0.7rem; color: var(--text-faint); margin-bottom: 4px; }
.ark-feed-title { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ark-feed-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Kartknopp */
.ark-map-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 12px 24px;
  background: var(--bg2); border: 1px solid var(--gold);
  border-radius: 10px; color: var(--gold);
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.ark-map-btn:hover { background: rgba(232,160,32,0.1); }

/* Fix: Karta touch och overflow */
#map-view {
  touch-action: pan-x pan-y;
}
#map {
  touch-action: pan-x pan-y;
}
.gm-style {
  touch-action: pan-x pan-y !important;
}
/* Fix: Google kontroller på mobil */
@media (max-width: 768px) {
  .gm-bundled-control { bottom: 80px !important; }
  .gmnoprint.gm-bundled-control { bottom: 80px !important; }
}

/* ═══════════════════════════════════
   DISCLAIMER MODAL
═══════════════════════════════════ */
.disclaimer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.disclaimer-overlay.active {
  display: flex;
}
.disclaimer-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.disclaimer-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.disclaimer-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.disclaimer-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.disclaimer-text a {
  color: var(--gold);
  text-decoration: none;
}
.disclaimer-text a:hover {
  text-decoration: underline;
}
.disclaimer-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.disclaimer-btn:hover {
  opacity: 0.85;
}

/* ═══════════════════════════════════
   MÄTVERKTYG
═══════════════════════════════════ */
.measure-btn {
  position: absolute;
  top: 120px;
  right: 12px;
  z-index: 500;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.measure-btn:hover { border-color: var(--gold); color: var(--gold); }
.measure-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

.measure-result {
  display: none;
  position: absolute;
  top: 160px;
  right: 12px;
  z-index: 500;
  background: var(--bg2);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 8px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  min-width: 120px;
  text-align: center;
}
.measure-result.active { display: block; }

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Göm footer på kartvyn */
body:has(#map-view.active) .site-footer {
  display: none;
}
.footer-sep { margin: 0 8px; }
.footer-link { color: var(--text-faint); text-decoration: none; }
.footer-link:hover { color: var(--gold); }

/* SEO: visuellt dold men läsbar av sökmotorer */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* SEO-text under kartan */
.map-description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13,17,23,0.85);
  padding: 8px 16px;
  z-index: 100;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.map-description strong { color: var(--text); }
@media (max-width: 600px) {
  .map-description { font-size: 0.68rem; padding: 6px 12px; }
}

/* ═══════════════════════════════════
   STARTSIDA
═══════════════════════════════════ */

/* Hero */
.home-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

/* Dekorativ väglinje */
.home-hero-bg::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -10%;
  right: -10%;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(232,160,32,0.2), #e8a020, rgba(232,160,32,0.2), transparent);
  transform: rotate(-8deg);
  border-radius: 3px;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 60px 32px;
}

.home-hero-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.home-hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.home-hero-sub {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 20px;
}

.home-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 28px;
}

.home-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.home-btn-primary {
  padding: 12px 24px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.home-btn-primary:hover { opacity: 0.85; }

.home-btn-secondary {
  padding: 12px 24px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}
.home-btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* Fakta */
.home-facts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-fact {
  padding: 24px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.home-fact:last-child { border-right: none; }

.home-fact-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
}
.home-fact-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Om projektet */
.home-about {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px;
}
.home-about h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.home-about p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

/* Snabblänkar */
.home-links {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 32px;
}
.home-links-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.home-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.home-link-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-link-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.home-link-icon { font-size: 1.4rem; }
.home-link-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.home-link-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 700px) {
  .home-hero-title { font-size: 2rem; }
  .home-hero-sub { font-size: 1.1rem; }
  .home-facts { grid-template-columns: repeat(3, 1fr); }
  .home-fact:nth-child(3) { border-right: none; }
  .home-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .home-hero-content { padding: 40px 20px; }
  .home-facts { grid-template-columns: repeat(2, 1fr); }
  .home-fact:nth-child(2) { border-right: none; }
  .home-links-grid { grid-template-columns: 1fr; }

  /* Sökruta — större och tydligare på mobil */
  #map-search-input {
    height: 44px !important;
    font-size: 1rem !important;
    padding: 0 14px 0 38px !important;
    color: var(--text) !important;
    background: var(--bg2) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 10px !important;
  }
  #map-search-input::placeholder {
    color: var(--text-muted) !important;
    font-size: 0.95rem;
  }
  .search-icon {
    font-size: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }
}



/* Flytta projektfakta upp 20px */
.map-info-btn { bottom: 90px !important; }

/* ═══════════════════════════════════
   LAGERKONTROLL
═══════════════════════════════════ */








/* gmp-place-autocomplete styling */
gmp-place-autocomplete {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg2);
  transition: border-color 0.2s;
}
gmp-place-autocomplete:focus-within {
  border-color: var(--gold);
}
gmp-place-autocomplete::part(input) {
  background: var(--bg2) !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.82rem !important;
  border: none !important;
  outline: none !important;
  padding: 7px 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
gmp-place-autocomplete::part(input)::placeholder {
  color: var(--text-faint) !important;
}
gmp-place-autocomplete::part(search-icon) {
  display: none !important;
}

/* Sökruta */
#map-search-input {
  width: 100%;
  padding: 7px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
#map-search-input::placeholder { color: var(--text-faint); }
#map-search-input:focus { border-color: var(--gold); }

/* Sökresultat InfoWindow */
.gm-style .gm-style-iw-c {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border-radius: 10px !important;
  padding: 12px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}
.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  color: var(--text) !important;
}
.gm-style .gm-style-iw-tc::after {
  background: var(--bg2) !important;
}

/* Sökruta med ikon */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}
#map-search-input {
  padding-left: 32px !important;
}

/* InfoWindow sökresultat */
.gm-style-iw-c {
  background: var(--bg2) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
  padding: 0 !important;
}
.gm-style-iw-d {
  overflow: hidden !important;
}
.gm-style-iw-d * {
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
}
.gm-style-iw-tc::after {
  background: var(--bg2) !important;
}
.gm-style-iw-ch {
  padding-top: 10px !important;
}
button.gm-ui-hover-effect {
  top: 4px !important;
  right: 4px !important;
}

/* Theme toggle i header */
.theme-toggle {
  order: 999;
  margin-left: 4px;
}




@media (max-width: 768px) {
  .legend { display: none !important; }
  .stats-box { display: none !important; }

  /* LAGER - kollapsbar */
  
  
  
  
}


@media (min-width: 769px) {
  
  
}

/* Lager-knapp */
#layer-btn {
  position: absolute;
  top: 80px;
  right: 12px;
  z-index: 500;
}
#layer-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* Lager-dropdown */
.layer-dropdown {
  display: none;
  position: absolute;
  top: 165px;
  right: 12px;
  z-index: 500;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  min-width: 170px;
}
.layer-dropdown.open {
  display: block;
}

/* Inbyggt fällbart innehåll (Förklaring, Projektfakta) */
.collapsible-content {
  display: none;
  margin-top: 10px;
}
.collapsible-content.open {
  display: block;
}
.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}
.layer-item:last-child { margin-bottom: 0; }
.layer-item input[type="checkbox"] {
  accent-color: var(--gold);
  width: 14px; height: 14px;
  cursor: pointer;
}
.layer-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Göm legend och stats på mobil */
@media (max-width: 768px) {
  .legend { display: none !important; }
  .stats-box { display: none !important; }
  #layer-btn { top: 80px; right: 12px; left: auto; }
  .layer-dropdown { top: 165px; right: 12px; left: auto; }
}
