:root{
  --sn-accent:#F3C845;      /* SurfNorge-gul */
  --sn-accent-sea:#7FC6E7;  /* lys havblå, sekundær */
  --sn-ink:#0A0A0A;
  --sn-muted-bg:#F6F7F9;
  --sn-ring:rgba(0,0,0,.08);
}

.spot-header {
    position: relative;
    height: 60vh;
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
	margin-top: 4rem;
}

.spot-header .overlay {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
}

.breadcrumb {
    color: white;	
}

.breadcrumb a {
    color: white;
    text-decoration: underline;
    margin-right: 0.5rem;
}

.spot-header h1 {
	font-family: 'Roboto', sans-serif !important;
	font-weight: 600 !important;
    color: white;
	line-height: 1.15 !important;	
	letter-spacing:0;
	margin: 0.5rem 0;
}

.star-rating {
    color: gold;
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.spot-icons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.spot-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1500px;
    margin: 3rem auto;
    padding: 0 1rem;
	align-items: flex-start; /* ← viktig for sticky */
}

@media (max-width: 900px) {
  .spot-layout {
    flex-direction: column;
  }

  .spot-left,
  .spot-right {
    flex: 1 1 100%;
    padding: 0; /* nullstill ekstra spacing */
  }

  .spot-right {
    margin-top: 2rem; /* gi litt luft etter venstre */
    padding-top: 0;
  }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .spot-left {
    flex: 1 1 45%;
  }
  .spot-right {
    flex: 1 1 50%;
  }
}

.spot-left {
	flex: 1 1 35%;
	position: relative;
}

.spot-right {
  flex: 1 1 60%;
  padding-top: 5rem; /* mer avstand fra topp */
  padding-left: 3rem; /* mer avstand fra topp */
  
}

.spot-right h2 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-top: 2rem; /* luft mellom seksjonene */
  margin-bottom: 0.8rem;
  line-height: 1.3;
  font-family: "Roboto", sans-serif;
  position: relative;
  display: inline-block;
}

.spot-right h2:first-of-type {
  margin-top: 0; /* ikke for mye topp-luft på første */
}

.spot-right p {
  margin-bottom: 1.4rem;
  /*font-size: 1.05rem;*/
  line-height: 1.5;
}

/* --- SPOT INFO --- */
.spot-info {
  background: var(--sn-muted-bg);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* alltid to kolonner på desktop */
  gap: 1.2rem 2rem;
  margin-bottom: 2.5rem;
  font-family: 'Roboto', sans-serif;
  column-gap: 3rem;
}

.spot-info h2 {
  grid-column: 1 / -1;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--sn-ink);
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  padding-bottom: 4px;
  font-family: 'Roboto', sans-serif !important;
}

.spot-info span,
.spot-info p {
  /*font-size: 1.1rem;*/
  line-height: 1.6;
  color: var(--sn-ink);
  display: block;
}

.spot-info strong {
  font-weight: 600;
}

.spot-info span::before {
  margin-right: 0.4rem;
}

@media (max-width: 768px) {
  .spot-info {
    grid-template-columns: 1fr; /* én kolonne på mobil */
    padding: 1.5rem;
  }

  .spot-info h2 {
    font-size: 2.2rem;
  }

  .spot-info span,
  .spot-info p {
    font-size: 2rem;
  }
}

/* Sticky på fylkes-sider */
.spot-left {
  position: relative; /* sikre sticky-kontekst */
}

.spot-info {
  position: sticky;
  top: calc(var(--sn-header-h, 80px) + 40px); /* under header */
  z-index: 30;
}

/* 4. (Valgfritt) slå av sticky på mobil */
@media (max-width: 900px) {
  .spot-layout {
    grid-template-columns: 1fr;
  }
  .spot-info {
    position: static;
  }
}

/* --- SPOT GALLERY --- */
.sn-gallery-wrap,
.spot-map {
  margin-top: 3rem;
}

