/* GRANDE LOWLANDS | Shared header and inner-page background | 2026-11-28
   Loaded by all inner pages (index.html has its own design and does not load it).
   Edit THIS file to change the inner-page header everywhere.

   Contents
   1. Header: desktop (wider than 1100px)
   2. Header: tablet and mobile without JavaScript (1100px and narrower)
   3. Sticky header: scrolled state and compact "Menu" header (site-header.js)
   4. Page background and woodland decoration
   5. Frameless photographs */


/* 1. HEADER: DESKTOP ------------------------------------------------------ */
.gl-header {
  box-sizing:border-box;
  position:relative;
  width:100%; max-width:1360px; min-height:90px;
  margin:0 auto;
  padding:18px clamp(18px,2.4vw,34px);
  display:grid;
  grid-template-columns:max-content minmax(0,1fr) max-content;
  align-items:center;
  column-gap:clamp(10px,1.5vw,22px);
  border-bottom:1px solid rgba(167,188,207,.20);
  background:transparent;
  font-family:Georgia,'Times New Roman',serif;
}
.gl-header .gl-brand {
  display:flex; flex:0 0 auto; align-items:center; gap:10px;
  min-width:0; margin:0; padding:0;
  text-decoration:none; color:#e4edf5;
  font:12px/1.3 Georgia,'Times New Roman',serif;
  letter-spacing:.16em; white-space:nowrap;
}
.gl-header .gl-brand img {
  display:none; width:48px; height:42px; max-width:none;
  object-fit:contain; flex-shrink:0;
}
.gl-header .gl-brand-name {font:inherit; letter-spacing:inherit; color:inherit; white-space:nowrap}
.gl-header .gl-nav {
  display:flex; flex-wrap:nowrap; justify-content:flex-end; align-items:center;
  gap:1px; width:100%; min-width:0; margin:0; padding:0;
  font-family:Arial,sans-serif; letter-spacing:0;
}
.gl-header .gl-nav a {
  display:flex; align-items:center; justify-content:center;
  flex:0 0 auto; margin:0; padding:10px clamp(5px,.55vw,9px);
  min-height:42px; text-align:center; text-decoration:none;
  font:10px/1.35 Arial,sans-serif;
  letter-spacing:.09em; white-space:nowrap;
  color:#b8c9d8; background:transparent;
  border:1px solid transparent;
  transition:background .2s, border-color .2s, color .2s;
}
.gl-header .gl-nav a:hover,
.gl-header .gl-nav a:focus-visible,
.gl-header .gl-nav a[aria-current="page"],
.gl-header .gl-nav a[aria-current="location"] {
  color:#eef5fb;
  border-color:rgba(184,207,230,.40);
  background:rgba(173,200,225,.06);
}
.gl-header .gl-langs {
  display:flex; flex:0 0 auto; align-items:center; justify-content:center;
  gap:4px; margin:0; padding:0 0 0 13px;
  border-left:1px solid rgba(184,207,230,.28);
  font:11px/1 Arial,sans-serif; letter-spacing:0;
  color:#738a9f;
}
.gl-header .gl-langs button {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:35px; min-height:36px;
  margin:0; padding:8px 7px;
  border:1px solid transparent; border-radius:0;
  color:#91a7ba; background:transparent;
  font:11px/1 Arial,sans-serif; letter-spacing:0;
  cursor:pointer;
}
.gl-header .gl-langs button[aria-pressed="true"] {
  color:#edf5fc; border-color:rgba(184,207,230,.40);
}
.gl-header .gl-langs button:focus-visible,
.gl-header .gl-brand:focus-visible,
.gl-header .gl-nav a:focus-visible,
.gl-header .gl-menu-toggle:focus-visible {
  outline:2px solid #d7e4f0; outline-offset:2px;
}
.gl-header .gl-menu-toggle {display:none}

/* Small desktop: one-row menu; tighter spacing for the longer Swedish labels. */
@media (1100px < width <= 1200px) {
  .gl-header {
    padding-inline:clamp(14px,calc(14.8vw - 148.8px),28.8px);
    column-gap:clamp(8px,calc(10vw - 102px),18px);
  }
  .gl-header .gl-nav a {padding-inline:clamp(3px,calc(3.6vw - 36.6px),6.6px)}
}
/* Show Guide has a page-specific wrapping rule; keep the shared desktop row. */
@media (width > 1100px) {
  .gl-header.guide-header .gl-nav {flex-wrap:nowrap}
}
@media (prefers-reduced-motion:reduce) {
  .gl-header .gl-nav a {transition:none}
}


/* 2. HEADER: TABLET AND MOBILE WITHOUT JAVASCRIPT --------------------------
   Pages with .gl-sticky get the compact Menu header in section 3 instead.
   These rules apply before site-header.js has run, or on non-sticky headers. */
