:root {
  --font-serif: jubilat, Georgia, serif;
  --font-sans-serif: elza, Verdana, sans-serif;
  --main-color: #EFBFBF;
  --main-color-opacity: #EFBFBFCC;
  --accent-color: #ffed00;
  --orange: #F29B7A;
  --hellgelb: #FECA8C;
  --lila: #A6AACA;
  --celmenubar-height: 29px;
  --outline-width: 2px;
  --outline-width-edge: var(--outline-width);
  --header-height: 87px;
  --footer-height: 195px;
  --content-width: 1200px;
  --content-height: calc(max(560px, 100vh - var(--header-height) - var(--footer-height)));
  --content-margin-width: calc((100vw - var(--content-width)) /2);
  --content-margin-height: 40px;
  --nav-height: var(--content-height);
}

@media (max-width: 1220px) {
  :root {
    --content-margin-width: 20px;
    --outline-width-edge: 0; /* no edge border when it touches the viewport edge */
  }
}

@media(max-width: 1060px) {
  :root {
    --header-height: 75px;
  }
}

@media(max-width: 900px) {
  :root {
    --footer-height: 234px;
  }
}

@media(max-width: 650px) {
  :root {
    --footer-height: 447px;
  }
}

@media (max-width: 375px) {
  :root {
    --content-margin-width: 15px;
  }
}

/*
  navigation should span over footer area in landscape
  needs to be adjusted when min --content-height changes
*/
@media(max-height: 670px) {
  :root {
    --nav-height: calc(100vh - var(--header-height));
    --content-margin-height: 20px;
  }
}

body {
  font-family: var(--font-serif);
  margin: 0;
  overflow-x: hidden;
}

.celementsmenubarvisible {
  margin-top: var(--celmenubar-height) !important;
}

#sitecontainer {
  position: relative;
  min-height: 100vh;
  background-color: var(--main-color);
  background-image:
    /*linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0.5)),*/
    url(/download/KulturpoolLayout/WebHome/logo-kulturpool.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-origin: content-box;
  background-size: auto 110%;
}

/* switch to height auto when aspect ratio is portrait */
@media (max-aspect-ratio: 4/5) {
  #sitecontainer {
    background-size: 140% auto;
  }
}

.celementsmenubarvisible #sitecontainer {
  min-height: calc(100vh - var(--celmenubar-height)) !important;
}

/*******************************
  Fonts
********************************/
#content h1,
body.mceContentBody h1 {
  font-family: var(--font-sans-serif);
  font-size: 44px;
  line-height: 53px;
  font-weight: 600;
  margin-top: 0px;
  margin-bottom: 50px;
}

@media(max-width: 576px) {
  #content h1 {
    font-size: 35px;
    line-height: 42px;
    margin-bottom: 20px;
  }
}

h2,
body.mceContentBody h2 {
  font-family: var(--font-serif);
  font-size: 37px;
  line-height: 47px;
  margin-top: 30px;
  margin-bottom: 5px;
  font-weight: 600;
}

@media(max-width: 576px) {
  h2,
  body.mceContentBody h2 {
    font-size: 30px;
    line-height: 40px;
  }
}

h3,
body.mceContentBody h3 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 40px;
  margin-top: 0px;
  margin-bottom: 5px;
  font-weight: 600;
}

@media(max-width: 576px) {
  h3,
  body.mceContentBody h3 {
    font-size: 25px;
    line-height: 30px;
  }
}

h4,
body.mceContentBody h4 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: bold;
  line-height: 25px;
  margin-top: 0px;
  margin-bottom: 0px;
}

h5,
body.mceContentBody h5 {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 25px;
  font-weight: 500;
  margin-top: 0px;
  margin-bottom: 0px;
}

#content p,
#content li,
body.mceContentBody p,
body.mceContentBody li {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
  margin: 0px;
}

#content p + p,
body.mceContentBody p + p {
  margin-top: 15px;
}

@media(max-width: 576px) {
  #content p,
  #content li {
    font-size: 17px;
    line-height: 19px;
  }
}

#content .cel_pagetype_Magazin p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 22px;
  font-weight: normal;
}

#content .coloredText,
body.mceContentBody .coloredText {
  color: var(--orange);
}

div.cel_docdoesnotexist p {
  font-size: 16px !important;
  line-height: 23px !important;
}

/*******************************
  Links
********************************/
a, a:link, a:visited, a:active, a:hover { 
  color: black;
  text-decoration: none;
}

p a, p a:link, p a:visited, p a:active, p a:hover {  
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

/*******************************
  Header
********************************/
#container #topContainer {
  width: 100%;
  position: relative;
  height: var(--header-height);
  border-bottom: solid var(--outline-width);
  box-sizing: border-box;
}

#header {
  max-width: var(--content-width);
  height: var(--header-height);
  display: flex;
  margin-left: var(--content-margin-width);
  border-right: solid var(--outline-width-edge);
  box-sizing: border-box;
  position: relative;
}

#header .headerItem {
  flex: 0;
  flex-basis: 150px;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  align-items: center;
}

@media(max-width: 768px) {
  #header .headerItem {
    flex-basis: 100px;
  }
}

