/**
 * Page frame, navigation, sidebar, running text
 * One of the stylesheets of the website, loaded in a fixed order by php/include/header.php
 * (list and order: AGENTS.md, "Stylesheets").
 */

/**
 * @section Layout
 */
/* Delicious (css/fonts.css) as in the printed matter of the club; Calibri etc. while it loads or if it fails.
   "LFV Infinity" only holds "∞", which Delicious draws like "½". */
body {
  background-color: var(--color-yellow);
  font-family: "LFV Infinity", Delicious, Calibri, Arial, Helvetica, Sans, sans-serif;
}

#wrapper {
  background-color: #ffffff;
  box-shadow: 0 0 30px var(--color-shadow);
  display: flex;
  flex-wrap: nowrap;
  margin: 0px auto;
  max-width: 1290px;
}

main {
  box-sizing: border-box;
  background: transparent url(/img/contentBg2.png) right top no-repeat;
  flex-grow: 1;
  hyphens: auto;
  line-height: 1.35;
  min-height: 350px;
  min-height: 100vh;
  position: relative;
  width: calc(100% - 300px); /* IE11-Fix */
  order: 2;
  padding: 16px 40px 40px 0px;
}
main > * {
  box-sizing: initial;
}

/* QR code, address and date of a printout: only in print (print.css) */
.print-source {
  display: none;
}

aside {
  display: block;
  order: 1;
  width: 300px;
}

aside > * {
  padding: 12px 20px 16px 20px;
}

aside #logo {
  margin-top: -12px;
  margin-left: -15px;
  outline: none;
}

.oversize {
  box-shadow: 0px 2px 6px var(--color-shadow);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  margin-left: -40px;
  margin-right: -40px;
  margin-bottom: 1.5em;
}

/**
 * @section Navigation & Sidebar
 */
aside nav {
  display: block;
  font-size: 1.1em;
  --nav-indent: 20px;
  --nav-subindent: 0.4em;
  --nav-current-bar-width: 4px;
  --nav-current-bar-padding: 4px;
}

aside nav ul ul {
  margin-left: var(--nav-subindent);
}

#mainNavigation > li > a {
  font-weight: bold;
}

aside nav li {
  padding: 1px 1em 3px var(--nav-indent);
  text-indent: -1em;
}

aside nav ul ul li {
  font-size: 0.9em;
  padding-top: 1px;
  padding-bottom: 1px;
}

aside nav a,
aside nav a:link,
aside nav a:visited {
  color: var(--color-black);
  text-decoration: none;
}

aside nav a:hover,
aside nav a:focus,
aside nav a:active {
  color: var(--color-darkblue);
}

aside nav li.current {
  position: relative;
  z-index: 0;
  margin-left: calc(-1 * (var(--nav-current-bar-width) + var(--nav-current-bar-padding)));
  padding-left: calc(var(--nav-indent) + var(--nav-current-bar-width) + var(--nav-current-bar-padding));
}

aside nav li.current::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-darkblue-transparent-light);
  border-left: var(--nav-current-bar-width) solid var(--color-darkblue);
  border-radius: 4px;
  z-index: -1;
}

aside nav ul ul li.current::before {
  left: calc(-1 * var(--nav-indent) - var(--nav-subindent));
}

aside .teaser {
  position: relative;
  padding-left: 65px;
  padding-right: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}
aside .teaser h3 {
  font-size: 19px;
  font-weight: bold;
  letter-spacing: -0.03em;
  position: absolute;
  top: 33%;
  left: 33px;
  transform: translate(-50%, 0) rotate(-90deg);
}

aside .teaser a {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  transition: var(--transition-default-delay);
  border-radius: var(--border-radius);
  color: var(--color-black);
  padding: 0.5em 0.75em;
}
aside .teaser a:hover,
aside .teaser a:focus,
aside .teaser a:focus-within,
aside .teaser a:active {
  background-color: var(--color-yellow-transparent);
  transition: var(--transition-default);
  text-decoration: none;
}
aside .teaser span {
  display: block;
  max-width: 175px;
  text-overflow: ellipsis;
  overflow: hidden;
}
@media (max-width: 990px) {
  aside .teaser span {
      max-width: 280px;
  }
}
aside .teaser .title {
  font-weight: bold;
}
aside .teaser a:hover .title,
aside .teaser a:focus .title,
aside .teaser a:active .title {
  text-decoration: underline;
}
aside .teaser .details {
  font-size: 0.8em;
}
aside .teaser .intro {
  text-align: left;
  font-size: 0.8em;
}

/* TODO: mobile teaser */

aside .social {
  display: flex;
  font-size: 1.5rem;
  justify-content: space-evenly;
  padding-right: 30%;
}
.social a,
.social a:link,
.social a:visited {
  color: var(--color-black);
  text-decoration: none;
}

.social a:hover,
.social a:focus,
.social a:active {
  color: var(--color-darkblue);
}
.social span:not(.icon) {
  display: none;
}
/* brand icons (Simple Icons) as high as the text, like the former icon font */
.social span.icon {
  width: 1em;
  height: 1em;
}

@media (max-width: 990px) {
  aside .social {
    padding-right: 20px;
  }
}

/**
 * @section Text Content
 */
p {
  margin-top: 0.3em;
  margin-bottom: 0.7em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  clear: both;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
}

h1 {
  font-size: 2em;
  margin-top: 1.5em;
}

h2 {
  font-size: 1.6em;
}

h3 {
  font-size: 1.4em;
}

h4 {
  font-size: 1.2em;
}

h5 {
  clear: none;
  font-size: 1.1em;
  font-weight: bold;
}

h6 {
  clear: none;
  font-weight: bold;
}

/* phones and narrow windows (the sidebar moves below the content) */
@media (max-width: 990px) {
  body {
    background-color: var(--color-white);
  }
  #wrapper {
    flex-wrap: wrap;
    box-shadow: none;
  }
  main {
    flex-basis: 100%;
    width: auto;
    order: 1;
    padding-left: 40px;
  }
  aside {
    flex-basis: 100%;
    order: 2;
    width: auto;
  }
  aside #logo {
    display: block;
    margin: 0 auto;
    text-align: center;
  }
  aside nav,
  aside .teaser {
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    width: auto;
  }
  aside nav {
    --nav-indent: 10px;
  }
  .oversize {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}
