/*
Theme Name: BNVVOF
Theme URI: https://cursor.com/codebase/gunnar-bergh/py-exe
Author: Bräcke Norra Viltvårdsområdesförening
Description: Hemsida med skog, älg och rådjur, en öppen del och medlemssidor. Styrelsen väljer för varje sida om den är öppen, bara för medlemmar eller dold.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: bnvvof
*/

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --tall: #143027;
  --tall-djup: #0e2219;
  --mossa: #3e6b4f;
  --lav: #e7dcc4;
  --papper: #f6f1e6;
  --blaeck: #1c1914;
  --rad: #9c3d2e;
  --linje: #d9d0bf;
  --skugga: 0 16px 40px rgba(20, 48, 39, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--blaeck);
  background: var(--papper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}
a { color: var(--tall); }
a:hover { color: var(--rad); }
img { max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  padding: 0.4rem 0.8rem;
}
.skip:focus { top: 0.5rem; }

.site-header {
  background: var(--tall-djup);
  color: var(--lav);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0.8rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
}
.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--lav);
  text-decoration: none;
}
.brand img { width: 56px; height: 56px; border-radius: 8px; }
.skogsbard {
  height: 148px;
  background: #0e2219 url("assets/skog-alg-radjur.jpg") center 58% / cover no-repeat;
  border-bottom: 4px solid #d7b56a;
}
.brand strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}
.brand small { display: block; color: #c9c1ae; max-width: 16rem; }
.huvudmeny > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.huvudmeny li { position: relative; }
.huvudmeny ul.sub-menu {
  display: none;
  position: absolute;
  z-index: 5;
  min-width: 14rem;
  margin: 0;
  padding: 0.45rem 0.8rem 0.7rem;
  list-style: none;
  background: var(--tall-djup);
  border-radius: 0 0 10px 10px;
}
.huvudmeny li:hover > ul.sub-menu,
.huvudmeny li:focus-within > ul.sub-menu { display: block; }
.huvudmeny li { margin: 0; }
.huvudmeny a {
  color: #f3ecdc;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.huvudmeny .current-menu-item > a,
.huvudmeny .current_page_item > a,
.huvudmeny a[aria-current="page"] { border-bottom-color: #d7b56a; }
.las {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d7b56a;
}
.konto-lankar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}
.konto-lankar a, .vem { color: var(--lav); text-decoration: none; }
.meny-check, .meny-label { display: none; }

.knapp, button, .textknapp {
  font: inherit;
  cursor: pointer;
}
.knapp, button {
  background: var(--rad);
  color: #fffaf4;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  text-decoration: none;
}
.textknapp {
  background: transparent;
  color: inherit;
  border-radius: 0;
  padding: 0;
  text-decoration: underline;
}
.site-header .textknapp { color: var(--lav); }
.site-header .knapp { background: #d7b56a; color: var(--tall-djup); }

.meddelanden { max-width: 1100px; margin: 1rem auto 0; padding: 0 1.25rem; }
.meddelande { margin: 0 0 0.5rem; padding: 0.7rem 1rem; border-radius: 8px; }
.meddelande.ok { background: #e3efe4; }
.meddelande.error { background: #f8e4df; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 280px;
  background: var(--tall);
  color: #f6f1e6;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--skugga);
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 1.1rem;
  padding: 1.15rem 1.35rem;
  background: rgba(14, 34, 25, 0.55);
  border: 1px solid rgba(215, 181, 106, 0.35);
  border-radius: 16px;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.3rem); color: #f6f1e6; }
.overrad {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #d7b56a;
  margin-bottom: 0.4rem;
}
.landskap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% 38%;
}
.start-rutnat {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  margin-top: 1.75rem;
}
.nyheter { list-style: none; padding: 0; margin: 0; }
.nyheter li {
  padding: 1rem 0;
  border-top: 1px solid var(--linje);
}
.nyheter time { color: #5d564b; font-size: 0.95rem; }
.bricka {
  display: inline-block;
  margin-left: 0.4rem;
  background: var(--tall);
  color: var(--lav);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.75rem;
}
.faktaruta {
  background: white;
  border: 1px solid var(--linje);
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--skugga);
}
.sida, .smal, .smal-bred { max-width: 46rem; }
.smal { max-width: 32rem; }
.prosa > *:first-child { margin-top: 0; }
.prosa a { text-underline-offset: 0.15em; }
.dokument { list-style: none; padding: 0; }
.dokument li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linje);
}
.uppdaterad { color: #5d564b; font-size: 0.95rem; }
.falt { display: grid; gap: 0.8rem; margin: 1rem 0 2rem; }
.falt label, .inlinefalt label { display: grid; gap: 0.25rem; font-weight: 600; }
input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #b7ad9c;
  border-radius: 8px;
  background: white;
  color: var(--blaeck);
}
.kryss { display: flex !important; align-items: center; gap: 0.5rem; font-weight: 400; }
.kryss input { width: auto; }
.hjalp { color: #5d564b; font-size: 0.95rem; }
.admin-huvud, .radknappar, .inlinefalt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.admin-nav { display: flex; gap: 0.8rem; }
.sidlista { list-style: none; padding: 0; }
.sidlista > li {
  background: white;
  border: 1px solid var(--linje);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
}
.meta { color: #5d564b; margin: 0; }
.segment { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.segment button { background: #efe7d8; color: var(--blaeck); }
.segment button[aria-pressed="true"] { background: var(--tall); color: white; }
.inlinefalt { justify-content: flex-start; }
.inlinefalt input { width: 12rem; }
.kort { background: white; border-radius: 14px; padding: 1rem 1.1rem; border: 1px solid var(--linje); }
.fara { margin-top: 2rem; }
.fara button { background: transparent; color: var(--rad); border: 1px solid var(--rad); }
.site-footer {
  background: var(--tall-djup);
  color: #d9d1c2;
  padding: 1.5rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.site-footer p { margin: 0.3rem 0 0; }
.site-footer a { color: #d7b56a; }
.sektionskort {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.sektionskort li {
  background: white;
  border: 1px solid var(--linje);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.sektionskort p { margin: 0.2rem 0 0; color: #5d564b; }
.sektion-panel { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--linje); }
.sokvag { margin: 0.2rem 0 0.8rem; }
.filtrad { list-style: none; padding: 0; margin: 0 0 1rem; }
.filtrad li { padding: 0.45rem 0; border-bottom: 1px solid var(--linje); }
.filrad { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.filrad form { margin: 0; }
.filrad .textknapp { background: none; border: 0; color: var(--rad); cursor: pointer; padding: 0; font: inherit; }
.dokumentvisning { width: 100%; height: 75vh; border: 1px solid var(--linje); background: white; }
.dokumentbild { display: block; max-width: 100%; margin-top: 0.5rem; }
.dokumenttext { white-space: pre-wrap; background: white; border: 1px solid var(--linje); padding: 1rem; }
.flashar h3 { margin-top: 0.35rem; }

@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .meny-label {
    display: inline-block;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    border: 1px solid #d7b56a;
    color: #d7b56a;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
  }
  .huvudmeny, .konto-lankar {
    display: none;
    grid-column: 1 / -1;
  }
  .meny-check:checked ~ .huvudmeny,
  .meny-check:checked ~ .konto-lankar { display: flex; }
  .meny-check:checked ~ .huvudmeny ul { flex-direction: column; }
  .meny-check:checked ~ .huvudmeny ul.sub-menu {
    display: block;
    position: static;
    padding-left: 0.6rem;
  }
  .sektionskort { grid-template-columns: 1fr; }
  .start-rutnat, .site-footer { grid-template-columns: 1fr; }
  .hero { min-height: 320px; align-items: flex-end; }
  .hero-text { margin: 0.75rem; padding: 1rem; }
  .skogsbard { height: 110px; }
}
