/* ============================================
   ISHELLA 2.5 — Nyhetsartikler (delt)
   Forutsetter at ishella-core.css er lastet først.
   --------------------------------------------
   Delt mellom ALLE nyhetssider.
   Brand-vibe: ICE BLUE only — ingen grønn
   (grønn er ikke ISBAT-farge utenfor kunstgress).
   --------------------------------------------
   Komponenter:
   - .nh-hero          — sentrert hero med Ken Burns
   - .nh-hero-content  — sentrert tekstboks i hero
   - .nh-hero-meta     — pills (dato, forfatter, lesetid)
   - .nh-section       — artikkel-seksjon
   - .nh-prose         — readable column for tekst
   - .nh-pull          — pull-quote / highlight
   - .nh-detail-grid   — 2-kolonne kort i flow
   - .nh-detail        — enkelt kort i detail-grid
   - .nh-related-grid  — 4-kolonne related-kort
   ============================================ */

/* ============================================
   GRØNN-OVERRIDES — fjerner ALL grønn på nyheter
   ============================================ */
:root {
  /* Surfaces — bytt fra grønn-tonet til ren mørkblå */
  --is25-bg-deep:     #02141d;
  --is25-bg-base:     #04222d;
  --is25-bg-surface:  #062a37;
  --is25-bg-elevated: #083644;

  /* Text — fjern grønn-tone */
  --is25-text:        #f1f5f9;
  --is25-text-muted:  #b3cfd9;
  --is25-text-dim:    #6e8a92;

  /* Glass — bytt fra grønn-tonet til ice-tonet */
  --is25-glass:        rgba(8, 42, 58, 0.55);
  --is25-glass-strong: rgba(8, 42, 58, 0.78);
  --is25-glass-edge:   rgba(186, 230, 253, .14);

  /* Grønn-tokens aliased til ice */
  --is25-green:        var(--is25-ice);
  --is25-green-bright: var(--is25-ice-bright);
  --is25-green-deep:   var(--is25-ice-deep);
  --is25-green-glow:   var(--is25-ice-glow);
  --is25-grad-mix:     var(--is25-grad-ice);
}

/* Eksplisitte selector-overrides for tilfeller hvor cascade ikke får effekt */
.accent--green {
  background: var(--is25-grad-ice) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  filter: drop-shadow(0 0 24px rgba(125,211,252,.32)) !important;
}
.is25-label--green {
  color: var(--is25-ice-bright) !important;
}
.is25-label--green::before {
  background: var(--is25-ice-bright) !important;
  box-shadow: 0 0 8px rgba(125,211,252,.55) !important;
}
.is25-eyebrow--green {
  background: rgba(56,189,248,.10) !important;
  border-color: rgba(125,211,252,.32) !important;
  color: var(--is25-ice-bright) !important;
}
.is25-eyebrow--green .dot {
  background: var(--is25-ice-bright) !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,.22), 0 0 12px rgba(125,211,252,.55) !important;
}

/* ============================================
   GLOBAL ATMOSPHERE — ren ice, ingen grønn flekk
   ============================================ */
body::before {
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%,  rgba(56,189,248,.26) 0%, transparent 62%),
    radial-gradient(ellipse 60% 50% at 88% 18%, rgba(125,211,252,.22) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 50% 88%, rgba(56,189,248,.16) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 78% 78%, rgba(186,230,253,.12) 0%, transparent 70%),
    linear-gradient(180deg, #02151c 0%, #03222d 60%, #02151c 100%);
}

/* ============================================
   RESET — bryt arv fra gammelt WordPress-tema
   ============================================ */
html, body {
  background: var(--is25-bg-deep) !important;
  margin: 0; padding: 0;
}
body { color: var(--is25-text); }

/* ============================================
   HERO — Ken Burns slider + sentrert tekst
   ============================================ */
.nh-hero.is25-hero {
  padding: clamp(110px, 14vw, 170px) 0 clamp(90px, 12vw, 130px);
  min-height: min(820px, 95dvh);
}
.nh-hero .is25-kenhero-overlay {
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(2,20,29,.92) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 18% 50%, rgba(2,30,42,.62) 0%, transparent 60%),
    radial-gradient(ellipse 60% 65% at 88% 30%, rgba(56,189,248,.32) 0%, transparent 65%),
    linear-gradient(180deg, rgba(2,20,29,.42) 0%, rgba(2,20,29,.78) 100%);
}

