:root {
    --myfontfamily: 'Raleway', sans-serif;
    --normalweight: 300;
    --boldweight: 600;

    --sectionsize: 30pt;
    --titlesize: 20pt;
    --textsize: 14pt;

    --textcolor: #333;
    --alttextcolor: white;
    --mysand: #fad79d;
    --darkblue: #23608c;
    --lightblue: #8dbee2;

    --sectionmargin: 0; /*calc(2 * var(--titlesize));*/
    --formborderwidth: 0.12em;

    --headercontentmargin: 7.5pt;
    --bannerlogo_height: 2 * var(--titlesize);
    --headerheight: calc(var(--bannerlogo_height) + 2 * var(--headercontentmargin));

    --max-text-width: 34em; /* Should be approx. 80 characters */ /* Depends on font size, so does not really work with titles. */
}

body {
    font-family: var(--myfontfamily);
    font-weight: var(--normalweight);
    font-size: var(--textsize);
    color: var(--textcolor);
    margin: 0;
    padding: 0;
    padding-top: var(--headerheight);  /* fixed header */
}

* {
    scroll-margin-top: var(--headerheight);  /* reserve space for header when jumping to id */
}

b {
    font-weight: var(--boldweight);
}

h1 {
    font-size: 35pt;
    max-width: 18em;
}

h2 {
    font-size: var(--sectionsize);
    position: relative;
    max-width: 18em;
}
h3 {
    font-size: var(--titlesize);
}
h4 {
    font-size: var(--textsize);
}
p {
    max-width: var(--max-text-width);
}

a {
    color: var(--textcolor);
    text-decoration: none;
}
a:hover {
    color: black;
}

.unmarked-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.linkwithicon img:last-child {
    display: none; /* TODO Instead of display:none, use visibility:hidden, hoping that browsers prefetch the image? */
}
.linkwithicon:hover img:last-child {
    display: inline-block;
}
.linkwithicon:hover img:first-child {
    display: none;
}

.active {
    color: var(--lightblue);
}

.centered {
    text-align: center;
    /*max-width: var(--max-text-width);*/
    margin-left: auto;
    margin-right: auto;
}

.contactbutton {
    z-index: 2;
}
.contactbutton button, .contactbutton, input[type='submit'] {
    padding: calc(0.3 * var(--textsize)) calc(1 * var(--textsize));
    font-size: var(--textsize);
    font-weight: var(--boldweight);
    color: var(--textcolor);
    background: var(--mysand);

    border: solid;
    border-width: calc(0.5 * var(--formborderwidth));
    border-radius: calc(0.66 * var(--textsize));
    border-color: var(--textcolor);  /* order seems to matter! */
}
.contactbutton:hover button, .contactbutton:hover, input[type='submit']:hover {
    background: white;
    color: var(--textcolor);

    /* redistribute some of the original margin (10 px) from top to bottom to create impression of a button press */
    /*margin-top: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
}

.bannerlogo {
    height: calc(2 * var(--titlesize));
    width: auto;
    margin-right: calc(0.5 * var(--titlesize));
}
.bannertext {
    font-size: var(--titlesize);
    margin: 0;
}
@media (max-width: 350pt) {
  .bannerlogo {
    height: calc(2 * var(--textsize));
    margin-right: calc(0.5 * var(--textsize));
  }

  .bannertext {
    font-size: var(--textsize);
    font-weight: var(--boldweight);
  }

   /* fix header height */
  body {
    padding-top: calc(2 * var(--textsize) + 2 * var(--headercontentmargin));
  }

  * {
    scroll-margin-top: calc(2 * var(--textsize) + 2 * var(--headercontentmargin));
  }
}

