@import url("modern-flat.css");
@import url("public-unified.css");

/* Alte öffentliche Header werden durch die gemeinsame Komponente ersetzt. */
body > header:not(.shz-header) {
  display: none !important;
}

.shz-header--shared + header + main {
  margin-top: 0 !important;
}

/* =========================================================
   SHARKZ HEADER
   Flach, modern, responsiv und kompatibel mit der neuen
   index.php-Struktur.
========================================================= */

:root {
  --brand: #6558e8;
  --brand-dark: #4f43cf;
  --brand-soft: #efedff;
  --brand-soft-strong: #ddd8ff;

  --background: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f6f4ff;

  --text: #25233a;
  --text-soft: #646178;
  --text-muted: #817d92;

  --border: #e3e1ea;
  --border-strong: #d6d2e1;

  --header-background: rgba(255, 255, 255, 0.96);
  --header-border: #e3e1ea;
  --header-text: #25233a;
  --header-text-soft: #646178;
  --header-brand: #6558e8;
  --header-brand-hover: #4f43cf;
  --header-surface-soft: #f6f4ff;
  --header-radius: 14px;
  --header-height: 76px;
  --white: #ffffff;
}

/* Einheitliche, dezente Seiten-Scrollleiste */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--header-brand) #f1f1f7;
}

html::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track {
  background: #f1f1f7;
}

html::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid #f1f1f7;
  border-radius: 6px;
  background: var(--header-brand);
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--header-brand-hover);
}

html::-webkit-scrollbar-button {
  display: none;
}

/* =========================================================
   DESKTOP HEADER
========================================================= */

.shz-header {
  position: sticky;
  top: 0;
  z-index: 9500;
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-background);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.shz-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: min(calc(100% - 40px), 1260px);
  height: 100%;
  margin: 0 auto;
  gap: 28px;
}

/* =========================================================
   LOGO
========================================================= */

.shz-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.shz-header__brand img {
  display: block;
  width: 132px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

/* =========================================================
   HAUPTNAVIGATION
========================================================= */

.shz-header__navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.2vw, 30px);
  min-width: 0;
}

.shz-header__navigation > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--header-text-soft);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.shz-header__navigation > a::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--header-brand);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.shz-header__navigation > a:hover,
.shz-header__navigation > a:focus-visible {
  color: var(--header-text);
}

.shz-header__navigation > a:hover::after,
.shz-header__navigation > a:focus-visible::after {
  transform: scaleX(1);
}

/* =========================================================
   FUNKTIONSMENÜ
========================================================= */

.shz-header__features {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.shz-header__features-button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--header-text-soft);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.shz-header__features-button::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--header-brand);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.shz-header__features-button i {
  font-size: 0.68rem;
  transition: transform 160ms ease;
}

.shz-header__features-button[aria-expanded="true"] i,
.shz-header__features:focus-within .shz-header__features-button i {
  transform: rotate(180deg);
}

.shz-header__features-button:hover,
.shz-header__features-button:focus-visible,
.shz-header__features-button[aria-expanded="true"] {
  color: var(--header-text);
}

.shz-header__features:hover .shz-header__features-button::after,
.shz-header__features:focus-within .shz-header__features-button::after,
.shz-header__features-button[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.shz-header__features-menu {
  position: absolute;
  z-index: 1300;
  top: 100%;
  left: 50%;
  width: min(720px, calc(100vw - 40px));
  padding: 26px;
  border: 1px solid var(--header-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
  transform: translateX(-50%);
}

.shz-header__features-menu[hidden] {
  display: none;
}

.shz-header__features-title {
  display: block;
  margin-bottom: 18px;
  color: var(--header-text);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shz-header__features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 24px;
}

.shz-header__features-grid a {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: var(--header-text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.shz-header__features-grid a i {
  width: 20px;
  flex: 0 0 auto;
  color: var(--header-brand);
  text-align: center;
}

.shz-header__features-grid a:hover,
.shz-header__features-grid a:focus-visible {
  background: var(--header-surface-soft);
  color: var(--header-text);
}

@media (min-width: 1081px) {
  .shz-header__features:hover .shz-header__features-menu,
  .shz-header__features:focus-within .shz-header__features-menu {
    display: block;
  }
}

/* =========================================================
   HEADER AKTIONEN
========================================================= */

.shz-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shz-header__login-button,
.shz-header__cta {
  min-height: 44px;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
}

.shz-header__login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--header-border);
  background: #ffffff;
  color: var(--header-text);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.shz-header__login-button:hover,
.shz-header__login-button[aria-expanded="true"] {
  border-color: #c7cdfd;
  background: var(--header-surface-soft);
  color: var(--header-brand-hover);
}

.shz-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--header-brand);
  background: var(--header-brand);
  color: #ffffff;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.shz-header__cta:hover {
  border-color: var(--header-brand-hover);
  background: var(--header-brand-hover);
  transform: translateY(-1px);
}

/* =========================================================
   MOBILE MENÜ BUTTON
========================================================= */

.shz-header__menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--header-border);
  border-radius: 11px;
  background: #ffffff;
  cursor: pointer;
}

.shz-header__menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 999px;
  background: var(--header-text);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.shz-header__menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.shz-header__menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.shz-header__menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   MOBILE NAVIGATION AKTIONEN
========================================================= */

.shz-header__mobile-actions {
  display: none;
}

.shz-header__mobile-cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.shz-header__mobile-cta--primary {
  border-color: var(--header-brand);
  background: var(--header-brand);
  color: #ffffff;
}

.shz-header__mobile-cta--primary:hover {
  border-color: var(--header-brand-hover);
  background: var(--header-brand-hover);
}

