* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f5f5f5;
}

header {
  background: #4a5233;
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

nav {
  background: #3a4229;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 1rem 1.5rem;
  display: block;
}

nav a:hover,
nav a.active {
  background: #6b7547;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

main h2 {
  margin-top: 0;
  color: #4a5233;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  font: inherit;
}

form button {
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background: #4a5233;
  color: #fff;
  border: none;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}

form button:hover {
  background: #6b7547;
}

@media (max-width: 600px) {
  main {
    margin: 1rem;
    padding: 1.2rem;
  }
}

/* Banner på hovedsiden */
.banner {
  background: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  border-bottom: 4px solid #6b5a3a;
}

.banner img {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto;
}

/* Bilder med bildetekst */
figure {
  margin: 1.5rem 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
}

main h3 {
  color: #4a5233;
  margin-top: 2rem;
}

/* Kontaktliste */
.kontakt-liste {
  width: 100%;
  border-collapse: collapse;
}

.kontakt-liste th,
.kontakt-liste td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #ddd;
}

.kontakt-liste th {
  background: #4a5233;
  color: #fff;
}

.kontakt-liste tbody tr:hover {
  background: #f0f1ea;
}

.kontakt-liste a {
  color: #4a5233;
  font-weight: bold;
}

@media (max-width: 600px) {
  .kontakt-liste th,
  .kontakt-liste td {
    padding: 0.6rem 0.4rem;
    font-size: 0.9rem;
  }
}

/* Forside */
.slagord {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  text-align: center;
  border-top: 3px solid #4a5233;
  border-bottom: 3px solid #4a5233;
  background: #f0f1ea;
  font-family: 'Allerta Stencil', 'Stencil', 'Stencil Std', Impact, sans-serif;
  font-size: 1.8rem;
  font-weight: normal;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3a4229;
}

.galleri {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.galleri figure {
  margin: 0;
}

.galleri img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 600px) {
  .galleri {
    grid-template-columns: 1fr;
  }
}

/* Toppbilde på Om-siden */
.toppbilde {
  margin: 0 0 1.5rem;
}

.toppbilde img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 30%;
}

/* Stående toppbilde på Historie-siden */
.toppbilde-portrett {
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

/* Bunntekst */
.footer-info {
  max-width: 800px;
  margin: 0 auto 1rem;
  padding: 1rem 1.2rem;
  text-align: left;
  border-top: 3px solid #4a5233;
  background: #ebece4;
  color: #3a3a30;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-info p {
  margin: 0.4rem 0 0;
}

.footer-copy {
  text-align: center;
}

@media (max-width: 600px) {
  .footer-info {
    margin: 0 1rem 1rem;
  }
}
