* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f2;
  color: #111;
}

html.home-document {
  background: #111 url("../images/startbild.jpg") center / cover no-repeat;
}

body.home-page {
  background: transparent;
}

.locked {
  overflow: hidden;
}

#intro {
  position: relative;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: #111;
}

.hero {
  position: absolute;
  inset: 0;
  background: url("../images/startbild.jpg") center/cover no-repeat;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .12), rgba(0, 0, 0, .03) 42%, rgba(0, 0, 0, .36) 100%);
}

.brand {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
}

.brand em {
  font-style: normal;
  color: #e1261c;
}

.hero-actions {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 12px;
  width: min(100% - 36px, 520px);
}

.hero-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 4px;
  background: rgba(255, 255, 255, .64);
  color: #111;
  font-size: 12px;
  letter-spacing: .04em;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color .2s ease, border-color .2s ease;
  padding: 13px 30px;
  font-size: 11px;
  max-width: fit-content;
  border-color: unset;
}

.hero-button:hover, .hero-button:focus-visible {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(255, 255, 255, .9);
}

@media (max-width:480px) {
  .hero-actions {
    gap: 8px;
    width: calc(100% - 28px);
  }

  .hero-button {
    font-size: 11px;
  }
}

#learn {
  min-height: 100dvh;
  max-width: 760px;
  margin: auto;
  padding: calc(var(--header-height) + 48px) 24px 120px;
}

#learn > header {
  padding: 0 4px 34px;
}

.page-title {
  font-size: clamp(38px, 10vw, 54px);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -.035em;
  font-weight: 800;
}

#learn > header > p:last-child {
  color: #777;
  margin: 0;
  font-size: 17px;
}

.classes {
  display: grid;
  gap: 13px;
}

.classes article {
  background: #fff;
  border: 1px solid #dededb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 7px 24px rgba(0, 0, 0, .045);
}

.content {
  display: grid;
  gap: 8px;
  padding: 20px 12px 12px;
}

.content .resource-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: #f5f5f3;
  border-radius: 7px;
  text-decoration: none;
  color: #111;
}

.content i {
  font-style: normal;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.content span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.content strong {
  font-size: 14px;
}

.content small {
  color: #777;
  font-size: 12px;
}

.video-title {
  margin: 4px 4px 2px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 750;
  overflow-wrap: break-word;
}

.video-player + a {
  margin-bottom: 28px;
}

.video-player {
  aspect-ratio: 16/9;
  background: #111;
  border-radius: 7px;
  overflow: hidden;
}

.video-start {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 18px;
  background: linear-gradient(135deg, #252525, #111);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font: inherit;
  cursor: pointer;
}

.video-start:hover {
  background: #292929;
}

.video-start:focus-visible {
  outline: 3px solid #e1261c;
  outline-offset: -4px;
}

.video-start .video-play {
  display: grid;
  place-items: center;
  width: 56px;
  height: 40px;
  border-radius: 10px;
  background: #e1261c;
  font-size: 22px;
}

.video-start .video-hint {
  font-size: 13px;
  color: #eee;
}

.video-start .video-privacy {
  display: block;
  max-width: 320px;
  font-size: 11px;
  line-height: 1.4;
  color: #bbb;
}

.video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width:480px) {
  #learn {
    padding: calc(var(--header-height) + 32px) 18px 40px;
  }

  #learn > header {
    padding-bottom: 28px;
  }

  .classes {
    gap: 12px;
  }
}

body:not(.locked) {
  overflow-y: auto !important;
  overflow-x: hidden;
  height: auto !important;
  min-height: 100dvh;
}

#learn {
  overflow: visible;
  padding-bottom: 120px;
}

[hidden] {
  display: none !important;
}

.category-nav, .resource-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.category-nav a, .resource-nav a {
  padding: 11px 15px;
  border: 1px solid #dededb;
  border-radius: 7px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  background: #fff;
}

.category-nav a[aria-current="page"] {
  background: #111;
  color: #fff;
  border-color: #111;
}

.resource-nav a[aria-current="page"] {
  background: #c83b30;
  color: #fff;
  border-color: #c83b30;
}

.category-nav a:hover, .resource-nav a:hover {
  border-color: #c83b30;
}

.overview {
  display: grid;
  gap: 14px;
}

.overview a {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: #fff;
  border: 1px solid #dededb;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
}

.overview a:hover {
  border-color: #c83b30;
}

.overview small {
  font-size: 11px;
  color: #c83b30;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-weight: 700;
}

.overview strong {
  font-size: 26px;
}

.overview span {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid #c83b30;
  outline-offset: 3px;
}

@media (max-width:480px) {
  .category-nav {
    gap: 6px;
  }

  .category-nav a {
    padding: 10px 12px;
  }

  .content {
    padding-top: 16px;
  }
}

.section-title {
  margin: 16px 4px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: #c83b30;
}

.resource-section {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.resource-section > .section-title:first-child {
  margin-top: 4px;
}

.back-link {
  position: relative;
  display: inline-block;
  margin-top: 28px;
  color: #111;
  text-decoration: none;
}

.back-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s ease;
}