@media(max-width: 576px) {
  #header .headerItem {
    flex-basis: 75px;
  }
}

@media(max-width: 375px) {
  #header .headerItem {
    flex-basis: 65px;
  }
}

#header .headerItem.left {
  flex: 1;
  justify-content: left;
  padding-left: 0;
}

#header #logoHeader p,
#header #logoHeader h1 {
  margin: 0;
  font-family: var(--font-serif);
}

#header #logoHeader h1 {
  font-size: 37px;
  line-height: 47px;
  text-transform: uppercase;
  letter-spacing: 0.74px;
  font-weight: 600;
}

@media(max-width: 768px) {
  #header #logoHeader h1 {
    font-size: 30px;
    line-height: 40px;
  }
} 

@media(max-width: 576px) {
  #header #logoHeader h1 {
    font-size: 19px;
    line-height: 24px;
  }
} 

#header #highlights {
  flex: 0 0 250px;
}

@media(max-width: 1060px) {
  #header #highlights {
    display: none;
  }
}

#highlights p {
  margin: 0px;
  height: 64px;
}

#highlights img {
  width: auto;
  height: 64px;
}

#header .headerItem:not(.noBorder) {
  border-left: solid var(--outline-width);
}

#header #headerLangs {
  font-size: 26px;
  line-height: 33px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-serif);
}

@media(max-width: 576px) {
  #header #headerLangs {
    font-size: 19px;
    line-height: 24px;
  }
} 

#header .headerItem.menuIcon i {
  cursor: pointer;
  font-size: 42px;
}

@media (max-width: 768px) {
  #header .headerItem.menuIcon i {
    font-size: 36px;
  }
}

@media (max-width: 576px) {
  #header .headerItem.menuIcon i {
    font-size: 24px;
  }
}

/*******************************
  Navigation
********************************/
#navigation {
  position: absolute;
  top: var(--header-height);
  z-index: 99;
  width: 100%;
  height: 0;
  padding-left: var(--content-margin-width);
  padding-right: var(--content-margin-width);
  box-sizing: border-box;
  transition: height 1s ease-out;
}

#navigation.open {
  height: var(--nav-height);
  padding-top: var(--content-margin-height);
  padding-bottom: var(--content-margin-height);
}

.celementsmenubarvisible #navigation.open {
  height: calc(var(--content-height) - var(--celmenubar-height));
}

#navigation > ul {
  height: 100%;
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  overflow: hidden;
}

#navigation ul li a {
  font-size: 43px;
  font-family: var(--font-sans-serif);
  line-height: 52px;
  font-weight: 600;
  letter-spacing: 1px;
}

@media(max-width: 768px) or (max-height: 768px) {
  #navigation ul li a {
    font-size: 35px;
    line-height: 42px;
    letter-spacing: 0px;
  }
}

@media(max-width: 375px) or (max-height: 500px) {
  #navigation ul li a {
    font-size: 28px;
    line-height: 32px;
  }
}

/*******************************
  Content
********************************/
#contentWrapper {
  position: relative;
  display: flex;
  min-height: var(--content-height);
  max-width: var(--content-width);
  padding-left: var(--content-margin-width); /* use padding here that background-color extends */
  padding-right: var(--content-margin-width); /* use padding here that background-color extends */
  transition: opacity 1s 0.5s;
}

.celementsmenubarvisible #contentWrapper {
  min-height: calc(var(--content-height) - var(--celmenubar-height)) !important;
}

#contentWrapper.hidden {
  opacity: 0;
  transition: opacity 0.5s;
}

#contentWrapper > * {
  padding-top: var(--content-margin-height);
  padding-bottom: var(--content-margin-height);
}

#content {
  flex: 1;
}

#content ul li ul {
  list-style: none;
  font-size: 16px;
  line-height: 23px;
}

/*******************************
  Footer
********************************/
#footerBanner {
  box-sizing: border-box;
  border-top: solid var(--outline-width);
  width: 100%;
  height: var(--footer-height);
}

#footer {
  display: flex;
  flex-flow: row;
  max-width: var(--content-width);
  box-sizing: border-box;
  margin: 30px var(--content-margin-width);
  padding-right: 35px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 24px;
  justify-content: space-between;
}

@media(max-width: 650px) {
  #footer {
    flex-direction: column;
    gap: 20px;
  }
}
#footer p {
  margin: 0;
}

#footer .address .rteContent {
  display: flex;
  flex-flow: row;
  gap: 30px;
}

@media(max-width: 900px) {
  #footer .address .rteContent {
    flex-flow: column;
    gap: revert;
  }
  #footer .address .rteContent p+p {
    margin-top: 15px;
  }
}

#footer .sponsoring .rteContent {
  flex-flow: column;
}

#footer .sponsoring .rteContent p+p {
  margin-top: 15px;
}

#footer .sponsoring p,
#footer .sponsoring a {
  font-size: 16px;
}

#footer a {
  color: black;
  font-weight: normal;
  text-decoration: none;
}
#footer a:hover {
  text-decoration: underline;
  font-weight: normal;
}
#footer a:active {
  font-weight: bold;
}
