/* ===== BASE ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: #1a1a1a;
  color: #f3f3f3;
}

/* ===== HEADER ===== */

.public-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(41, 41, 41, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.public-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.public-header__brand,
.public-header__nav,
.public-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo */

.public-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo-icon {
  height: 48px;
  width: auto;
  display: block;
  transform: translateY(4px);
}

.logo-text {
  height: 18px;
  width: auto;
  display: block;
  margin-left: 8px;
}

/* Links */

.public-header__link,
.public-header__lang-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 500;
  transition: 0.2s ease;
}

.public-header__link:hover,
.public-header__lang-link:hover {
  color: #ffffff;
}

/* Language */

.public-header__lang-link {
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.public-header__lang-link:hover {
  background: rgba(179, 0, 0, 0.14);
}

.public-header__lang-state {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Auth Button */

.public-header__auth-button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
  background: #b30000;
  color: #fff;
  border: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.public-header__auth-button:hover {
  background: #7a0000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 0, 0, 0.28);
}

/* Ultimate Button */

.public-header__ultimate-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.35),
    rgba(255, 200, 0, 0.25)
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow:
    0 4px 16px rgba(255, 200, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  overflow: hidden;
}

.public-header__ultimate-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.5),
    rgba(255, 200, 0, 0.35)
  );
  box-shadow:
    0 8px 22px rgba(255, 200, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.public-header__ultimate-button:active {
  transform: translateY(0);
  box-shadow:
    0 2px 6px rgba(255, 200, 0, 0.25),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.public-header__ultimate-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255,255,255,0.4), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.public-header__ultimate-button:hover::after {
  opacity: 0.4;
}

.public-header__ultimate-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  transform: translateY(2px);
}

/* User */

.public-header__user {
  display: flex;
  align-items: center;
}

.public-header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #b30000;
}

/* ===== MAIN ===== */

.public-main {
  padding: 40px 20px;
}

.public-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== SECTIONS ===== */

.section {
  margin-bottom: 60px;
}

.section__inner {
  max-width: 700px;
}

.section--hero {
  margin-top: 20px;
  padding-top: 40px;
  padding-bottom: 20px;
}

/* ===== HERO ===== */

.hero__eyebrow {
  display: block;
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.72);
}

.hero__title {
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 16px 0;
  max-width: 700px;
}

.hero__description {
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  opacity: 0.8;
}

/* ===== SECTION CONTENT ===== */

.section__title {
  font-size: 24px;
  margin-bottom: 12px;
}

.section__list {
  padding-left: 18px;
}

/* ===== HERO ACTIONS ===== */

.hero__actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s ease;
}

/* Primary */

.hero__button--primary {
  background: #b30000;
  color: #fff;
  border: none;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.hero__button--primary:focus-visible {
  box-shadow: 0 0 0 2px rgba(179, 0, 0, 0.5);
}

.hero__button--primary:hover {
  background: #7a0000;
}

/* Secondary */

.hero__button--secondary {
  background: #b30000;
  color: #fff;
  border: none;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.hero__button--secondary:focus-visible {
  box-shadow: 0 0 0 2px rgba(179, 0, 0, 0.4);
}

.hero__button--secondary:hover {
  background: #7a0000;
}

/* ===== LANGUAGE SWITCHER ===== */

.language-switcher {
  position: relative;
}

.language-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  color: #f3f3f3;
  cursor: pointer;
}

.language-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-switcher__flag {
  font-size: 16px;
}

.language-switcher__code {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  margin-left: 3px;
}

.language-switcher__arrow {
  color: rgba(255, 255, 255, 0.58);
}

.language-switcher__trigger:hover .language-switcher__code {
  color: #ffffff;
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #202020;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 220;
}

.language-switcher.open .language-switcher__menu {
  display: flex;
}

.language-switcher__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #c7c7c7;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.2s ease, background 0.2s ease;
}

.language-switcher__item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

.language-switcher__label {
  white-space: nowrap;
}

/* ===== USER SWITCHER ===== */

.user-switcher {
  position: relative;
  overflow: visible;
}

.user-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  color: #f3f3f3;
  cursor: pointer;
}

.user-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-switcher__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
}

.user-switcher__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-switcher__name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.9);
}

.user-switcher__trigger:hover .user-switcher__name {
  color: #ffffff;
}

.user-switcher__arrow {
  opacity: 0.6;
}

.user-switcher__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(32, 32, 32, 0.98),
    rgba(26, 26, 26, 0.98)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 260;
}

.user-switcher.open .user-switcher__menu,
.user-switcher.is-open .user-switcher__menu {
  display: flex;
}