.nh-hero-content {
  position: relative; z-index: 2;
  max-width: 880px; margin: 0 auto;
  text-align: center;
}
.nh-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 900; letter-spacing: -.035em;
  line-height: 1.05;
  margin: 28px 0 22px; color: #fff;
  text-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.nh-hero h1 .accent {
  background: linear-gradient(135deg, var(--is25-ice-pale) 0%, var(--is25-ice-bright) 50%, var(--is25-ice) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 32px rgba(125,211,252,.55));
}
.nh-hero-lede {
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 680px;
  color: rgba(229,242,251,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.nh-hero-meta {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 24px;
}
.nh-hero-meta .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(8,30,42,.62);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(125,211,252,.22);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; color: var(--is25-text-muted);
}
.nh-hero-meta .pill i { color: var(--is25-ice-bright); font-size: .82rem; }

.nh-hero .is25-btns { justify-content: center; margin-top: 36px; }

/* ============================================
   ARTICLE BODY
   ============================================ */
.nh-section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.nh-section--alt { background: linear-gradient(180deg, #061a23 0%, #082530 100%); }

.nh-prose {
  max-width: 760px; margin: 0 auto;
  color: var(--is25-text-muted);
  font-size: 1.06rem; line-height: 1.75;
}
.nh-prose > p { margin-bottom: 22px; }
.nh-prose > p strong { color: var(--is25-text); font-weight: 700; }
.nh-prose a { color: var(--is25-ice-bright); border-bottom: 1px solid rgba(125,211,252,.32); transition: border-color .2s; }
.nh-prose a:hover { border-color: var(--is25-ice-bright); }
.nh-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800; letter-spacing: -.02em;
  color: var(--is25-text);
  margin: 48px 0 18px;
  text-wrap: balance;
}
.nh-prose h2 .accent {
  background: var(--is25-grad-ice);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(125,211,252,.32));
}
.nh-prose h3 {
  font-family: var(--font-display);
  font-size: 1.24rem; font-weight: 700;
  color: var(--is25-text);
  margin: 36px 0 12px;
}
.nh-prose ul, .nh-prose ol {
  margin: 0 0 22px 22px;
  color: var(--is25-text-muted);
}
.nh-prose li { margin-bottom: 8px; }

/* Pull-quote / highlight box */
.nh-pull {
  position: relative;
  margin: 36px 0;
  padding: 26px 28px;
  background: var(--is25-glass);
  backdrop-filter: var(--is25-blur);
  border: 1px solid var(--is25-glass-edge);
  border-left: 3px solid var(--is25-ice-bright);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display);
  font-size: 1.16rem; font-weight: 600; line-height: 1.5;
  color: var(--is25-text);
  text-wrap: balance;
}
.nh-pull::before {
  content: "\201C";
  position: absolute; top: -16px; left: 16px;
  font-family: var(--font-display);
  font-size: 4rem; font-weight: 900; line-height: 1;
  color: var(--is25-ice-bright);
  opacity: .42;
}

/* Inline-bilde i flow */
.nh-prose figure {
  margin: 32px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--is25-shadow-md), 0 0 32px rgba(56,189,248,.10);
  border: 1px solid var(--is25-glass-edge);
}
.nh-prose figure img {
  display: block; width: 100%; height: auto;
}
.nh-prose figcaption {
  padding: 14px 22px;
  background: var(--is25-glass-strong);
  font-family: var(--font-mono);
  font-size: .76rem; font-weight: 600;
  letter-spacing: .08em;
  color: var(--is25-text-muted);
  text-align: center;
}

/* Detail-kort i artikkelflyt */
.nh-detail-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(2, 1fr);
  margin: 36px 0;
}
@media (max-width: 760px) { .nh-detail-grid { grid-template-columns: 1fr; } }

