/* Mobilvisning for Klubb 47. Gjelder bare skjermer smalere enn 760 px. */
.m-bar, .m-menu { display: none; }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  #dc-root { overflow-x: hidden; }

  /* Mobilmeny */
  .m-bar { display: flex; position: fixed; top: 12px; right: 12px; z-index: 50; }
  .m-bar button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #ffffff; box-shadow: 0 2px 12px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .m-menu.open { display: flex; position: fixed; inset: 0; z-index: 49; background: #f5f5f2; flex-direction: column; padding: 96px 24px 32px; box-sizing: border-box; font-family: 'Inter Tight', sans-serif; }
  .m-menu a { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: #140c08; text-decoration: none; padding: 12px 0; }
  .m-menu .m-cta { margin-top: auto; background: #1d1d1b; color: #fff; font-size: 17px; text-align: center; border-radius: 999px; padding: 18px; }

  /* Toppfelt: logo blir, søk og meny skjules */
  header { padding: 22px 20px !important; flex-wrap: nowrap !important; }
  header [role="search"], header nav { display: none !important; }

  /* Sideluft */
  [style*="padding: 120px 56px 0"] { padding: 64px 20px 0 !important; }
  [style*="padding: 96px 56px 0"] { padding: 48px 20px 0 !important; }
  [style*="padding: 72px 56px 0"] { padding: 56px 20px 0 !important; }
  [style*="padding: 56px 56px 0"] { padding: 40px 20px 0 !important; }
  [style*="padding: 24px 56px 40px"] { padding: 20px 20px 32px !important; }
  [style*="padding: 0 56px 72px"] { padding: 0 20px 48px !important; }
  [style*="padding: 40px 56px 24px"] { padding: 32px 20px 24px !important; }
  [style*="padding-left: 56px"] { padding-left: 0 !important; }
  [style*="margin: 120px 56px 0"] { margin: 64px 20px 0 !important; }
  [style*="left: 56px"] { left: 20px !important; }
  [style*="right: 56px"] { right: 20px !important; }
  [style*="bottom: 72px"], [style*="bottom: 64px"], [style*="bottom: 56px"] { bottom: 32px !important; }

  /* Rader blir kolonner, unntatt sidescroll */
  [style*="display: flex"][style*="gap: 96px"],
  [style*="display: flex"][style*="gap: 72px"],
  [style*="display: flex"][style*="gap: 64px"],
  [style*="display: flex"][style*="gap: 56px"],
  [style*="display: flex"][style*="gap: 32px"],
  [style*="display: flex"][style*="gap: 24px"]:not([style*="overflow"]),
  [style*="display: flex"][style*="gap: 20px"][style*="align-items: stretch"],
  [style*="display: flex; flex-wrap: wrap; background"] { flex-direction: column !important; align-items: stretch !important; }
  [style*="flex: 0 0 860px"], [style*="flex: 0 0 600px"], [style*="flex: 0 0 520px"], [style*="flex: 0 0 480px"],
  [style*="flex: 0 0 440px"], [style*="flex: 0 0 420px"], [style*="flex: 0 0 380px"], [style*="flex: 0 0 360px"],
  [style*="flex: 0 0 320px"], [style*="flex: 0 0 44%"] { flex: 1 1 auto !important; width: 100% !important; max-width: 100% !important; }
  [style*="width: 860px"] { width: 100% !important; }
  img[style*="height: 600px"], img[style*="height: 620px"] { height: 340px !important; }
  [style*="min-height: 600px"] { min-height: 420px !important; }
  [style*="flex: 1 1 0"] { flex-basis: auto !important; }
  [style*="height: 460px"] { height: auto !important; }
  [style*="height: 460px"] > div:last-child { height: 260px; }
  [style*="padding: 0 80px"] { padding: 40px 24px !important; }
  [style*="padding: 80px 88px"] { padding: 40px 24px !important; flex-direction: column !important; align-items: flex-start !important; gap: 24px !important; }
  [style*="padding: 72px 64px"] { padding: 40px 24px !important; flex-direction: column !important; align-items: flex-start !important; }

  /* Rutenett */
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; }
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-rows: 280px 280px"] { grid-template-columns: 1fr 1fr !important; grid-template-rows: 220px 140px 140px !important; }
  [style*="grid-column: span 2; grid-row: span 2"] { grid-column: span 2 !important; grid-row: span 1 !important; }

  /* Hero fyller skjermen */
  section[style*="height: 640px"], section[style*="height: 780px"] { height: 100svh !important; min-height: 600px; }
  section[style*="background: #d3dfe0"] { min-height: 100svh; display: flex; flex-direction: column; }
  section[style*="background: #d3dfe0"] > div[style*="padding: 24px 56px 64px"] { flex: 1; padding: 8px 20px 32px !important; flex-direction: column-reverse !important; justify-content: center; gap: 24px !important; }
  [style*="flex: 999 1 420px"] { flex: 0 0 auto !important; }
  [style*="max-width: 560px"] img[style*="aspect-ratio: 2 / 3"] { max-height: 48svh; width: auto !important; margin: 0 auto; }
  [style*="flex: 1 1 420px"] { flex: 0 0 auto !important; }

  /* Bannere */
  section[style*="height: 760px"], div[style*="height: 760px"] { height: 80svh !important; }
  [style*="height: 900px"] { height: auto !important; }

  /* Typografi */
  h1 { font-size: 40px !important; line-height: 1.05 !important; white-space: normal !important; }
  h2[style*="font-size: 40px"], p[style*="font-size: 40px"] { font-size: 30px !important; }
  [style*="font-size: 34px"] { font-size: 24px !important; }
  [style*="font-size: 28px"] { font-size: 22px !important; }
  [style*="font-size: 24px"] { font-size: 19px !important; }
  [style*="font-size: 48px"] { font-size: 36px !important; }
  [style*="font-size: 44px"] { font-size: 32px !important; }
  [style*="max-width: 820px"], [style*="max-width: 760px"], [style*="max-width: 720px"] { max-width: 100% !important; }
  [style*="right: 48px"] { right: 24px !important; }
  [style*="left: 48px"] { left: 24px !important; }
  [style*="top: 48px"] { top: 24px !important; }
  [style*="bottom: 48px"] { bottom: 24px !important; }

  /* Footer */
  footer [style*="justify-content: space-between"] { flex-direction: column; gap: 6px; }
}
@media (max-width: 760px) {
  [style*="display: flex"]:has(> [style*="flex: 1 0 128px"]) { flex-direction: row !important; flex-wrap: wrap !important; gap: 12px !important; }
  [style*="flex: 1 0 128px"] { flex: 1 1 40% !important; min-height: 96px !important; }
  [style*="display: flex"]:has(> [style*="flex: 1 1 140px"]) { flex-direction: row !important; flex-wrap: wrap !important; gap: 12px !important; }
  [style*="flex: 1 1 140px"] { flex: 1 1 40% !important; }
  [style*="height: 460px"] { flex-direction: column !important; }
  [style*="min-height: 150px"] { min-height: 96px !important; }
}
@media (max-width: 760px) {
  [style*="grid-template-columns: 1.6fr 1fr 1fr 1fr"] { grid-template-columns: 1fr auto !important; row-gap: 4px; }
  [style*="grid-template-columns: 1.6fr 1fr 1fr 1fr"] > span:nth-child(3) { display: none; }
  [style*="grid-template-columns: 1.6fr 1fr 1fr 1fr"] > span:nth-child(4) { grid-column: 1; }
  [style*="flex: 0 0"] { box-sizing: border-box !important; }
  [style*="position: absolute"][style*="left: 56px"] { right: 20px !important; }
  nav:not(.m-menu) { flex-wrap: nowrap !important; overflow-x: auto; white-space: nowrap; max-width: 100%; gap: 20px !important; scrollbar-width: none; }
  nav:not(.m-menu) button, nav:not(.m-menu) a { flex: none; }
}
@media (max-width: 760px) {
  [style*="position: absolute; right: 56px; bottom: 48px"] { top: 76px !important; bottom: auto !important; right: 12px !important; }
}
@media (max-width: 760px) {
  /* Forside-hero: tekst over, hele Norgeskartet synlig under */
  section[style*="background: #d3dfe0"] > div[style*="padding: 8px 56px 32px"] { flex: 1; padding: 8px 20px 24px !important; flex-direction: column !important; align-items: stretch !important; justify-content: center; gap: 20px !important; }
  [style*="position: relative; width: 100%; max-width: 440px"] { max-width: min(62vw, 36svh) !important; margin: 0 auto; }
}
