/* Hølandsbataljonen – VW Boble-tema
   Elementer er scopet til .hb-side / .topp / .bunn for å ikke overstyre Tailwind-klasser
   i moduler som nettbutikk, booking osv. */

/* ── Fargepalett (VW / Boble-inspirert) ────────────────────────────────── */
:root {
  /* Primærfarger */
  --blaa:   #003B8E;   /* VW corporate blå */
  --dyp:    #002266;   /* Mørk VW-blå (overskrifter, header) */
  --amber:  #C8991A;   /* VW-emblem gull / amber-aksent */
  --amber2: #E8B420;   /* Lys amber for hover */

  /* Bakgrunner – vintage kremfarge (gammel Boble-lakk) */
  --krem:   #FDF8EE;
  --krem2:  #F3EACF;

  /* Tekst */
  --tekst:  #1A1E2E;
  --dempet: #546080;

  /* Kort og linje */
  --kort:   #FFFFFF;
  --linje:  #D6CAAB;

  /* Lenker */
  --lenke:  #1455B5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --krem:   #111624;
    --krem2:  #182035;
    --tekst:  #DDE4F5;
    --dempet: #8A97BB;
    --kort:   #1C2540;
    --linje:  #2E3B5C;
    --lenke:  #7BAAF7;
    --amber:  #D4AC30;
    --amber2: #E8C850;
  }
  .topp, .bunn { --dyp: #002266; }
  .hb-side .hero h1 { color: #fff; }
}

/* ── Reset og base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.hb {
  margin: 0;
  background: var(--krem);
  color: var(--tekst);
  font: 18px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; color: #000; padding: 8px; z-index: 99; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.smal  { max-width: 760px; }

/* ── Topplinje og meny ──────────────────────────────────────────────────── */
.topp {
  background: var(--dyp);
  position: sticky;
  top: 0;
  z-index: 30;
  /* Subtil stiplet linje i VW-gull under menyen */
  border-bottom: 3px solid var(--amber);
}
.topp-i {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.topp .logo {
  color: #fff;
  text-decoration: none;
  font: 700 1.45rem/1.2 Georgia, "Times New Roman", serif;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .02em;
}
.topp .logo img  { height: 40px; width: auto; }
.topp .logo:hover { color: var(--amber2); }

/* Logo-tekst: to linjer — stor tittel + undertittel */
.topp .logo-tittel  { display: block; }
.topp .logo-sub     { display: block; font: 400 .72rem/1 "Segoe UI", system-ui, sans-serif; opacity: .75; letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }

#meny { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
#meny a {
  color: #cdd8f5;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 20px;   /* pill-form – rund som Boblen */
  font-size: .97rem;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
#meny a:hover,
#meny a[aria-current] { background: rgba(255,255,255,.15); color: #fff; }
#meny a[aria-current]  { box-shadow: inset 0 -2px var(--amber); }

#meny .meny-gruppe { position: relative; }
#meny .undermeny {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  min-width: 210px;
  background: var(--dyp);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 6px;
  display: none;
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
}
#meny .meny-gruppe:hover .undermeny,
#meny .meny-gruppe:focus-within .undermeny { display: block; }
#meny .undermeny a { display: block; border-radius: 10px; }

.meny-knapp {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 20px;
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 720px) {
  .meny-knapp { display: block; }
  #meny { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  #meny.apen { display: flex; }
  #meny .undermeny { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; background: none; }
  #meny .undermeny a { border-radius: 20px; }
}

/* ── Admin-redigeringslinje ─────────────────────────────────────────────── */
.adminlinje { background: #0A1020; color: #b0bedd; font-size: .85rem; padding: 6px 0; }
.adminlinje .wrap { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.adminlinje a,
.adminlinje button {
  color: #cdd8f5;
  background: rgba(255,255,255,.1);
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  text-decoration: none;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.adminlinje a:hover,
.adminlinje button:hover { background: var(--amber); color: #0A1020; }

/* ── Typografi ──────────────────────────────────────────────────────────── */
.hb-side h1,
.hb-side h2,
.hb-side h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; color: var(--dyp); font-weight: 700; }
.hb-side h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .2em 0 .4em; }
.hb-side h2 { font-size: 1.7rem; margin: 1.6em 0 .6em; }
.hb-side h3 { font-size: 1.2rem; margin: .2em 0; }
.hb-side a  { color: var(--lenke); }
.hb-side a:hover { color: var(--amber); }
.hb-side p  { margin: 0 0 1em; }
.hb-side img,
.hb-side video { max-width: 100%; display: block; }
.hb-side .ingress { font-size: 1.25rem; color: var(--dempet); }

/* Focus */
.hb-side a:focus-visible,
.hb-side button:focus-visible,
.hb-side input:focus-visible,
.hb-side textarea:focus-visible,
.topp a:focus-visible,
.topp button:focus-visible { outline: 3px solid var(--amber2); outline-offset: 2px; }

/* ── CMS-innhold (TinyMCE) ─────────────────────────────────────────────── */
.hb-side .innhold > *:first-child { margin-top: 0; }
.hb-side .innhold ul  { list-style: disc; padding-left: 1.4em; margin: 0 0 1em; }
.hb-side .innhold ol  { list-style: decimal; padding-left: 1.4em; margin: 0 0 1em; }
.hb-side .innhold li  { margin: .25em 0; }
.hb-side .innhold img { border-radius: 14px; height: auto; }
.hb-side .innhold blockquote {
  margin: 1em 0;
  padding: .5em 1.4em;
  border-left: 4px solid var(--amber);
  color: var(--dempet);
  font-style: italic;
}
.hb-side .innhold table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.hb-side .innhold th,
.hb-side .innhold td { border: 1px solid var(--linje); padding: 8px 10px; text-align: left; }

/* ── Knapper ────────────────────────────────────────────────────────────── */
.hb-side .knapp {
  display: inline-block;
  background: var(--blaa);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 24px;   /* rund som Boblen */
  padding: 12px 26px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 8px 6px 0;
  transition: background .15s, transform .1s;
}
.hb-side .knapp:hover { background: var(--dyp); color: #fff; transform: translateY(-1px); }
.hb-side .knapp.gull  { background: var(--amber); color: #0A1020; }
.hb-side .knapp.gull:hover { background: var(--amber2); color: #0A1020; }
.hb-side .knapp.lys   { background: rgba(255,255,255,.92); color: var(--dyp); }
.hb-side .knapp.lys:hover { background: #fff; }

/* ── Hero og seksjoner ─────────────────────────────────────────────────── */
.hb-side .hero {
  background: var(--dyp) center/cover;
  color: #fff;
  padding: 110px 0 90px;
  position: relative;
}
/* Subtil kurvet bølge i bunn av hero (Boble-silhuett-hint) */
.hb-side .hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 40px;
  background: var(--krem);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hb-side .hero h1    { color: #fff; font-size: clamp(1.8rem, 7.5vw, 3.8rem); overflow-wrap: break-word; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hb-side .hero .ingress { color: #c8d8f8; max-width: 620px; }
.hb-side .hero .knapp:not(.lys)       { background: var(--amber); color: #0A1020; }
.hb-side .hero .knapp:not(.lys):hover { background: var(--amber2); color: #0A1020; }
.hb-side .band       { background: var(--krem2); padding: 10px 0 40px; margin-top: 40px; }
.hb-side .sidetopp   { padding-top: 40px; }

/* ── Bildekort / galleri ────────────────────────────────────────────────── */
.hb-side .kortrad { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hb-side .kort {
  position: relative;
  border-radius: 18px;   /* ekstra rund */
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  text-decoration: none;
  background: var(--krem2);
  box-shadow: 0 4px 16px rgba(0,35,120,.08);
}
.hb-side .kort img            { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hb-side .kort:hover img      { transform: scale(1.06); }
.hb-side .kort span           { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 16px 14px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,20,80,.75)); }
.hb-side .kort small          { display: block; font-weight: 400; opacity: .85; }
.hb-side .kort .tom           { display: grid; place-items: center; height: 100%; font-size: 3rem; }

/* ── Nyhets- og arrangementskort ────────────────────────────────────────── */
.hb-side .nyhetskort {
  background: var(--kort);
  border: 1px solid var(--linje);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--tekst);
  display: block;
  transition: box-shadow .2s, transform .2s;
}
.hb-side .nyhetskort:hover    { box-shadow: 0 8px 28px rgba(0,35,120,.14); transform: translateY(-2px); }
.hb-side .nyhetskort img      { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hb-side .nyhetskort div      { padding: 16px 20px 20px; }
.hb-side .nyhetskort h3       { margin: .1em 0 .3em; }
.hb-side .nyhetskort small    { color: var(--dempet); }
.hb-side .nyhetskort:hover h3 { color: var(--blaa); }

/* ── Treff-/aktivitetsprogram ───────────────────────────────────────────── */
.hb-side .dager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px auto 50px;
}
.hb-side .dag {
  background: var(--kort);
  border: 1px solid var(--linje);
  border-top: 5px solid var(--blaa);   /* VW blå accentlinje */
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,35,120,.06);
}
.hb-side .tid { color: var(--blaa); font-weight: 700; margin: 0 0 8px; }

/* Kort med bilde øverst (Bilene) */
.hb-side .dag.med-bilde { padding-top: 0; overflow: hidden; }
.hb-side .bil-foto { margin: 0 -24px 14px; }
.hb-side .bil-foto img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; }
.hb-side .bil-foto figcaption { font-size: .7rem; color: var(--dempet); padding: 4px 24px 0; text-align: right; }
.hb-side .bil-foto figcaption a { color: inherit; }

/* ── Medlemskort ────────────────────────────────────────────────────────── */
.hb-side .medlemmer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 60px;
}
.hb-side .medlem {
  background: var(--kort);
  border: 1px solid var(--linje);
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
}
.hb-side .medlem img,
.hb-side .uten-bilde {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;   /* sirkulære bilder – hjulform! */
  margin-bottom: 12px;
}
.hb-side .uten-bilde  { display: grid; place-items: center; background: var(--krem2); font-size: 3rem; }
.hb-side .medlem p    { margin: .3em 0 0; color: var(--dempet); font-size: .95rem; line-height: 1.45; }
.hb-side .rip         { font-weight: 400; font-size: .85rem; color: var(--dempet); }
.hb-side .detaljer    { list-style: none; margin: .6em 0 0; padding: 0; font-size: .9rem; line-height: 1.5; color: var(--dempet); overflow-wrap: anywhere; }

/* ── Kontakt ────────────────────────────────────────────────────────────── */
.hb-side .kontakter { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 20px; }
.hb-side .kontakter article { background: var(--kort); border: 1px solid var(--linje); border-radius: 18px; padding: 18px 22px; }
.hb-side .skjema { display: grid; gap: 16px; margin-bottom: 60px; }
.hb-side .skjema label { display: grid; gap: 6px; font-weight: 600; }
.hb-side .skjema input,
.hb-side .skjema textarea,
.hb-side .skjema select {
  font: inherit;
  padding: 11px 14px;
  border: 1.5px solid var(--linje);
  border-radius: 12px;
  background: var(--kort);
  color: var(--tekst);
  width: 100%;
  transition: border-color .15s;
}
.hb-side .skjema input:focus,
.hb-side .skjema textarea:focus,
.hb-side .skjema select:focus   { border-color: var(--blaa); outline: none; }
.hb-side .skjema .knapp         { justify-self: start; }
.hb-side .skjema .liten,
.hb-side .liten  { font-size: .85rem; color: var(--dempet); margin: 0; }
.hb-side .status { margin: 0; font-weight: 600; }
.hb-side .status.ok   { color: #1a6e3c; }
.hb-side .status.feil { color: #c0392b; }

/* ── Fotoalbum ──────────────────────────────────────────────────────────── */
.hb-side .tilbake { display: inline-block; margin: 0 0 10px; text-decoration: none; }
.hb-side .antall  { font: 400 .9rem system-ui; color: var(--dempet); margin-left: 8px; }
.hb-side .rutenett {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 30px;
}
.hb-side .rutenett a,
.hb-side .rutenett button  { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; padding: 0; border: 0; background: var(--krem2); cursor: zoom-in; }
.hb-side .rutenett img     { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.hb-side .rutenett a:hover img,
.hb-side .rutenett button:hover img { transform: scale(1.08); }
.hb-side .videoer { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 20px; }
.hb-side .videoer video { width: 100%; border-radius: 14px; background: #000; }

/* ── Merke-/bil-kort (tilpasset VW-klubb) ──────────────────────────────── */
.hb-side .bil-kort {
  background: var(--kort);
  border: 1px solid var(--linje);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: var(--tekst);
  display: block;
  transition: box-shadow .2s, transform .2s;
}
.hb-side .bil-kort:hover      { box-shadow: 0 8px 28px rgba(0,35,120,.16); transform: translateY(-2px); }
.hb-side .bil-kort img        { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hb-side .bil-kort-info       { padding: 14px 18px 18px; }
.hb-side .bil-aar             { display: inline-block; background: var(--blaa); color: #fff; border-radius: 20px; font-size: .78rem; font-weight: 700; padding: 2px 10px; margin-bottom: 6px; }

/* Klubbfakta som ikke er fylt inn ennå – synlig markert så de ikke glemmes */
.hb-side .fyll-inn { background: #FFF1B8; color: #5C4500; border: 1px dashed var(--amber); border-radius: 6px; padding: 0 6px; font-style: italic; }

/* ── Paginering og tomme tilstander ─────────────────────────────────────── */
.hb-side .tomt { color: var(--dempet); padding: 30px 0; }

/* ── VW-flagg-banner (dekorativ element, kan brukes i hero) ─────────────── */
.hb-side .vw-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blaa);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1.05rem;
  width: fit-content;
  margin: 20px 0;
}
.hb-side .vw-banner svg { flex-shrink: 0; }

/* ── Bunntekst ──────────────────────────────────────────────────────────── */
.bunn {
  background: var(--dyp);
  color: #c0ccee;
  padding: 36px 0;
  margin-top: 70px;
  font-size: .95rem;
  border-top: 3px solid var(--amber);
}
.bunn .wrap { display: flex; flex-wrap: wrap; gap: 14px 36px; justify-content: space-between; align-items: center; }
.bunn p     { margin: 0; }
.bunn .bunn-adresse { margin-top: 6px; font-size: .88rem; opacity: .8; }
.bunn a     { color: #a8bced; }
.bunn a:hover { color: var(--amber2); }
.bunn ul    { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ── Fremhevet menyvalg (f.eks. «Bli medlem») ───────────────────────────── */
#meny a.meny-cta             { background: var(--amber); color: #0A1020; font-weight: 700; border-radius: 20px; }
#meny a.meny-cta:hover       { background: var(--amber2); color: #0A1020; }

/* ── Tekstbredde i CMS-innhold ──────────────────────────────────────────── */
.hb-side .sidetopp > h1,
.hb-side .sidetopp > .ingress { max-width: 760px; }
.hb-side .innhold > p,
.hb-side .innhold > h2,
.hb-side .innhold > h3,
.hb-side .innhold > ul,
.hb-side .innhold > ol,
.hb-side .innhold > blockquote,
.hb-side .innhold > table { max-width: 760px; }
.hb-side .innhold > p:last-child { margin-bottom: 0; }

/* ── Responsiv finjustering ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hb-side .hero { padding: 70px 0 60px; }
  .hb-side .hero::after { height: 24px; }
  .bunn .wrap { flex-direction: column; align-items: flex-start; }
}