.shz-header__mobile-cta--secondary {
  border-color: var(--header-border);
  background: #ffffff;
  color: var(--header-brand-hover);
}

.shz-header__mobile-cta--secondary:hover {
  border-color: var(--header-brand);
  background: var(--header-surface-soft);
}

/* =========================================================
   LOGIN PANEL
========================================================= */

.shz-header__login-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1100;
  width: min(400px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--header-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--header-text);
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  transform-origin: top right;
  animation: sharkzLoginIn 180ms ease-out;
}

.shz-header__login-panel[hidden] {
  display: none;
}

.shz-header__login-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.shz-header__login-panel-header .shz-header__eyebrow {
  margin-bottom: 6px;
}

.shz-header__login-panel-header h2 {
  margin: 0;
  color: var(--header-text);
  font-size: 1.3rem;
  line-height: 1.2;
}

.shz-header__login-close {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--header-border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--header-text);
  cursor: pointer;
}

.shz-header__login-close:hover {
  border-color: #c7cdfd;
  background: var(--header-surface-soft);
  color: var(--header-brand-hover);
}

.shz-header__login-panel form {
  display: grid;
  gap: 10px;
}

.shz-header__login-panel label {
  margin-top: 4px;
  color: var(--header-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.shz-header__login-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd6e2;
  border-radius: 10px;
  background: #ffffff;
  color: var(--header-text);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.shz-header__login-panel input::placeholder {
  color: #8b95a7;
}

.shz-header__login-panel input:focus {
  border-color: var(--header-brand);
  box-shadow: 0 0 0 3px rgba(88, 91, 255, 0.12);
}

.shz-header__login-panel form button {
  min-height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--header-brand);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.shz-header__login-panel form button:hover {
  background: var(--header-brand-hover);
}

.shz-header__login-help {
  display: inline-block;
  margin-top: 14px;
  color: var(--header-brand-hover);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.shz-header__login-help:hover {
  text-decoration: underline;
}

@keyframes sharkzLoginIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

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

/* =========================================================
   TABLET / KLEINER DESKTOP
========================================================= */

@media (max-width: 1080px) {
  .shz-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .shz-header__menu-button {
    display: block;
    justify-self: end;
  }

  .shz-header__navigation {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    padding: 22px;
    border-top: 1px solid var(--header-border);
    background: #ffffff;
    flex-direction: column;
    gap: 0;
  }

  .shz-header__navigation.shz-header__navigation--open {
    display: flex;
  }

  .shz-header__navigation > a {
    min-height: 58px;
    border-bottom: 1px solid var(--header-border);
    font-size: 1rem;
  }

  .shz-header__navigation > a::after {
    display: none;
  }

  .shz-header__features {
    display: block;
    min-height: 0;
    border-bottom: 1px solid var(--header-border);
  }

  .shz-header__features-button {
    width: 100%;
    min-height: 58px;
    justify-content: space-between;
    font-size: 1rem;
  }

  .shz-header__features-button::after {
    display: none;
  }

  .shz-header__features-menu {
    position: static;
    width: 100%;
    padding: 8px 0 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .shz-header__features-title {
    display: none;
  }

  .shz-header__features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
  }

  .shz-header__mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
  }

  .shz-header__mobile-actions .shz-header__mobile-cta {
    width: 100%;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  .shz-header__inner {
    grid-template-columns: 1fr auto auto;
    width: min(calc(100% - 24px), 1260px);
    gap: 8px;
  }

  .shz-header__brand img {
    width: 108px;
    max-height: 44px;
  }

  .shz-header__actions {
    display: flex;
  }

  .shz-header__cta {
    display: none;
  }

  .shz-header__login-button {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .shz-header__login-button span {
    display: none;
  }

  .shz-header__menu-button {
    display: block;
  }

  .shz-header__navigation {
    top: var(--header-height);
    padding: 18px 14px 30px;
  }

  .shz-header__navigation > a {
    min-height: 56px;
  }

  .shz-header__features-button {
    min-height: 56px;
  }

  .shz-header__features-grid {
    grid-template-columns: 1fr;
  }

  .shz-header__login-panel {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100vh - var(--header-height) - 24px);
    overflow-y: auto;
    padding: 20px;
  }
}

/* =========================================================
   SEHR KLEINE BILDSCHIRME
========================================================= */

@media (max-width: 390px) {
  .shz-header__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .shz-header__brand img {
    width: 96px;
  }

  .shz-header__login-button,
  .shz-header__menu-button {
    width: 42px;
    height: 42px;
  }
}

/* Das mobile Funktionen-Menü bleibt im Dokumentfluss und vor den CTA-Buttons. */
@media (max-width: 1080px) {
  .shz-header__navigation {
    z-index: 1250;
    max-height: calc(100dvh - var(--header-height));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .shz-header__features {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    overflow: visible;
  }

  .shz-header__features-menu {
    position: relative !important;
    z-index: 10;
    inset: auto !important;
    display: block;
    width: 100%;
    max-height: none;
    overflow: visible;
    transform: none !important;
  }

  .shz-header__features-menu[hidden] {
    display: none !important;
  }

  .shz-header__features-grid a {
    position: relative;
    z-index: 11;
    pointer-events: auto;
  }

  .shz-header__mobile-actions {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
  }
}

/* =========================================================
   BARRIEREFREIHEIT
========================================================= */

.shz-header a:focus-visible,
.shz-header button:focus-visible,
.shz-header__login-panel input:focus-visible {
  outline: 3px solid rgba(88, 91, 255, 0.28);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .shz-header *,
  .shz-header *::before,
  .shz-header *::after,
  .shz-header__login-panel {
    animation: none !important;
    transition: none !important;
  }
}
