/* ====== 250912 08:14 – uxcase.css ====== */
/* UX Case: prestanda + tillbaka-knapp */

/* 1) Rendera bara sektioner nära viewporten */
.ux-section {
  content-visibility: auto;
  contain-intrinsic-size: 1000px; /* fallback-höjd för att undvika layout shift */
}

/* 2) "Tillbaka"-pil – alltid synlig */
.back-fab{
  position: fixed;
  bottom: 50px;
  left: max(16px, env(safe-area-inset-left));
  z-index: 1000;

  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .8rem;
  border-radius: 5px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0,0,0,.15);
  color: #685338;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}
.back-fab svg { display:block }
.back-fab:hover { transform: translateY(-1px); }
@media (max-width: 768px){
  .back-fab { /*top: 100px;*/ padding: .5rem .7rem; }
  .back-fab span { display: none; }
}
@media print { .back-fab { display: none; } }

/* 3) H2 i hero-toppen – overlay (tar ingen layout-höjd) */
.section--baseline-top{
  position: absolute;     /* placeras relativt .hero */
  top: 0;
  left: 50%;
  transform: translateX(-50%); /* centrera horisontellt */
  height: 0;              /* tar ingen höjd i flödet */
  z-index: 2;
}

/* H2 vars baslinje ska linjera med hero-toppen */
.h2-baseline {
  margin: 0;
  line-height: 1;
  display: inline-block;
  padding: .5rem .85rem .45rem;  /* valfritt “piller” */
  transform: translateY(calc(-1.6cap)); /* lyft upp optiskt till toppkant */
}

/* Fallback om 1cap saknas (approx.) */
@supports not (height: 1cap) {
  .h2-baseline { transform: translateY(-0.72em); }
}
/* Gäller alla UX case wrappers som innehåller en ensam bild */
.content-wrapper img {
  display: block;
  margin-inline: auto;   /* centrerar horisontellt */
  max-width: 100%;
  height: auto;
}