/* #region Fonts */
@font-face {
  font-family: 'Jost';
  src: url('../fonts/Jost/static/Jost/jost.ttf');
}
/* #endregion */

/* #region CSS Reset */
/* Josh's Custom CSS Reset https://www.joshwcomeau.com/css/custom-css-reset/ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}
/* #endregion */

/* #region Transitions and Animations */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fade-in {
    0% {
      opacity: 0;
    }

    100% {
      opacity: 1;
    }
  }

  @keyframes slide-in-bottom {
    from {
      /* transform: translateY(10px);*/
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Scroll transition styles (added with contentperson.js) */
  .scroll-transition-js {
    opacity: 0;
    filter: blur(1px);
    transition: all 0.5s;
  }

  .scroll-transition-js.visible {
    opacity: 1;
    filter: blur(0);
  }
}
/* #endregion */

/* #region Drouven Dietlein General */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Jost', Geneva, Verdana, sans-serif;
  background-color: white;
  animation: fade-in 0.5s;
}

/* Limit paragraph width to 80 characters for readability */
p {
  max-width: 80ch;
}
/* #endregion */

/* #region Header */
.header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  flex: 0 1 auto;
  width: 100%;
  max-width: 2160px;
  margin: 10px auto;
  padding: 0 2em;
}

/* Remove padding from header to align to the main content on large screens */
@media (min-width: 2161px) {
  .header {
    padding: 0;
  }
}
/* #endregion */

/* #region Logo */
.header__logo a {
  color: black;
  text-decoration: none;
  font-family: 'Jost';
  font-size: min(7vw, 32px);
  white-space:nowrap;
}
/* #endregion */

/* #region Navigation */
.header__navbar ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style-type: none;
  padding: 0;
}

.header__navbar ul li {
  float: left;
  padding: 0 16px;
}

.header__navbar ul li a {
  color: black;
  text-decoration: none;
  position: relative;
}
/* #endregion */

/* #region Expanding navbar underline */
.header__navbar ul li a::before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: black;
  transform: scaleX(0);
}

.header__navbar ul li a:hover::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  .header__navbar ul li a::before {
    transition: transform 0.4s ease;
  }
}
/* endregion */

/* Active navbar link and language selection */
.header nav a.active,
.header__lang>*:first-child {
  font-weight: bold;
}

/* #endregion */

/* #region Language selector */
.header__lang {
  display: flex;
  order: 3;
  flex: 0 1 auto;
  padding-left: 2em;
}

.header__lang a {
  color: black;
  text-decoration: none;
}

.header__lang .seperator {
  padding: 0 0.5em;
}

.header__lang .de {
  order: 1;
}

.header__lang .seperator {
  order: 2;
}

.header__lang .en {
  order: 3;
}
/* #endregion */

/* #region Hamburger */
.hamburger__toggle {
  display: none;
}

.hamburger__icon__container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hamburger__icon,
.hamburger__icon::before,
.hamburger__icon::after {
  display: block;
  background-color: black;
  position: absolute;
  height: 4px;
  width: 30px;
  border-radius: 2px;
  content: "";
}

@media (prefers-reduced-motion: no-preference) {
  .hamburger__icon,
  .hamburger__icon::before,
  .hamburger__icon::after {
    transition: all 0.3s;
  }
}

.hamburger__icon::before {
  margin-top: -8px;
}

.hamburger__icon::after {
  margin-top: 8px;
}

.hamburger__toggle:checked + .hamburger__icon__container .hamburger__icon {
  transform: rotate(45deg);
}

.hamburger__toggle:checked + .hamburger__icon__container .hamburger__icon::before,
.hamburger__toggle:checked + .hamburger__icon__container .hamburger__icon::after {
  margin-top: 0;
  transform: rotate(-90deg);
}

.hamburger__menu {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: right;
}

@media (max-width: 1100px) {
  .header {
    height: 3em;
    width: 100%;
  }

  .hamburger__icon__container {
    display: flex;
  }

  .hamburger__menu {
    padding: 1em 2em ;
    margin: 0 -2em;
    background: white;
    width: 100%;
    transform: translateX(-150%);
    z-index: 1;
    flex-direction: column;
    border-style: none none solid none;
  border-width: 1px;
  }
  
  @media (prefers-reduced-motion: no-preference) {
    .hamburger__menu {
      transition: transform 0.3s;
    }
  }

  .hamburger__toggle:checked ~ .hamburger__menu {
    transform: translateX(0);
  }

  .header__navbar ul {
    flex-direction: column;
  }
  
  .header__navbar ul li {
    float: unset;
    padding: 0;
  }
  
  .header__navbar ul li a {
    display: block;
    padding: 1em;
  }

  .header__lang {
    padding: 1em;
    justify-content: end;
  }
}
/* #endregion */

/* #region Common Content and Team */
main {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 2160px;

}

/*  Banner image */
main > img {
  object-fit: cover;
  height: 390px;
}

.content,
.person {
  display: flex;
  flex-direction: column;
  align-self: center;
  width: 100%;
  padding: 2em;
  max-width: 80ch;
  max-width: calc(80ch + 2em);
}

.content {
  padding-top: 0;
  padding-bottom: 2em;
}

.content .richtext>*,
.person .richtext>* {
  max-width: 80ch;
  line-height: 1.5em;
  text-align: justify;
  word-spacing: -1px;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.content h2,
.richtext h2,
.richtext h3,
.richtext h4,
.richtext h5,
.richtext p,
.richtext ul,
.richtext ol,
.richtext hr,
details {
  margin: 1.5em 0em 0em 0em;
}
/* #endregion */

/* #region Error pages */
main.error {
  gap: 2em;
  padding-top: 2em;
}

.error__text {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  text-align: center;
  font-family: 'Jost';
  font-weight: bolder;
  flex: 1;
}
/* #endregion */