.header {
    margin: 0;
    padding: 0;
    width: 100%;
    position: fixed;
    top: 0;
    background: var(--darkblue);
    z-index: 100;
}
.headercontent {
    margin: 0;
    padding: 0 6% 0 6%;
    width: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.headercontent > * {
    margin: var(--headercontentmargin) 0;
}
.headercontent * {
    font-weight: var(--boldweight);
    align-items: center;
    color: var(--alttextcolor);
}
.headercontent a {
    display: flex;
}
.headerright {
    display: flex;
    /*justify-content: right;*/
    gap: 5pt;
}
.headercontent > a:hover,
.headerright > a:hover,
.dropdown > label:hover {
    color: var(--lightblue);
}

.dropdown {
  position: relative;
  display: inline-block;
}
/* hide checkbox */
.dropdown > input[type="checkbox"] {
  display: none;
}
.dropdown > label {
  display: inline-block;
  cursor: pointer;
}
/* arrow */
.dropdown > label:after {
  content: "\f0d7";
  font-family: 'FontAwesome';
  line-height: 0; /* hack to remove seemingly random padding */
  display: inline-block;
  margin-left: 0.3em;
}
/* actual dropdown menu */
.dropdown > ul {
  display: none; /* do not show dropdown by default */
  position: absolute;
  right: 0; /* right-align with header button */
  top: 2em;
  z-index: 999;
  list-style: none;
  background: white;
  width: 5.5em;
  padding: 0.3em 0;
  margin: 0;
  border: none;
  /*border: 0.04em solid var(--lightblue);*/
  border-radius: 0.12em;
  box-shadow: 0 0.12em 0.3em rgba(0,0,0,.15);
}
.dropdown > ul a {
  display: block;
  padding: 0.35em 0.8em;
  color: var(--textcolor); /* TODO not needed, I think, since generally a has textcolor */
}
.dropdown > ul a:hover,
.dropdown > ul a:focus {
  color: var(--alttextcolor);
  background: var(--darkblue);
}
/* show dropdown */
.dropdown > input[type="checkbox"]:checked ~ ul,
.dropdown > ul:target {
  display: block;
}
.dropdown > [type="checkbox"]:checked + label:after,
.dropdown > ul:target ~ a:after {
  content: "\f0d8"; /* up arrow */
}


.pagesegment {  /* element with full-width background color */
    margin: var(--sectionmargin) 0;
    padding: var(--titlesize) 6% var(--titlesize) 6%;  /* 1px padding on top to prevent margin collapse */
}
.left_section_heading::before {
    position: absolute;
    content: "";
    display: block;
    left: 0;
    top: -0.3em;
    width: 3em;
    border-top: 0.08em solid var(--mysand);
}
.centered_section_heading::before {
    position: absolute;
    content: "";
    display: block;
    left: 0;
    right: 0;
    top: -0.3em;
    width: 3em;
    margin-left: auto;
    margin-right: auto;
    border-top: 0.08em solid var(--mysand);
}

.mainimage {
    position: relative;
}
.mainimage img {
  display: block;
  width: 100%;
  height: auto;
}
.mainimage a {
    font-size: calc(0.5 * var(--titlesize));
    color: #505050;
    position: absolute;
    bottom: 4pt;
    right: 8pt;
}

/*.intro {
    display: flex;
    justify-content: space-between;
    gap: 10%;
    flex-wrap: wrap;

    align-items: center;
    margin-top: 0;
    padding-top: 22pt;
    padding-bottom: 45pt;
}*/

.newintro {
    position: relative; /* anchor for absolutely positioned elements */
    /*padding-top: 1px;*/ /* prevent margin collapse */
    /*margin: 0;*/
    padding-bottom: calc(2 * var(--titlesize));
    background-image: url("images/main_image_transparent.png"), linear-gradient(to bottom right, var(--darkblue), var(--lightblue)); /* image opacity 20% */
    background-color: var(--darkblue);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.blob {
    display: inline-grid;
    grid-template-columns: auto;
    grid-template-rows: auto;
    margin: 2em 0;
}
.blob > * {
  grid-column: 1;
  grid-row: 1;
  margin: auto;
}
.blob_background {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
}
.blob_content {
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blob_content > * {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}
.blob_content > p {
    font-weight: var(--boldweight);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.opinions {
    display: flex;
    justify-content: space-between;
    gap: calc(2 * var(--titlesize));
    flex-wrap: wrap;

    /*padding-top: var(--titlesize);*/
}
.opinions > * {
    flex-basis: 46%;
    flex-grow: 1;
    /*flex-shrink: 0;*/
}
.opinions h4 {
    font-style: italic;
    font-weight: var(--normalweight);
}
.quotation_source {
    display: flex;
    align-items: center;
    width: 40vw;
}
.quotation_source > img {
    margin: var(--textsize);
    width: auto;
    height: calc(6 * var(--textsize));
}

.benefits {
    display: flex;
    flex-wrap: wrap;
    max-width: calc(2 * var(--max-text-width));
    justify-content: center; /* needs max-width above, otherwise the children fill the whole line even if the text is narrower */
    column-gap: 2em;
    margin-left: auto;
    margin-right: auto;
}
.benefits > li {
    /*width: 47%;*/
    flex-basis: 47%;
    flex-grow: 1;
    display: flex;
    column-gap: 1em;
    align-items: center;
}
.benefits img {
    width: 5em;
    height: 5em;
}

.module {
    /*position: relative;*/
    flex-basis: 35%;
    flex-grow: 1;
    padding-left: calc(2 * var(--titlesize));
    padding-right: calc(2 * var(--titlesize));
}
.module > img {
    display: block;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

/* TODO radio buttons: padding-left 1em, fill solid, color */
.contactform {
  display: table;

  margin: 0 auto; /* Center the form on the page */

  padding: 1em;
  border: var(--formborderwidth) solid var(--textcolor);
  border-radius: 1em;
}
fieldset {
    border: none;
}
legend {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-weight: var(--boldweight);
    font-size: var(--titlesize);
}
label {
  font-weight: var(--boldweight);
}
input,
textarea {
  /* By default, textareas have a monospace font */
  font-size: var(--textsize);
  font-family: var(--myfontfamily);

  /* Match form border */ /* TODO Match also contact button border thickness. And section divider thickness. */
  border-width: 0 0 var(--formborderwidth) 0;
  border-style: solid;
  border-color: var(--textcolor);

  margin-bottom: 1em;
}
textarea {
  vertical-align: top; /* Align multiline text fields with their labels */
  height: 5em; /* Provide space to type some text */
}
input[type='number'] {
    width: 5.5em;
}
input[type='text'], input[type='email'], input[type='tel'] {
    width: 22em;
    box-sizing: border-box;
    max-width: 72vw;
}
input:focus,
textarea:focus,
input:hover,
textarea:hover {
  outline: none;
  border-color: var(--mysand);
}
/*input[type='radio'] + label:hover {
    background-color: var(--mysand);
}*/

.consulting a {
    font-weight: var(--boldweight);
    text-decoration: underline;
}

.contact a {
    color: var(--alttextcolor);
}
.contact a:hover {
    color: var(--lightblue);
}

.menu {
    display: flex;
    /*justify-content: space-between;*/
    gap: 5%;
    flex-wrap: wrap;
}
.menu > li {
    display: inline-block;
    vertical-align: top;
    padding-top: var(--titlesize);
    padding-right: var(--titlesize);

    /* fix width for vertical alignment on narrow screens */
    flex-basis: 78pt;
    /*flex-shrink: 0;*/
}