.user-switcher__item {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #c7c7c7;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.user-switcher__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.user-switcher__section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-switcher__section-title {
  padding: 8px 12px 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.user-switcher__divider {
  height: 1px;
  margin: 8px 6px;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== CLEAN CHEVRON ===== */

.user-switcher__arrow,
.language-switcher__arrow {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  margin-left: 2px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.language-switcher__trigger:hover .language-switcher__arrow,
.user-switcher__trigger:hover .user-switcher__arrow {
  border-color: #ffffff;
}

.language-switcher.open .language-switcher__arrow,
.user-switcher.open .user-switcher__arrow,
.user-switcher.is-open .user-switcher__arrow {
  transform: rotate(-135deg);
}

/* ===== MOBILE DEFAULT ===== */

.public-header__mobile {
  display: none;
}

.public-header__mobile-drawer[hidden],
.public-header__mobile-overlay[hidden] {
  display: none !important;
}

/* ===== SMALL MOBILE GENERAL ===== */

@media (max-width: 768px) {
  .hero__title {
    font-size: 28px;
  }

  .hero__description {
    font-size: 15px;
  }

  .section__inner {
    max-width: 100%;
  }

  .language-switcher {
    width: 100%;
  }

  .language-switcher__trigger {
    width: 100%;
    justify-content: space-between;
  }

  .language-switcher__menu {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
  }
}

/* ===== MOBILE HEADER / DRAWER ===== */

@media (max-width: 980px) {
  .public-header__inner {
    display: none;
  }

  .public-header__mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 0 16px;
    overflow: visible;
  }

  .public-header__mobile-left,
  .public-header__mobile-right {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: visible;
    flex: 0 0 auto;
  }

  .public-header__mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
  }

  .public-header__mobile-logo .logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    transform: translateY(1px);
  }

  .public-header__mobile-logo .logo-text {
    height: 12px;
    width: auto;
    display: block;
    transform: translateX(-1px);
    margin-left: 0;
  }

  .public-header__ultimate-button--mobile {
    min-height: 38px;
    padding: 0 14px;
    font-size: 15px;
  }

  .public-header__mobile-menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .public-header__mobile-menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    display: block;
  }

  .user-switcher--mobile {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    z-index: 400;
    overflow: visible;
  }

  .user-switcher--mobile .user-switcher__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: pointer;
  }

  .user-switcher--mobile .user-switcher__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .user-switcher--mobile .user-switcher__name,
  .user-switcher--mobile .user-switcher__arrow {
    display: none;
  }

  .user-switcher--mobile .user-switcher__avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .user-switcher--mobile .user-switcher__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .user-switcher--mobile .user-switcher__menu {
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    transform: none;
    width: min(320px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    min-width: 0;
  }

  .public-header__mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .public-header__mobile-overlay.is-open {
    opacity: 1;
  }

  .public-header__mobile-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 360px);
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    z-index: 190;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.28s ease;
  }

  .public-header__mobile-drawer.is-open {
    transform: translateX(0);
  }

  .public-header__mobile-drawer-inner {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    background: rgba(14, 16, 22, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 50px rgba(0, 0, 0, 0.35);
  }

  .public-header__mobile-drawer-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .public-header__mobile-drawer-slot {
    min-height: 160px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .public-header__mobile-drawer-language {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .public-header__mobile-drawer-language-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
  }

  .public-header__mobile-drawer-language-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .public-header__mobile-lang-link {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
  }

  .public-header__mobile-drawer-footer {
    flex: 0 0 auto;
    margin-top: 18px;
    width: 100%;
  }

  .public-header__mobile-drawer-login {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 16px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: #d30f16;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.mobile-open {
    overflow: hidden;
  }
}

@media (max-width: 980px) {

  /* Sidebar offen → Header Avatar AUS */
  body.mobile-open .public-header__mobile-right .user-switcher--mobile {
    display: none !important;
  }

  /* Sidebar geschlossen → Sidebar Avatar AUS */
  .mobile-user-panel {
    display: none;
  }

  /* Sidebar offen → Sidebar Avatar EIN */
  body.mobile-open .mobile-user-panel {
    display: flex;
  }

}

.mobile-user-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* HEADER (Avatar + Name) */
.mobile-user-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* AVATAR FIX */
.mobile-user-panel__header img {
  width: 52px;   /* vorher riesig → jetzt clean */
  height: 52px;
  border-radius: 14px; /* leicht rounded statt Kreis */
  object-fit: cover;
}

/* TEXT */
.mobile-user-panel__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-user-panel__name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.mobile-user-panel__sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* LINKS FIX */
.mobile-user-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-user-panel__link {
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #c7c7c7;
  font-size: 14px;
  font-weight: 500;

  background: rgba(255,255,255,0.03);
  transition: 0.15s ease;
}

.mobile-user-panel__link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}