.sn-gallery-wrap h2,
.spot-map h2 {
  font-size: 2.4rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  margin-bottom: 1rem;
}


/* --- RAD: GALLERI + KART --- */
.spot-gallery-map {
  width: 100%;
  margin-top: 6rem;
  background: #f6f7f9;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.spot-gallery-map-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.spot-gallery-section h2,
.spot-map-section h2 {
  font-size: 2.4rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  margin-bottom: 1rem;
}

/* Responsivt: én kolonne på mobil */
@media (max-width: 900px) {
  .spot-gallery-map-wrap {
    grid-template-columns: 1fr;
  }
}

.spot-map {
  margin-top: 2.5rem;
}

.spot-map h2 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-family: "Roboto", sans-serif;
  position: relative;
}

.spot-map-frame {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px lightgray;
  background: #f6f7f9;
  margin: 2rem 0;
}

.spot-map-frame iframe {
  width: 100%;
  height: 486px;
  border: 0;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);	
}

.sn-main-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
}

.sn-main-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.sn-main-link:hover .sn-main-img {
  transform: scale(1.02);
}

.sn-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.sn-thumb {
  display: block;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.sn-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sn-thumb:hover img {
  transform: scale(1.1);
}

.sn-thumb.is-active {
  outline: 2px solid var(--sn-accent);
}

/* Tving stiler for Fancybox sine neste/forrige-knapper */
.fancybox__container .carousel__button {
  all: unset; /* Nullstill ALL arv og konflikter */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  color: white;
}

.fancybox__container .carousel__button:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.fancybox__container .carousel__button svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Posisjoner */
.fancybox__container .carousel__button.is-prev {
  left: 12px;
}

.fancybox__container .carousel__button.is-next {
  right: 12px;
}

/* ---------- RELATERTE SPOTS ---------- */
.related-bg {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 4rem 0;
}

.related-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding-left: calc(1rem + 2.5rem);
  padding-right: 1rem;
}

/* Samme heading-stil som "Artikler om Hoddevik" */
.related-wrap h2 {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  margin-bottom: 2rem;
}

/* Grid identisk med artikkelgrid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: start;
}

/* Kortene */
.related-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-decoration: none;
  color: #0a0a0a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.related-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.related-card h3 {
  margin: 0.9rem 1rem 0.4rem;
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 600;
}

.related-card p {
  margin: 0 1rem 1rem;
  color: #777;
  font-size: 1rem;
}


/* GRID */
.spot-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: start; /* juster til venstre når det er få */
}

/* KORT */
.spot-card {
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-decoration: none;
  color: #0a0a0a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.spot-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.spot-card h3 {
  margin: 0.9rem 1rem 0.4rem;
  line-height: 1.3;
  font-weight: 600;
  font-size: 1.5rem;
}

.spot-card p {
  margin: 0 1rem 1rem;
  color: #777;
  font-size: 1.05rem;
}

.related-articles-bg {
  background: #f6f7f9;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 4rem 0;
  border-top: 1px solid #eee;
}

.related-articles-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding-left: calc(1rem + 2.5rem);
  padding-right: 1rem;
}

.related-articles-wrap h2 {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  margin-bottom: 2rem;
}

.sn-spotmap-sidebar h2 {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: 'Roboto', sans-serif;
  border-bottom: 3px solid var(--sn-accent);
  display: inline-block;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .sn-spotmap-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .sn-map-search-row {
    order: 1;
  }

  #sn-map-count {
    order: 2;
  }

  #sn-map-results {
    order: 3;
  }

  .sn-map-filters {
    order: 4;
  }
}

/* --- Sticky info-boks --- */
.spot-left {
  flex: 1 1 35%;
  position: relative;
}

.spot-layout,
.spot-left {
  overflow: visible !important;
}


