/* General */
header#header {
  height: 500px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 2%;
  position: relative;
}

header#header.header--home {
  height: 700px;
}

.header-logo {
  height: 175px;
  width: 15%;
  float: left;
}

#header-image {
  height: 100%;
}

header#header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 40px;

  background-repeat: repeat-x;
  background-size: auto 40px;
  pointer-events: none;
}

header#header.border.abteilung::after {
  background-image: url("/assets/images/striche/00_abteilung_strich.png");
}

header#header.border.biber::after {
  background-image: url("/assets/images/striche/01_biber_strich.png");
}

header#header.border.woelfe::after {
  background-image: url("/assets/images/striche/02_wölfe_strich.png");
}

header#header.border.pfadis::after {
  background-image: url("/assets/images/striche/03_pfadis_strich.png");
}

header#header.border.pios::after {
  background-image: url("/assets/images/striche/04_pios_strich.png");
}

header#header.border.rover::after {
  background-image: url("/assets/images/striche/05_rover_strich.png");
}

header#header.border.elternrat::after {
  background-image: url("/assets/images/striche/06_elternrat_strich.png");
}

/* Attention badge */
.attention-badge {
  position: absolute;
  bottom: -50px;
  right: 5%;
  z-index: 15;
  width: clamp(150px, 10vw, 140px);
  height: clamp(150px, 10vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 22px;
  border-radius: 50%;
  background: var(--color-abteilung);
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  text-decoration: none;
  font-family: "SuisseIntl SemiBold";
  font-size: clamp(20px, 1.3vw, 16px);
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  transform: rotate(15deg);
  transition: transform 0.3s ease;
}

.attention-badge:hover {
  transform: rotate(15deg) scale(1.05);
}

@media (max-width: 1100px) {
  .attention-badge {
    width: 90px;
    height: 90px;
    padding: 14px;
    font-size: 12px;
  }
}

/* Navigation */
.navigation {
  width: 80%;
  margin-left: 5%;
  float: left;
}

.navigation ul {
  list-style: none;
  padding: 0;
  overflow: hidden;
  text-align: center;
}

.navigation ul li {
  float: left;
  position: relative;
  color: white;
}

.navigation ul li a {
  display: block;
  color: white;
  text-decoration: none;
  font-size: 30px;
  font-family: "SuisseIntl SemiBold";
  padding-top: 10px;
  padding-left: 0;
  padding-right: 30px;
  text-shadow: 0px 1px 2px black;
}

.navigation ul li a:hover {
  color: var(--color-abteilung);
  transition: color 0.6s;
}

.navigation ul li a::after {
  float: left;
  background: none repeat scroll 0 0 transparent;
  bottom: 0;
  content: "";
  display: block;
  height: 3px;
  position: absolute;
  left: 0;
  background: var(--color-abteilung);
  transition:
    width 0.3s ease 0s,
    left 0.3s ease 0s;
  width: 0;
}

.navigation ul li:not(:has(ul)):hover a::after {
  width: 20%;
  left: 0;
}

.navigation ul li ul {
  display: none;
  padding: 0;
}

.navigation ul li:hover ul {
  display: block;
}

.navigation ul li ul li {
  float: none;
  display: block;
  padding: 0;
  text-align: left;
}

.navigation ul li ul li a {
  font-size: 20px;
  padding-right: 0;
}

.submenu-toggle {
  display: none;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  background: white;
  border-radius: 2px;
  box-shadow: 0px 1px 2px black;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    top 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  top: 12px;
}
.nav-toggle span:nth-child(2) {
  top: 21px;
}
.nav-toggle span:nth-child(3) {
  top: 30px;
}

.nav-toggle.open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* Mobile navigation */
@media (max-width: 1100px) {
  .nav-toggle {
    display: block;
    position: fixed;
    top: 20px;
    right: 5%;
    z-index: 1001;
  }

  .nav-toggle.open span {
    background: black;
    box-shadow: none;
  }

  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    float: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 90px 8% 60px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .navigation.open {
    transform: translateX(0);
  }

  .navigation ul {
    text-align: left;
  }

  .navigation ul li {
    float: none;
    width: 100%;
    color: black;
  }

  .navigation ul li a {
    font-size: 28px;
    padding: 15px 0;
    color: black;
    text-shadow: none;
  }

  .navigation ul li.active > a,
  .navigation ul li ul.sub-menu li.active > a {
    color: var(--color-abteilung);
  }

  .navigation ul li a::after {
    display: none;
  }

  .navigation ul li.has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .navigation ul li.has-children > a {
    flex: 1 1 auto;
  }

  .submenu-toggle {
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
  }

  .submenu-toggle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -60%) rotate(45deg);
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    transition: transform 0.3s ease;
  }

  li.sub-open .submenu-toggle span {
    transform: translate(-50%, -40%) rotate(-135deg);
  }

  .navigation ul li ul.sub-menu {
    display: none;
    position: static;
    width: 100%;
  }

  .navigation ul li.sub-open > ul.sub-menu {
    display: block;
  }

  .navigation ul li ul li {
    width: 100%;
  }

  .navigation ul li ul li a {
    font-size: 22px;
    padding: 10px 0 10px 15px;
  }
}

body.nav-open {
  overflow: hidden;
}

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

  header#header {
    height: 350px;
  }

  header#header.header--home {
    height: 400px;
  }
}
