@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("../fonts/lato-v14-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("../fonts/lato-v14-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-weight: 400; font-display: swap; src: url("../fonts/kalam-v9-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-weight: 700; font-display: swap; src: url("../fonts/kalam-v9-latin-700.woff2") format("woff2"); }

/* Colours taken from the computed styles of the old site (templates/freia) */
:root {
  --green: #118e2e;   /* title, links, frames, footer */
  --menu: #255e35;    /* main menu */
  --red: #d0021b;     /* headings, active menu item */
  --text: #333;
  --muted: #626262;
  --light: #eee;
  --white: #fff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 16px/22px "Lato", Verdana, Arial, Tahoma, sans-serif; }
img, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--green); }
a:hover, a:focus { color: var(--red); }
p { margin: 0 0 10px; }
h1, h2, h3, h4, h5 { line-height: 1.1; }
h1 { color: var(--red); font-size: 30px; font-weight: 400; margin: 20px 0 10px; }
h2, h3 { color: var(--red); }
.wrap { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.small { font-size: .875rem; color: var(--muted); }

/* header: logo left, title + menu right, banner image below */
.site-header { display: grid; grid-template-columns: 1fr minmax(0, 1170px) 1fr; }
.header-row { grid-column: 2; grid-row: 1; display: flex; align-items: flex-start; justify-content: space-between; padding: 15px 15px 0; min-height: 153px; }
.logo img { display: block; width: 120px; }
.sitename { font: 700 60px/70px "Kalam", "Lato", sans-serif; letter-spacing: 3px; color: var(--green); text-decoration: none; }
.sitename:hover, .sitename:focus { color: var(--green); }
.navbar { grid-column: 2; grid-row: 1; align-self: end; justify-self: end; padding: 0 15px 6px; }
.nav-current, .nav-toggle { display: none; }
.hero { grid-column: 1 / -1; grid-row: 2; padding: 0 17px; }
.hero img { display: block; width: 100%; object-fit: cover; }

#nav ul { list-style: none; margin: 0; padding: 0; }
#nav .menu { display: flex; gap: 8px 44px; justify-content: flex-end; }
#nav li { position: relative; }
#nav .menu > li > a { display: block; padding: 0 0 6px; color: var(--menu); font-size: 19px; font-weight: 700; line-height: 25px; text-decoration: none; }
#nav .menu > li:has(ul) > a::after { content: ""; display: inline-block; margin-left: 4px; vertical-align: middle; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
#nav .menu > li > a:hover, #nav .menu > li > a:focus, #nav .menu > li.active > a { color: var(--red); }
#nav li ul { display: none; position: absolute; z-index: 10; left: -30px; top: 100%; min-width: 215px; padding: 10px 20px 10px 30px; background: var(--white); border-radius: 0 0 10px 10px; }
#nav li:hover > ul, #nav li:focus-within > ul { display: block; }
#nav li ul a { display: block; padding: 8px 0; color: var(--menu); text-decoration: none; white-space: nowrap; }
#nav li ul a:hover, #nav li ul a:focus, #nav li ul .active > a { color: var(--red); }

main.content { padding-top: 20px; padding-bottom: 20px; }
.cols { display: grid; gap: 30px; margin-top: 20px; }
.cols-2 { grid-template-columns: 1fr 2fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.module { margin-bottom: 20px; }
.module h3 { font-size: 22px; font-weight: 700; margin: 15px 0 10px; padding-bottom: 6px; }
/* home page: each column is a rounded green frame */
.front .cols .col { border: 1px solid var(--green); border-radius: 20px; padding: 10px 20px 15px; overflow: hidden; }
.front .cols .col a { font-size: 18px; line-height: 30px; text-decoration: none; }
.front .cols .col p, .front .cols .col ul { text-align: center; }
.front .cols .col-left .embed { margin: 0 -20px; }
.subpages { list-style: none; padding: 0 2px; font-size: 15px; line-height: 21px; }
.news-item { margin-bottom: 16px; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 20px 0; }
.photo-missing { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--light); color: var(--muted); font-size: 48px; font-weight: 700; }
.person { margin: 0; text-align: center; }
.person img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--light); }
.person figcaption { padding-top: 8px; line-height: 1.4; }
.portrait { max-width: 260px; float: right; margin: 0 0 16px 16px; }
table { max-width: 100%; border-collapse: collapse; }
main table { display: block; overflow-x: auto; }
table.data { font-size: 15px; line-height: 1.35; }
table.data th, table.data td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--light); }
table.data thead th { border-bottom: 2px solid var(--green); white-space: nowrap; }
table.data .num { text-align: center; white-space: nowrap; }
table.data tbody tr:nth-child(even) { background: #f7f7f7; }
table.data td:last-child { min-width: 14em; }  /* phones: scroll sideways instead of a 1-word-wide column */

.embed iframe { width: 100%; border: 0; display: block; }
.map iframe { height: 400px; }
.windfinder iframe { height: 420px; }
.consent { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; min-height: 220px; padding: 16px; background: var(--light); text-align: center; font-size: .9rem; }
.consent button { font: inherit; padding: 10px 20px; border: 0; border-radius: 4px; background: var(--green); color: var(--white); cursor: pointer; }

/* gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 24px; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 95vw; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / .85); }
dialog.lightbox img { display: block; max-width: 95vw; max-height: 85vh; }
dialog.lightbox .lb-bar { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
dialog.lightbox button { font: inherit; padding: 8px 14px; border: 0; background: var(--white); cursor: pointer; }

/* events + weather */
.events ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.front .events ul { text-align: center; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--light); }
.events .date { display: block; font-weight: 700; color: var(--green); }
.wetter .days { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.wetter .day { padding: 8px; text-align: center; }
.wetter .day img { width: 64px; }
.wetter .temp { font-size: 1.3rem; font-weight: 700; color: var(--red); }

/* contact form */
form.contact input:not([type=checkbox]), form.contact textarea { width: 100%; max-width: 560px; padding: 8px; font: inherit; border: 1px solid #b7b7b7; border-radius: 4px; }
form.contact button { font: inherit; padding: 10px 24px; border: 0; border-radius: 4px; background: var(--green); color: var(--white); cursor: pointer; }
form.contact input:not([type=checkbox]) { max-width: 256px; font-size: 14px; }
form.contact textarea { max-width: 768px; }
.req, .consent-label { color: var(--red); }
.contact-head { font-size: 22px; font-weight: 400; margin-top: 30px; }
.thanks { color: var(--green); }
form.contact .hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; background: var(--light); border-left: 4px solid var(--green); }

/* footer: green bar, white bold links */
.site-footer { margin: 30px 0 100px; padding: 10px 15px 5px; background: var(--green); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 75px; font-size: 0; /* hides the " · " separators */ }
.site-footer a { color: var(--white); font-size: 17.6px; font-weight: 700; line-height: 22px; padding-bottom: 3px; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { text-decoration: underline; }

@media (max-width: 991px) {
  .header-row { grid-column: 1 / -1; align-items: center; min-height: 0; padding: 5px; }
  .sitename { font-size: 36px; line-height: 48px; letter-spacing: 2px; text-align: right; max-width: 230px; }
  .hero { grid-row: 2; padding: 5px 5px 0; }
  .hero img { height: auto; aspect-ratio: 1247 / 384; }
  .navbar { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 20px 15px 0; }
  .nav-current { display: block; color: var(--green); font-size: 20px; font-weight: 700; }
  .nav-toggle { display: block; padding: 0 4px; border: 0; background: none; color: var(--green); font-size: 32px; line-height: 1; cursor: pointer; }
  #nav { display: none; flex-basis: 100%; padding-top: 10px; }
  #nav.open { display: block; }
  #nav .menu { display: block; }
  #nav .menu > li > a { padding: 8px 0; }
  #nav li ul { display: block; position: static; min-width: 0; padding: 0 0 0 16px; }
  h1 { font-size: 24px; }
  .people { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .portrait { float: none; margin: 0 0 16px; }
  .site-footer .wrap { justify-content: center; gap: 8px 24px; }
}