.nh-detail {
  position: relative;
  padding: 28px 28px;
  background: var(--is25-glass);
  backdrop-filter: var(--is25-blur);
  border: 1px solid var(--is25-glass-edge);
  border-radius: var(--r-lg);
  transition: border-color .3s, box-shadow .35s, transform .35s var(--ease-spring);
}
.nh-detail:hover {
  transform: translateY(-3px);
  border-color: rgba(125,211,252,.42);
  box-shadow: var(--is25-shadow-md), 0 0 32px rgba(56,189,248,.18);
}
.nh-detail-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(125,211,252,.32) 0%, rgba(56,189,248,.16) 100%);
  border: 1px solid rgba(125,211,252,.32);
  color: var(--is25-ice-bright);
  font-size: 1rem;
  box-shadow: 0 0 14px rgba(56,189,248,.18) inset;
}
.nh-detail h3 {
  font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 700;
  color: var(--is25-text); margin-bottom: 10px;
}
.nh-detail p {
  color: var(--is25-text-muted);
  font-size: .96rem; line-height: 1.6;
}

/* ============================================
   RELATED — 4 ice-kort til andre seksjoner
   ============================================ */
.nh-related-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .nh-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .nh-related-grid { grid-template-columns: 1fr; } }

/* CTA — overstyrer ikke noe (bruker core ice-default) */

/* ============================================
   NH-GALLERY — bildegalleri i artikkel-flyt
   Klikkbare thumbnails → lightbox via JS.
   ============================================ */
.nh-gallery-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .nh-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .nh-gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.nh-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--is25-glass-edge);
  background: var(--is25-bg-base);
  cursor: zoom-in;
  transition: transform .35s var(--ease-spring), border-color .25s, box-shadow .35s;
}
.nh-gallery-item:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(125,211,252,.42);
  box-shadow: var(--is25-shadow-md), 0 0 32px rgba(56,189,248,.18);
  z-index: 2;
}
.nh-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .9s var(--ease), filter .25s;
  filter: saturate(1.05);
}
.nh-gallery-item:hover img {
  transform: scale(1.08);
  filter: saturate(1.15);
}
.nh-gallery-item::after {
  content: "\f00e";  /* fa-magnifying-glass-plus */
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.6);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(8,30,42,.85);
  color: var(--is25-ice-bright);
  border-radius: 50%;
  font-size: 1.04rem;
  opacity: 0;
  transition: opacity .25s, transform .35s var(--ease-spring);
  pointer-events: none;
}
.nh-gallery-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.nh-gallery-count {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--is25-text-dim);
  margin-bottom: 18px;
}

/* "Last flere"-paginering — vis 8 først (4×2 perfekt grid), klikk for resten */
.nh-gallery-grid:not(.is-expanded) > .nh-gallery-item:nth-child(n+9) {
  display: none;
}

.nh-gallery-more-wrap {
  display: flex; justify-content: center;
  margin-top: clamp(28px, 4vw, 40px);
}
.nh-gallery-more {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  background: var(--is25-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(125,211,252,.32);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .94rem; font-weight: 700;
  color: var(--is25-ice-bright);
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .25s var(--ease-spring), box-shadow .35s;
}
.nh-gallery-more:hover {
  background: rgba(56,189,248,.10);
  border-color: var(--is25-ice-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,189,248,.22), 0 0 32px rgba(56,189,248,.18);
}
.nh-gallery-more i {
  font-size: .82rem;
  transition: transform .35s var(--ease-spring);
}
.nh-gallery-more.is-expanded i {
  transform: rotate(180deg);
}
.nh-gallery-more .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; padding: 2px 10px;
  background: var(--is25-ice-bright);
  color: #042530;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .76rem; font-weight: 700;
}

/* ============================================
   ANDRE NYHETER — preview av arkivet på artikkel
   Auto-injectet av JS når nyheter-data.js er lastet.
   Bruker .nh-card-styling fra arkiv-grid.
   ============================================ */
.nh-archive-preview {
  display: grid; gap: 22px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1000px) { .nh-archive-preview { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .nh-archive-preview { grid-template-columns: 1fr; } }

.nh-archive-cta-wrap {
  display: flex; justify-content: center;
  margin-top: clamp(28px, 4vw, 40px);
}

/* ============================================
   LIGHTBOX — fullscreen bildevisning
   ============================================ */
.nh-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 14, 21, .94);
  backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.nh-lightbox.is-open {
  opacity: 1; visibility: visible;
  transition: opacity .3s var(--ease), visibility 0s;
}
.nh-lightbox-img {
  max-width: 92vw; max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  transform: scale(.92);
  transition: transform .35s var(--ease-spring);
}
.nh-lightbox.is-open .nh-lightbox-img { transform: scale(1); }

