/* Header: luft til venstre for logoen. Malen holder headeren minst 1200 px bred, så logoen står 0–40 px
   fra kanten på skjermer mellom 1200 og 1280 px. Nå alltid minst 40 px; fra 1280 px er alt som før. */
div#W-header{--header-width:min(100% - 80px, max(1200px, 80vw)) !important}

/* Footer: kolonnene i samme bredde som headeren (fra 1200 px), ingen tomme avsnitt, Facebook-boksen innenfor kolonnen. */
div#W-footer > footer.w_footer{padding:24px 16px 0 !important}
div#W-footer > footer.w_footer > .w_block{margin:0 !important;padding:12px 0 !important}
div#W-footer .w_footer :is(h2 + p, h2 + p + p, .module-content > div > p:first-child, .module-content > div > p:first-child + p):not(:has(*)){display:none}
div#W-footer .w_footer p:has(> span:only-child:empty), div#W-footer #gtx-trans{display:none}
div#W-footer .w_footer h2{margin-block-end:10px}
div#W-footer .w_footer p{margin-block:0 4px}
div#W-footer .w_footer iframe{display:block;max-width:100%;margin-inline:auto}

/* «Rent idrettslag» (footerrentil.png, 834×272) har mye gjennomsiktig luft rundt teksten: vis bare tekstbåndet. */
div#W-footer .w_logo img[src*="footerrentil"]{width:min(280px,100%) !important;height:auto !important;aspect-ratio:834 / 72;object-fit:cover !important;padding:0 !important}
div#W-footer .w_logo:has(img[src*="footerrentil"]) > a{--dynamic-image-height:auto !important;--dynamic-image-max-height:none !important;height:auto !important}
div#W-footer .w_logo:has(img[src*="footerrentil"]){height:auto !important}

@media (min-width:1200px){
  div#W-footer > footer.w_footer{padding-inline:calc((100% - min(100% - 80px, max(1200px, 80vw))) / 2) !important;display:grid !important;grid-template-columns:minmax(0,.8fr) repeat(3,minmax(0,1fr));column-gap:40px;align-items:start}
  div#W-footer > footer.w_footer > .w_block{width:auto !important;min-width:0}
  div#W-footer > footer.w_footer > small.w_developer{grid-column:1 / -1}
  div#W-footer .w_footer iframe{margin-inline:0}
}

/* Bunnen: Samtykkeinnstillinger lik «WIPS CMS fra Seria», og begge mindre enn resten av footeren. */
.w_footer small.w_developer > :is(a,button){font-size:12px !important}
.w_footer small.w_developer > button.highlighted:not(:hover,:focus-visible)::before{opacity:0 !important}
.w_footer small.w_developer > button.highlighted:is(:hover,:focus-visible)::before{opacity:.2 !important}
.w_footer small.w_developer > button.highlighted > span{color:var(--footer-on-surface-color) !important}