@media (max-width:1100px) {
  .gl-header {
    min-height:0;
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-rows:auto auto;
    row-gap:9px;
    padding:16px clamp(14px,2.5vw,24px);
  }
  .gl-header .gl-brand {grid-column:1; grid-row:1; justify-self:start}
  .gl-header .gl-langs {grid-column:2; grid-row:1; justify-self:end}
  .gl-header .gl-nav {
    grid-column:1/-1; grid-row:2;
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
    justify-content:stretch; gap:5px;
  }
  .gl-header .gl-nav a {width:100%; padding:9px 3px; white-space:normal; min-height:40px}
}
@media (max-width:900px) {
  .gl-header .gl-nav a {font-size:clamp(8px,2.1vw,10px); letter-spacing:.025em}
  .gl-header .gl-nav a:last-child:nth-child(7) {grid-column:2}
}
@media (max-width:600px) {
  .gl-header {padding:14px 12px; column-gap:8px} /* row-gap stays 9px */
  .gl-header .gl-brand {gap:7px; font-size:10px; letter-spacing:.10em}
  .gl-header .gl-brand img {width:39px; height:34px}
  .gl-header .gl-langs {padding-left:7px; gap:2px}
  .gl-header .gl-langs button {min-width:28px; min-height:32px; padding:7px 4px; font-size:10px}
  /* Six columns, two per link; links 7 and 8 centred on the last row. */
  .gl-header .gl-nav {grid-template-columns:repeat(6,minmax(0,1fr))}
  .gl-header .gl-nav a {line-height:1.3; grid-column:span 2}
  .gl-header .gl-nav a:nth-child(7) {grid-column:2 / span 2}
  .gl-header .gl-nav a:nth-child(8) {grid-column:4 / span 2}
}
@media (max-width:350px) {
  .gl-header {padding:12px 8px}
  .gl-header .gl-brand {font-size:9px; letter-spacing:.065em; gap:5px}
  .gl-header .gl-brand img {width:34px; height:31px}
  .gl-header .gl-langs button {min-width:26px; padding:6px 3px}
}


/* 3. STICKY HEADER ----------------------------------------------------------
   site-header.js adds .menu-ready once the Menu button works and toggles
   .is-scrolled. Horizontal overflow is clipped without creating a scroll
   container, so sticky keeps working on journal and About pages. */