.nh-lightbox-close,
.nh-lightbox-prev,
.nh-lightbox-next {
  position: absolute;
  display: grid; place-items: center;
  background: rgba(8, 30, 42, .82);
  border: 1px solid rgba(125,211,252,.32);
  color: var(--is25-ice-bright);
  cursor: pointer;
  border-radius: 50%;
  transition: background .25s, border-color .25s, transform .25s var(--ease-spring);
}
.nh-lightbox-close:hover,
.nh-lightbox-prev:hover,
.nh-lightbox-next:hover {
  background: var(--is25-ice-bright);
  color: #042530;
  transform: scale(1.08);
}
.nh-lightbox-close {
  top: 24px; right: 24px;
  width: 48px; height: 48px;
  font-size: 1.2rem;
}
.nh-lightbox-prev,
.nh-lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 1.4rem;
}
.nh-lightbox-prev:hover,
.nh-lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
}
.nh-lightbox-prev { left: 24px; }
.nh-lightbox-next { right: 24px; }

.nh-lightbox-caption {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  background: rgba(8, 30, 42, .82);
  border: 1px solid rgba(125,211,252,.22);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .12em;
  color: var(--is25-text-muted);
}

@media (max-width: 700px) {
  .nh-lightbox-prev,
  .nh-lightbox-next {
    width: 44px; height: 44px;
    font-size: 1.1rem;
  }
  .nh-lightbox-prev { left: 12px; }
  .nh-lightbox-next { right: 12px; }
  .nh-lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; }
}

/* ============================================
   ARKIV — tabs + gallery for /nyheter/index
   ============================================ */
.nh-tabs {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.nh-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--is25-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--is25-glass-edge);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 600;
  color: var(--is25-text-muted);
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease-spring);
}
.nh-tab:hover {
  background: rgba(56,189,248,.08);
  color: var(--is25-ice-bright);
  transform: translateY(-2px);
}
.nh-tab .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; padding: 2px 8px;
  background: rgba(186,230,253,.10);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 700;
  color: var(--is25-text-dim);
}
.nh-tab.is-active {
  background: var(--is25-ice-soft);
  border-color: rgba(125,211,252,.42);
  color: var(--is25-ice-bright);
  box-shadow: 0 0 24px rgba(56,189,248,.22);
}
.nh-tab.is-active .count {
  background: var(--is25-ice-bright);
  color: #042530;
}

/* Gallery — grid med nyhets-kort */
.nh-gallery {
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) { .nh-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .nh-gallery { grid-template-columns: 1fr; } }

.nh-card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  background: var(--is25-glass);
  backdrop-filter: var(--is25-blur);
  border: 1px solid var(--is25-glass-edge);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .4s var(--ease-spring),
              border-color .3s var(--ease),
              box-shadow .4s var(--ease);
  opacity: 0; transform: translateY(20px);
  animation: nhCardIn .6s var(--ease-expo) forwards;
}
@keyframes nhCardIn { to { opacity: 1; transform: none; } }

.nh-card.is-hidden {
  display: none;
}
.nh-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125,211,252,.42);
  box-shadow: var(--is25-shadow-lg), 0 0 60px rgba(56,189,248,.18);
}
.nh-card:hover .nh-card-img img {
  transform: scale(1.06);
}

.nh-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--is25-bg-base);
}
.nh-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .9s var(--ease);
}
.nh-card-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2,20,29,.6) 100%);
  pointer-events: none;
}
.nh-card-cat {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(8,30,42,.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125,211,252,.32);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--is25-ice-bright);
  z-index: 2;
}

.nh-card-body {
  padding: 22px 24px 24px;
  display: flex; flex-direction: column;
  flex-grow: 1;
}
.nh-card-date {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .08em;
  color: var(--is25-text-dim);
  margin-bottom: 10px;
}
.nh-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 700; line-height: 1.35;
  color: var(--is25-text);
  margin-bottom: 14px;
  text-wrap: balance;
}
.nh-card-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 700; font-size: .88rem;
  color: var(--is25-ice-bright);
  transition: gap .25s var(--ease);
}
.nh-card:hover .nh-card-arrow { gap: 12px; }

/* Tom state */
.nh-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--is25-text-dim);
  font-family: var(--font-mono);
  font-size: .92rem;
}