/* --- FYLKE SIDE --- */
.fylke-hero-slider {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.fylke-slide {
  width: 100%;
  height: 70vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.fylke-slide .overlay {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  color: white;
  background: rgba(0,0,0,0.4);
  padding: 1.5rem 2rem;
  border-radius: 8px;
}

.fylke-slide .spot-title {
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.fylke-slide .spot-title:hover {
  text-decoration: underline;
}

.fylke-slide .stars {
  font-size: 1.6rem;
  color: gold;
  margin-top: 0.5rem;
}

.spot-layout,
.spot-left {
  overflow: visible !important;
}

/* --- Sticky infoboks på fylkes-sider --- */
.spot-left {
  align-self: flex-start;
  height: auto;
  min-height: 100%;
}

/* === STICKY STRESS-TEST (midlertidig) === */
.spot-layout {
  display: grid !important;
  grid-template-columns: minmax(280px, 380px) 1fr !important;
  align-items: start !important;
  gap: 2rem !important;
  min-height: 20vh !important; /* garanter scroll */
  transform: none !important;
}

/* Legg til disse for å outline kolonnene */
/*.spot-left { outline: 2px solid #f3c845; }
.spot-right { outline: 2px solid #8bc34a; }*/


/* --- FIX: la sticky virke gjennom temaets wrappers --- */

/* 1) Slå av overflow/transform/contain på main-wrap (temawrapper) */
body > #main-wrap {
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}

/* 2) Hvis Ronneby legger flere wraps, nøytraliser dem også (ufarlig) */
#change_wrap_div,
#main-content,
.content,
.row,
.columns,
.dfd-section,
.dfd-content-wrap,
.wpb_wrapper,
.container {
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}

/* 5) (valgfritt) slå av sticky på mobil */
@media (max-width: 900px) {
  .spot-layout { grid-template-columns: 1fr !important; }
  .spot-info { position: static; }
}

/* Sidebar */
.sn-spotmap-sidebar h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#sn-map-search {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.sn-map-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Feltet ditt har du allerede, men fint å sikre fleks */
#sn-map-search {
  flex: 1 1 auto;
}

/* Overstyr temaets button-styles for kart-søkeknappen */
#sn-map-search-btn {
  all: unset;                 /* nullstill all dritt fra temaet */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  border: none;
  margin-top: -10px !important;
}

#sn-map-search-btn:hover {
  background: #222;
}

#sn-map-search-btn:active {
  background: #000;
  transform: translateY(1px);
}


.sn-map-filters select {
  width: 100%;
  padding: 12px;
  margin-bottom: 0.7rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.sn-map-results {
  list-style: none;
  margin-top: 1rem;
  padding: 0;
}

.sn-map-results li a {
  display: block;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  color: #0a0a0a;
}

/* Popup */
.sn-popup-wrap img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: .5rem;
}

.sn-popup-wrap h4 {
  margin: 0;
  font-size: 1.2rem;
}

.sn-popup-link {
  display: inline-block;
  margin-top: 6px;
  color: #f3c845;
}

.mapboxgl-popup-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.spot-marker {
  width: 16px;
  height: 16px;
  background-color: #f3c845;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
}

.spot-popup img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 6px;
}
.spot-popup h3 {
    margin: 4px 0;
    font-size: 16px;
}
.spot-popup a {
    font-weight: bold;
    text-decoration: underline;
}

.sn-spotmap-section {
  background: #f6f7f9;
  padding: 3rem 4em;
  margin-top: 3rem;
}

.sn-spotmap-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: stretch;
}

/* MOBIL: legg sidebar over kartet */
@media (max-width: 900px) {
  .sn-spotmap-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sn-spotmap-section {
    padding: 2rem 1rem;
  }

  #sn-surfmap {
    height: 480px !important; /* litt lavere på mobil hvis du vil */
  }
}


.sn-map-count {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.5rem;
}
.sn-map-empty {
  color: #777;
  font-style: italic;
  padding: 6px 0;
}