body:has(> .gl-sticky) {overflow-x:clip}
html:has(.gl-sticky) {scroll-padding-top:130px}
.gl-header.gl-sticky {position:sticky; top:0; z-index:100}
.gl-header.gl-sticky.menu-ready {
  --gl-header-surface:#030507 var(--gl-page-gradient) center top / var(--gl-page-background-size) no-repeat;
}
/* Full-width blue-grey band behind the scrolled header. */
.gl-header.gl-sticky.is-scrolled::before {
  content:"";
  position:absolute;
  inset-block:0;
  inset-inline:calc((100% - 100vw) / 2);
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(90deg,#080e14,#0e1720 50%,#080e14);
}
/* Homepage-style controls: white underlined text instead of a frame. */
.gl-header.gl-sticky .gl-nav a:is(:hover, :focus-visible, [aria-current="page"], [aria-current="location"]),
.gl-header.gl-sticky .gl-langs button:is(:hover, :focus-visible, [aria-pressed="true"]) {
  color:#fff;
  border-color:transparent;
  background:transparent;
  text-decoration:underline;
  text-underline-offset:5px;
}
@media (width > 1100px) {
  .gl-header.gl-sticky.is-scrolled {min-height:56px; padding-block:5px}
  .gl-header.gl-sticky.is-scrolled::before {inset-inline:0}
}
/* Compact header: brand, Menu button and language switch on one row;
   the menu opens as a dropdown panel below. */
@media (max-width:1100px) {
  html:has(.gl-sticky.menu-ready) {scroll-padding-top:65px}
  .gl-header.gl-sticky.is-scrolled::before {background:var(--gl-header-surface)}
  .gl-header.gl-sticky.menu-ready {
    min-height:54px;
    grid-template-columns:minmax(0,1fr) auto auto;
    grid-template-rows:auto;
    gap:5px;
    padding:5px 10px;
    background:var(--gl-header-surface);
  }
  .gl-header.gl-sticky.menu-ready .gl-brand {
    grid-column:1; grid-row:1;
    font-size:clamp(9px,2.7vw,12px);
  }
  .gl-header.gl-sticky.menu-ready .gl-langs {
    grid-column:3; grid-row:1;
    gap:2px; margin:0; padding-left:5px;
  }
  .gl-header.gl-sticky.menu-ready .gl-langs button {
    min-width:29px; min-height:39px; padding:5px;
  }
  .gl-header.gl-sticky.menu-ready .gl-menu-toggle {
    display:inline-flex; align-items:center; justify-content:center;
    grid-column:2; grid-row:1;
    min-height:42px; padding:0 8px;
    background:transparent; color:#d4e0eb;
    border:1px solid #526679; border-radius:0;
    font:10px Arial,sans-serif;
    letter-spacing:.08em; text-transform:uppercase;
    cursor:pointer;
  }
  .gl-header.gl-sticky.menu-ready .gl-nav {
    display:none;
    position:absolute;
    inset:100% 0 auto;
    grid-column:auto; grid-row:auto;
    width:auto;
    max-height:calc(100dvh - 60px);
    overflow:auto;
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:10px;
    margin:0;
    background:#0c151f;
    border-bottom:1px solid #526679;
    box-shadow:0 6px 18px #0005;
  }
  .gl-header.gl-sticky.menu-ready .gl-nav a {grid-column:auto; min-height:44px}
  .gl-header.gl-sticky.menu-ready .gl-menu-toggle[aria-expanded="true"] + .gl-nav {display:grid}
}


/* 4. PAGE BACKGROUND AND WOODLAND DECORATION ---------------------------------
   One shared 2200px-high gradient canvas, so the light does not change when
   a page grows (expanding guide sections, filtered results). The images sit
   beside this stylesheet in /Hemsida/assets/. */
html {background:#030507}
body {
  position:relative;
  isolation:isolate;
  min-height:100svh;
  --gl-page-gradient:radial-gradient(ellipse at 50% 7%,#1a2836 0%,#080e15 36%,#030507 90%);
  --gl-page-background-size:100% 2200px;
  background:#030507 var(--gl-page-gradient) center top / var(--gl-page-background-size) no-repeat;
}
/* Woodland strip behind the page title. The resets override the old
   grain overlay that some pages still define on body::before. */
body::before {
  content:"";
  display:block;
  position:absolute;
  inset:110px 0 auto;
  width:100%;
  height:clamp(260px,32vw,470px);
  margin:0;
  padding:0;
  border:0;
  z-index:-1;
  pointer-events:none;
  opacity:.28;
  transform:none;
  filter:none;
  animation:none;
  background:url("gl-skogsremsa-opt.webp") center 65% / cover no-repeat;
  -webkit-mask-image:radial-gradient(ellipse 65% 65% at 50% 50%,#000 35%,transparent 78%);
  mask-image:radial-gradient(ellipse 65% 65% at 50% 50%,#000 35%,transparent 78%);
}
/* Mobile layout: softer central glow, lower and smaller woodland strip. */
@media (max-width:900px) {
  body {--gl-page-gradient:radial-gradient(ellipse at 50% 7%,#121d28 0%,#080e15 36%,#030507 90%)}
  body::before {top:180px; height:310px; opacity:.22}
}
/* Desktop: the woodland strip stays put while the page scrolls. */
@media (min-width:1181px) {
  body::before {position:fixed}
}
/* Wide screens: strip centred under the title, plus fixed woodland along
   both outer edges (four offset views of the same image, no visible seams). */
@media (min-width:1450px) {
  body::before {
    left:50%;
    right:auto;
    width:min(1020px, 58vw);
    transform:translateX(-50%);
  }
  body::after {
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background-image:
      url("gl-skogsremsa-opt.webp"),
      url("gl-skogsremsa-opt.webp"),
      url("gl-skogsremsa-opt.webp"),
      url("gl-skogsremsa-opt.webp");
    background-repeat:no-repeat;
    background-position:left top,left bottom,right top,right bottom;
    background-size:auto 165vh;
    background-blend-mode:screen;
    opacity:.17;
    -webkit-mask-image:linear-gradient(90deg,
      #000 0%,rgba(0,0,0,.88) 8%,transparent 23%,
      transparent 77%,rgba(0,0,0,.88) 92%,#000 100%);
    mask-image:linear-gradient(90deg,
      #000 0%,rgba(0,0,0,.88) 8%,transparent 23%,
      transparent 77%,rgba(0,0,0,.88) 92%,#000 100%);
  }
}


/* 5. FRAMELESS PHOTOGRAPHS ---------------------------------------------------
   Editorial photos without frames, as on Show Highlights. Layout, captions,
   lightbox cards, document frames, video players and controls are unchanged. */
.story-photo,
.gallery figure,
.portrait,
.hero-photo,
.ake-puppy-photo,
.feature-image,
.figure img {
  border:0;
  box-shadow:none;
}
.story-photo,
.gallery figure,
.portrait,
.hero-photo,
.ake-puppy-photo {
  background:transparent;
}
/* First portrait figures: remove the decorative inset around the photo. */
.hero-photo,
.ake-puppy-photo {padding:0}
/* Captions start flush with the photograph. */
.story-photo figcaption,
.gallery figure figcaption {
  padding-left:0;
  padding-right:0;
}
/* Travel reports (.photo-card galleries); document cards keep their frame. */
.photogrid > figure.photo-card:not(.photo-card--document) {
  border:0;
  box-shadow:none;
  background:transparent;
}
.photogrid > figure.photo-card:not(.photo-card--document) > figcaption {
  padding-left:0;
  padding-right:0;
  background:transparent;
}