.back-link:hover::after, .back-link:focus-visible::after {
  transform: scaleX(1);
}

.back-link-top {
  margin: 0 0 28px;
}

@media (prefers-reduced-motion:reduce) {
  .back-link::after {
    transition: none;
  }
}

/* Shared fixed header on every HTML page. */

:root {
  --header-height: 88px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(15, 17, 20, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}

.site-header .site-brand {
  display: block;
  flex-shrink: 0;
  margin: 0;
  color: #e1261c;
  text-decoration: none;
  line-height: 1.5;
}

.site-header .brand-name {
  color: #9d251f;
}

.site-header .site-brand em {
  color: #fff;
}

.site-header .brand-name {
  text-shadow: none;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-navigation a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.site-navigation a:hover, .site-navigation a:focus-visible {
  background: rgba(255, 255, 255, .15);
}

@media (max-width:700px) {
  :root {
    --header-height: 124px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
  }

  .site-navigation {
    flex-wrap: wrap;
  }
}

@media (max-width:700px) {
  :root {
    --header-height: 124px;
  }

  .site-header {
    padding: 12px 16px;
    gap: 8px;
  }

  .site-navigation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 2px;
  }

  .site-navigation a {
    min-height: 48px;
    padding: 6px;
    font-size: 12px;
  }
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-flyout {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: rgba(25, 27, 30, .94);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .18);
}

.site-navigation .nav-flyout a {
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
}

.nav-dropdown:focus-within .nav-flyout {
  display: block;
}

@media (hover:hover) {
  .nav-dropdown:hover .nav-flyout {
    display: block;
  }
}

@media (max-width:700px) {
  .nav-flyout {
    min-width: 160px;
  }

  .site-navigation .learning-link {
    font-size: 12px;
  }
}

.home-page .site-header {
  background: rgba(15, 17, 20, .14);
}

.classes.material-tiles {
  gap: 36px;
  margin: 28px 0 36px;
}

.material-tiles > article > .content {
  padding: 24px;
}

@keyframes material-appear {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@media (prefers-reduced-motion:no-preference) {
  .material-tiles > article {
    animation: material-appear 1.8s ease-out both;
  }

  .material-tiles > article:nth-child(2) {
    animation-delay: .3s;
  }
}

@media (max-width:480px) {
  .classes.material-tiles {
    gap: 28px;
  }

  .material-tiles > article > .content {
    padding: 18px;
  }
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 28px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .06);
}

.contact-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  margin-inline: auto;
}

.contact-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #eeede9;
  color: #777;
}

.contact-photo-placeholder span {
  font-size: 48px;
  letter-spacing: -.04em;
  color: #c83b30;
  font-weight: 700;
}

.contact-photo-placeholder small {
  font-size: 13px;
}

.contact-info h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.15;
}

.contact-info p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
}

.contact-info .contact-number {
  margin-top: 24px;
  color: #111;
}

.contact-note {
  display: block;
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}

@media (max-width:600px) {
  .contact-card {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 24px;
  }

  .contact-photo {
    max-width: 100%;
  }

  .contact-info h2 {
    font-size: 26px;
  }
}

.whatsapp-link {
  color: #a62e25;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.whatsapp-link:hover {
  color: #711f19;
}

.imprint-address {
  font-style: normal;
  line-height: 1.8;
}

/* Native dialog keeps focus inside the mobile navigation and supports Escape. */

.mobile-menu-button {
  display: none;
}

.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 90vw);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 24px;
  border: 0;
  background: #17191c;
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-drawer::backdrop {
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.drawer-heading h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-close, .mobile-menu-button {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.drawer-close {
  display: flex;
}

.drawer-close:hover, .mobile-menu-button:hover {
  background: rgba(255, 255, 255, .12);
}

.drawer-navigation {
  display: grid;
  gap: 8px;
}

.drawer-navigation a {
  display: block;
  padding: 14px 12px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  line-height: 1.4;
}

.drawer-navigation a:hover {
  background: rgba(255, 255, 255, .1);
}

.drawer-main-link {
  font-size: 19px;
  font-weight: 700;
}

.drawer-subcategories {
  margin: 0 0 18px 12px;
  padding: 0 0 0 12px;
  border-left: 1px solid #525457;
  list-style: none;
}

.drawer-subcategories a {
  font-size: 16px;
  color: #ddd;
}

body:has(.mobile-drawer[open]) {
  overflow-y: hidden !important;
}

@keyframes drawer-enter {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion:no-preference) {
  .mobile-drawer[open] {
    animation: drawer-enter .35s ease-out;
  }
}

@media (max-width:700px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
  }

  .site-navigation {
    display: none;
  }

  .mobile-menu-button {
    display: flex;
    flex-shrink: 0;
  }
}

.home-page:not(.locked) {
  height: 100vh !important;
  height: 100lvh !important;
  overflow: hidden !important;
}

@media (display-mode: standalone) and (max-width:700px) {
  :root {
    --header-height: calc(64px + env(safe-area-inset-top));
  }

  .home-page .site-header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
}