/* Kart */
#sn-surfmap {
  width: 100%;
  height: 720px !important;
  border-radius: 12px;
	position: relative;

}

.mapboxgl-canvas, 
.mapboxgl-map {
  height: 100% !important;
  width: 100% !important;
}

/* Overstyr temat sitt button-styles for Mapbox popup */
.mapboxgl-popup-close-button {
    all: unset !important;
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 24px !important;
    height: 24px !important;
    cursor: pointer !important;
    line-height: 24px !important;
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    color: #333 !important;
    background: rgba(255,255,255,0.9) !important;
    border-radius: 50% !important;
    z-index: 999999 !important;
}

.mapboxgl-ctrl-attrib {
    display: none !important;
}

.sn-map-zoom-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  max-width: 260px;
  z-index: 9999;           /* over både kart og kontroller */
  display: block;          /* i tilfelle noe har satt display:none */
}

.sn-map-zoom-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* Hvis du har en gammel media-query som skjuler hintet på mobil,
   overstyr den eksplisitt her */
@media (max-width: 900px) {
  .sn-map-zoom-hint {
    display: block !important;
  }
}

/* Reset / design for Mapbox-kontroller så de ikke ser ut som SurfNorge-knapper */
.sn-spotmap-section .mapboxgl-ctrl-group button,
.sn-spotmap-section .mapboxgl-ctrl button {
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.15);
  background-color: #ffffff !important;  /* hvit bakgrunn, behold ikonene */
  box-shadow: none;
  text-transform: none;
  font-size: 0;           /* skjul evt. tekst, ikoner er background-image */
  line-height: 1;
}

/* Når knappene er i en gruppe (zoom inn/ut + reset) */
.sn-spotmap-section .mapboxgl-ctrl-group {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  border-radius: 4px;
  overflow: hidden;
}

/* Fullscreen-knappen kan ha en bitte litt avrundet kant */
.sn-spotmap-section .mapboxgl-ctrl-fullscreen button {
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

/* Lite hover-feedback */
.sn-spotmap-section .mapboxgl-ctrl-group button:hover,
.sn-spotmap-section .mapboxgl-ctrl-fullscreen button:hover {
  background-color: #f3f3f3 !important;
}

/* Fjern ramme/box-shadow/understrek fra Mapbox-knapper */
.mapboxgl-ctrl button,
.mapboxgl-ctrl button:focus,
.mapboxgl-ctrl button:hover,
.mapboxgl-ctrl button:active {
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* Noen temaer legger border-bottom direkte – fjern alt */
.mapboxgl-ctrl button {
    border-bottom: 0 !important;
}

/* Fjern ramme rundt kontrollgruppen */
.mapboxgl-ctrl-group {
    box-shadow: none !important;
    border: 1px dashed lightgray;
}

/* REGION-KORT MED THUMBNAIL + ANTALL SPOTS */

.spot-region-grid {
  /* bruker samme grid som spot-card-grid, men ok å ha her hvis du vil tweake senere */
}

.spot-region-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: stretch;
  max-width: 520px; /* kan justeres */
}

.spot-region-thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100%;
  border-right: 1px solid rgba(0,0,0,0.05);
}

/* Fallback hvis ingen bilde – liten “initial” boble */
.spot-region-thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f7f9;
  color: #777;
  font-size: 2rem;
  font-weight: 700;
}

.spot-region-body {
  padding: 0.8rem 1rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spot-region-body h3 {
  margin: 0;
  font-size: 1.4rem;
}

.spot-region-meta {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
  font-weight: 500;
}

.spot-region-meta--empty {
  font-style: italic;
  color: #999;
}

/* Beskrivende tekst */
.spot-region-body p:last-of-type {
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

/* Mobil: legg bilde over teksten */
@media (max-width: 700px) {
  .spot-region-card {
    grid-template-columns: 1fr;
  }

  .spot-region-thumb {
    min-height: 160px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .spot-region-body {
    padding-top: 0.7rem;
  }
}
