/* --- File: baumvolk-pages/assets/css/bv-header.css --- */

/*-------------------------------------------------------------------
  Root Variablen
-------------------------------------------------------------------*/
:root {
  /* Header Layout */
  --bv-header-top: 20px;
  --bv-header-width: 1516px;
  --bv-header-max-width: 90%;
  --bv-header-padding-y: 5px;
  --bv-header-padding-x: 40px;
  --bv-header-padding-mobile-x: 5px;
  --bv-header-radius: 20px;

  /*Font Size*/
  --bv-menu-font-size: 14px;
  --bv-menu-font-size-mobile: 16px;
  --bv-dropdown-font-size: 16px;
  --bv-submenu-font-size: 15px;
  --bv-lang-font-size: 14px;
  --bv-lang-toggle-font-size: 16px;   

  /* Farben */
  --bv-header-bg: rgba(0, 0, 0, 0.6);
  --bv-header-text: #e0e0e0;
  --bv-header-panel-bg: #1a1a1a;
  --bv-header-dropdown-bg: #121212;
  --bv-header-item-bg: #1e1e1e;
  --bv-header-item-hover-bg: #2a2a2a;
  --bv-header-submenu-bg: #2a2a2a;
  --bv-header-submenu-hover-bg: #333;
  --bv-header-backdrop-bg: rgba(0, 0, 0, 0.45);
  --bv-header-create-mobile-bg: rgba(255, 255, 255, 0.05);
  --bv-header-submenu-text: #ccc;

  /* Rahmen */
  --bv-header-border-width: 2px;
  --bv-header-dropdown-radius: 5px;
  --bv-header-panel-radius: 12px;
  --bv-header-item-radius: 0.3rem;
  --bv-header-create-pill-radius: 20px;

  /* Schatten */
  --bv-header-shadow: -8px 8px 20px rgba(0, 0, 0, 0.4);
  --bv-header-panel-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  --bv-header-dropdown-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);

  /* Z-Index */
  --bv-header-z: 9999;
  --bv-header-backdrop-z: 9998;
  --bv-header-dropdown-z: 1000;
  --bv-header-lang-z: 999;
  --bv-header-avatar-z: 10000;

  /* Abstände / Gaps */
  --bv-header-inner-gap: 20px;
  --bv-header-left-gap: 30px;
  --bv-header-right-gap: 20px;
  --bv-header-menu-gap: 10px;
  --bv-header-dropdown-gap: 40px;
  --bv-header-create-gap: 6px;
  --bv-header-explore-column-gap: 0px;
  --bv-header-lang-offset-x: 65px;
  --bv-header-lang-offset-y: -33px;
  --bv-header-mobile-width: 90%;
  --bv-header-mobile-margin-bottom: 12px;
  --bv-header-mobile-panel-padding-y: 5px;
  --bv-header-mobile-item-padding: 12px 16px;
  --bv-header-submenu-link-padding: 0.6rem 1rem;
  --bv-header-inline-dropdown-padding: 0.5rem 0 0.5rem 1.5rem;
  --bv-header-inline-dropdown-margin-left: 0.8rem;
  --bv-header-label-padding: 12px 20px;
  --bv-header-label-gap: 8px;
  --bv-header-divider-margin-y: 0px;
  --bv-header-divider-margin-left: 16px;
  --bv-header-button-margin-mobile: 5px 10px;
  --bv-header-button-mobile-width: calc(100% - 20px);

  /* Größen */
  --bv-logo-max-height: 60px;
  --bv-avatar-size: 28px;
  --bv-mobile-avatar-size: 38px;
  --bv-mobile-avatar-top: 10px;
  --bv-mobile-avatar-right: 5px;
  --bv-create-trigger-size: 40px;
  --bv-create-trigger-size-mobile: 44px;
  --bv-create-icon-size: 28px;
  --bv-create-label-font-size: 14px;
  --bv-bars-size: 25px;

  /* Buttons */
  --bv-button-padding: 0.3rem 0.8rem;
  --bv-button-radius: 5px;

  /* Menü / Dropdown */
  --bv-menu-link-padding: 1rem 1.5rem;
  --bv-dropdown-padding: 12px 20px 4px 20px;
  --bv-dropdown-padding-large: 20px;
  --bv-dropdown-line-height: 2.5;
  --bv-inline-line-height: 1.4;
  --bv-dropdown-min-width-mobile: 360px;
  --bv-dropdown-open-max-height: 1000px;
  --bv-lang-item-padding: 3px 10px;
  --bv-submenu-border-left-width: 3px;
  --bv-inline-dropdown-border-left-width: 2px;

  /* Animation */
  --bv-header-transition: all 0.8s ease-in-out;
  --bv-menu-transition: all 0.2s ease;
  --bv-dropdown-transition: opacity 0.3s ease, max-height 0.3s ease;
  --bv-inline-dropdown-transition: opacity 0.25s ease, max-height 0.25s ease;
  --bv-button-transition: background-color 0.3s ease;
  --bv-create-transition: background 0.2s ease, color 0.2s ease;
  --bv-backdrop-transition: opacity 0.2s ease;

  /* Mobile Menü Position */
  --bv-menu-top-default: 74px;
  --bv-menu-top-gap: 12px;
  --bv-menu-height-offset: 10px;
  --bv-menu-gap-top: -10px;
  --bv-menu-gap-bottom: 12px;

  /* Divider */
  --bv-divider-width: 70%;
  --bv-divider-opacity: 0.8;
  --bv-mobile-menu-surface: rgba(18, 18, 18, 0.94);
  --bv-mobile-menu-border: rgba(255, 255, 255, 0.08);
  --bv-mobile-menu-highlight: rgba(255, 255, 255, 0.035);
  --bv-mobile-menu-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
  --bv-mobile-menu-item-radius: 16px;
  --bv-mobile-menu-section-gap: 18px;
  --bv-mobile-menu-item-padding: 14px 18px;
  --bv-mobile-menu-subitem-padding: 12px 16px;
}

/*-------------------------------------------------------------------
  Header
-------------------------------------------------------------------*/

.bv-header {
  position: fixed !important;
  top: var(--bv-header-top) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: var(--bv-header-z) !important;

  background-color: var(--bv-header-bg) !important;
  color: var(--bv-header-text) !important;

  padding: var(--bv-header-padding-y) var(--bv-header-padding-x) !important;
  border-radius: var(--bv-header-radius) !important;
  border: var(--bv-header-border-width) solid var(--bv-accent) !important;
  box-shadow: var(--bv-header-shadow) !important;

  opacity: 1 !important;
  transition: var(--bv-header-transition) !important;

  width: var(--bv-header-width) !important;
  max-width: var(--bv-header-max-width) !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .bv-header {
    padding: var(--bv-header-padding-y) var(--bv-header-padding-mobile-x) !important;
    box-sizing: border-box !important;
  }
}

.bv-header.header-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Active / hover reset im Header */
.bv-header a:focus,
.bv-header a:active,
.bv-header a:hover,
.bv-header button:focus,
.bv-header button:active,
.bv-header button:hover {
  outline: none !important;
  box-shadow: none !important;
  border-color: none !important;
  background-color: transparent !important;
  -webkit-tap-highlight-color: transparent;
  color: #fff !important;
}

/* 🌐 Basisstruktur Header */
#site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--bv-header-inner-gap);
  position: relative;
}

#site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#site-logo img {
  height: auto;
  max-height: var(--bv-logo-max-height);
  width: auto;
}

/* 📦 Navigation-Wrapper (Desktop default) */
#site-navigation-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  overflow: visible;
}

/* 📦 Header-Bereiche */
.header-left {
  display: flex;
  align-items: center;
  gap: var(--bv-header-left-gap);
  flex-grow: 1;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--bv-header-right-gap);
  flex-shrink: 0;
  justify-content: flex-end;
  min-width: 0;
}

/* 🧭 Menüs */
.main-menu,
.left-menu,
.right-menu,
.explore-menu {
  display: flex;
  align-items: center;
  gap: var(--bv-header-menu-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu > li {
  position: relative;
  overflow: visible;
}

.main-menu > li > a {
  display: flex;
  align-items: center;
  padding: var(--bv-menu-link-padding);
  color: var(--bv-header-text);
  text-decoration: none;
  transition: var(--bv-menu-transition);
  font-size: var(--bv-menu-font-size);
}

.main-menu > li > a:hover {
  color: var(--bv-accent-hover);
  transform: scale(1.05);
}

.bv-header .right-menu .bv-messages-menu-item > a {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--bv-create-trigger-size);
  height: var(--bv-create-trigger-size);
  min-width: var(--bv-create-trigger-size);
  min-height: var(--bv-create-trigger-size);
  padding: 0 !important;
  gap: 0;
  color: var(--bv-accent) !important;
  background: transparent !important;
  border-radius: 50%;
  line-height: 1;
  text-decoration: none !important;
  transition: var(--bv-create-transition);
}

.bv-header .right-menu .bv-messages-menu-item > a svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bv-header .right-menu .bv-messages-menu-item > a,
.bv-header .right-menu .bv-messages-menu-item > a:hover {
  transform: none !important;
}

.bv-menu-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bv-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 959px) {
  #site-header-inner {
    position: relative;
    box-sizing: border-box;
    padding-right: 0;
    justify-content: flex-start;
    gap: 5px;
  }

  #site-logo {
    margin-right: auto;
  }

  .oceanwp-mobile-menu-icon {
    position: relative;
    z-index: calc(var(--bv-header-avatar-z) + 1);
    flex: 0 0 var(--bv-mobile-avatar-size);
    width: var(--bv-mobile-avatar-size);
    margin-left: 0 !important;
    order: 5;
  }

  .oceanwp-mobile-menu-icon .mobile-menu {
    width: var(--bv-mobile-avatar-size);
    height: var(--bv-mobile-avatar-size);
  }

  .oceanwp-mobile-menu-icon .oceanwp-text,
  .oceanwp-mobile-menu-icon .oceanwp-close-text {
    display: none;
  }

  .bv-header .right-menu .bv-messages-menu-item {
    display: none;
  }

  .bv-mobile-messages-overlay {
    position: relative;
    top: auto;
    right: auto;
    z-index: var(--bv-header-avatar-z);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--bv-mobile-avatar-size);
    width: var(--bv-mobile-avatar-size);
    height: var(--bv-mobile-avatar-size);
    padding: 0 !important;
    border-radius: 50%;
    color: var(--bv-accent) !important;
    background: transparent !important;
    line-height: 1;
    text-decoration: none !important;
    order: 2;
    transition: transform 180ms ease;
  }

  .bv-mobile-create-overlay {
    z-index: var(--bv-header-avatar-z);
    display: inline-flex;
    flex: 0 0 var(--bv-mobile-avatar-size);
    align-items: center;
    justify-content: center;
    width: var(--bv-mobile-avatar-size);
    height: var(--bv-mobile-avatar-size);
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    order: 3;
    transition: transform 180ms ease, color 180ms ease;
  }

  .bv-mobile-create-overlay svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
  }

  .bv-mobile-create-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: calc(var(--bv-header-avatar-z) + 1);
    display: none;
    width: min(220px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--bv-mobile-menu-border);
    border-radius: 14px;
    background: var(--bv-mobile-menu-surface);
    box-shadow: var(--bv-mobile-menu-shadow);
  }

  .bv-mobile-create-menu.is-open {
    display: grid;
    gap: 4px;
  }

  .bv-mobile-create-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--bv-header-text);
    text-decoration: none;
  }

  .bv-mobile-create-menu a:hover,
  .bv-mobile-create-menu a:focus-visible {
    background: var(--bv-mobile-menu-highlight);
    color: #fff;
  }

  #site-header-inner:has(.mobile-menu.is-open) .bv-mobile-messages-overlay,
  #site-header-inner:has(.mobile-menu.is-open) .bv-mobile-create-overlay,
  #site-header-inner:has(.mobile-menu.is-open) .bv-mobile-avatar-overlay {
    transform: translateX(-34px);
  }

  .bv-mobile-messages-overlay svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
  }

  .bv-menu-badge {
    position: absolute;
    top: 2px;
    right: 0;
    margin-left: 0;
  }
}

@media (min-width: 960px) {
  .bv-mobile-messages-overlay,
  .bv-mobile-create-overlay,
  .bv-mobile-create-menu {
    display: none;
  }
}

/* 🧭 Dropdown-Menüs (Desktop) */
.bv-explore-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bv-header-dropdown-bg);
  color: var(--bv-header-text);
  border-radius: var(--bv-header-dropdown-radius);
  box-shadow: var(--bv-header-dropdown-shadow);
  z-index: var(--bv-header-dropdown-z);
  flex-direction: row;
  gap: var(--bv-header-dropdown-gap);
  white-space: nowrap;
  line-height: var(--bv-dropdown-line-height);
  width: max-content;
  min-width: unset;
  max-width: 100vw;
  overflow-x: auto;
}

.explore-column {
  display: flex;
  flex-direction: column;
  gap: var(--bv-header-explore-column-gap);
  margin-bottom: var(--bv-header-explore-column-gap);
}

.bv-explore-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--bv-header-text);
  padding: 5px 20px;
  border-radius: var(--bv-header-item-radius);
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: var(--bv-dropdown-font-size);
  box-sizing: border-box;
}

.bv-explore-menu a:hover {
  background: var(--bv-accent-soft) !important;
  color: #fff !important;
}

.bv-explore-menu a.is-current,
.bv-explore-menu a[aria-current="page"] {
  background: var(--bv-accent-hover);
  color: #fff;
}

.bv-explore-menu i {
  margin-right: 8px;
  min-width: 20px;
  text-align: center;
}

.bv-your-area-dropdown .bv-explore-menu {
  display: none;
  min-width: auto;
  max-width: none;
  white-space: normal;
  flex-direction: column;
  border-radius: var(--bv-header-dropdown-radius);
  background: var(--bv-header-dropdown-bg);
  box-shadow: var(--bv-header-dropdown-shadow);
  line-height: var(--bv-dropdown-line-height);
  gap: 0;
}

.bv-your-area-dropdown .bv-your-area-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bv-your-area-dropdown .bv-your-area-trigger > .menu-text {
  font-size: 18px;
  line-height: 1;
  transform: translateX(-2px);
}

.bv-your-area-dropdown .bv-avatar {
  width: var(--bv-avatar-size);
  height: var(--bv-avatar-size);
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid var(--bv-border);
}

.bv-explore-divider {
  display: none;
}

/* Sprachdropdown */
.bv-lang-dropdown {
  position: relative;
  display: inline-block;
  font-family: sans-serif;
}

.bv-lang-toggle {
  background: none;
  border: none;
  color: inherit;
  font-size: var(--bv-lang-font-size);
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 768px) {
  .bv-lang-toggle {
    font-size: var(--bv-lang-toggle-font-size) !important;
  }
}

.bv-lang-menu {
    display: none;
    position: absolute;

    /* Direkt unter dem Sprach-Button */
    top: 100%;
    left: 0;

    margin: 4px 0 0;
    padding: 4px 0;

    min-width: 100%;
    width: max-content;

    background-color: var(--bv-header-item-bg);
    color: var(--bv-header-text);
    border: 1px solid var(--bv-accent-hover);
    border-radius: 3px;
    list-style: none;

    z-index: var(--bv-header-lang-z);
    box-sizing: border-box;
}

.bv-lang-menu li {
    padding: 0;
}

.bv-lang-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 10px;
    white-space: nowrap;

    text-decoration: none;
    color: inherit;
}

.bv-lang-menu li a:hover {
  background-color: var(--bv-header-item-hover-bg);
  color: var(--bv-accent-hover);
}

.bv-lang-mobile-label {
  display: none;
  margin-right: 6px;
}

.bv-explore-dropdown.open .bv-explore-menu,
.bv-create-dropdown.open .bv-explore-menu,
.bv-lang-dropdown.open .bv-lang-menu {
  display: block;
}

/*-------------------------------------------------------------------
  Mobile Header / Navigation
-------------------------------------------------------------------*/

@media (max-width: 959px) {
  .bv-explore-menu {
    position: relative;
    top: auto;
    left: auto;
    background: var(--bv-header-dropdown-bg);
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--bv-dropdown-transition);
  }

  .menu-item-has-children.open .bv-explore-menu {
    visibility: visible;
    opacity: 1;
    max-height: var(--bv-dropdown-open-max-height);
  }

  .header-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    display: block;
  }

  .header-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    display: block;
  }

  #site-header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #site-logo {
    justify-content: flex-start;
  }

  .oceanwp-mobile-menu-icon {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .fa-bars {
    font-size: var(--bv-bars-size);
  }

  .mobile-menu.is-closed,
  .mobile-menu.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  #site-navigation-wrap {
    position: fixed !important;
    top: calc(var(--bv-menu-top, var(--bv-menu-top-default)) + var(--bv-menu-top-gap)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: var(--bv-header-mobile-width) !important;
    margin-bottom: var(--bv-header-mobile-margin-bottom) !important;
    max-height: calc(100vh - var(--bv-menu-top, var(--bv-menu-top-default)) - var(--bv-menu-height-offset)) !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    z-index: var(--bv-header-z) !important;
    display: none;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 22%),
      var(--bv-mobile-menu-surface);
    border: 1px solid var(--bv-mobile-menu-border);
    border-radius: 24px;
    box-shadow: var(--bv-mobile-menu-shadow);
    backdrop-filter: blur(18px);
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: hidden !important;
    padding: 18px 14px 16px !important;
    box-sizing: border-box !important;
  }

  #site-navigation-wrap.open {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  .menu-text {
    font-size: 16px;
    font-weight: 700;
  }

  .main-menu,
  .left-menu,
  .right-menu,
  .explore-menu {
    width: 100% !important;
    flex-direction: column;
    align-items: stretch;
    display: flex;
    gap: var(--bv-mobile-menu-section-gap);
  }

  .main-menu > li,
  .left-menu > li,
  .right-menu > li,
  .explore-menu > li {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
  }

  .main-menu > li > a,
  .left-menu > li > a,
  .right-menu > li > a,
  .explore-menu > li > a {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    padding: var(--bv-mobile-menu-item-padding);
    margin-left: 0;
    margin-right: 0;
    background: var(--bv-mobile-menu-highlight);
    color: var(--bv-header-text);
    border: 1px solid transparent;
    border-radius: var(--bv-mobile-menu-item-radius);
    box-sizing: border-box;
    text-align: left;
    font-size: var(--bv-menu-font-size-mobile);
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      transform 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease;
  }

  .main-menu > li > a:hover,
  .left-menu > li > a:hover,
  .right-menu > li > a:hover,
  .explore-menu > li > a:hover {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  .main-menu li.menu-item-has-children.open > .sub-menu {
    display: block;
  }

  .sub-menu {
    display: none;
    position: static;
    background: var(--bv-header-submenu-bg);
    border-radius: var(--bv-header-item-radius);
    margin-top: 0.5rem;
    padding-left: 0;
  }

  .sub-menu li {
    width: 100%;
  }

  .sub-menu li a {
    display: block;
    width: 100%;
    padding: var(--bv-header-submenu-link-padding);
    border-left: var(--bv-submenu-border-left-width) solid var(--bv-accent);
    color: var(--bv-header-submenu-text);
    font-size: var(--bv-submenu-font-size);
  }

  .sub-menu li a:hover {
    background: var(--bv-header-submenu-hover-bg);
    color: var(--bv-accent-hover);
  }

  .bv-explore-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bv-header-dropdown-bg);
    color: var(--bv-header-text);
    padding: var(--bv-dropdown-padding-large);
    border-radius: 18px;
    box-shadow: var(--bv-header-dropdown-shadow);
    z-index: var(--bv-header-dropdown-z);
    flex-direction: row;
    gap: var(--bv-header-dropdown-gap);
    min-width: var(--bv-dropdown-min-width-mobile);
    width: max-content;
    max-width: 100vw;
    white-space: nowrap;
    line-height: var(--bv-dropdown-line-height);
  }

  .bv-your-area-dropdown .bv-explore-menu {
    min-width: var(--bv-dropdown-min-width-mobile);
    width: max-content;
    max-width: 100vw;
    white-space: nowrap;
    flex-direction: column;
    gap: 10px;
  }

  .bv-explore-dropdown.open .bv-explore-menu {
    display: block;
  }

  .bv-explore-menu a:hover {
    background: var(--bv-header-submenu-hover-bg);
    color: var(--bv-accent-hover);
  }

  .explore-column {
    display: grid;
    gap: 8px;
    padding-bottom: 0.4rem;
  }

  .bv-lang-wrapper {
    margin-left: 0 !important;
    margin: 8px 0 0;
    padding: 16px 18px 4px;
    border-top: 1px solid color-mix(in srgb, var(--bv-accent) 20%, transparent);
  }

  .bv-lang-mobile-label {
    font-size: var(--bv-lang-toggle-font-size);
    font-weight: 700;
  }

  .bv-lang-mobile-label {
    display: inline-block;
  }
}

/*-------------------------------------------------------------------
  Header Buttons
-------------------------------------------------------------------*/

.bv-header .baumvolk-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  background-color: var(--bv-accent);
  color: #fff;
  padding: var(--bv-button-padding);
  border-radius: var(--bv-button-radius);
  text-decoration: none;
  transition: var(--bv-button-transition);
  white-space: nowrap;
}

.bv-header .baumvolk-button.secondary {
  background-color: transparent !important;
  border: 1px solid var(--bv-accent) !important;
  color: #fff !important;
}

.bv-header .baumvolk-button:hover {
  background-color: var(--bv-accent-hover) !important;
  color: #fff !important;
}

.bv-header .baumvolk-button.secondary:hover {
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .bv-header .baumvolk-button {
    margin: var(--bv-header-button-margin-mobile);
    width: var(--bv-header-button-mobile-width);
  }
}

/*-------------------------------------------------------------------
  Create Menü
-------------------------------------------------------------------*/

/* Trigger im Header sicher stylen */
.bv-header .right-menu .bv-create-dropdown > a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: var(--bv-create-trigger-size);
  height: var(--bv-create-trigger-size);
  min-width: var(--bv-create-trigger-size);
  min-height: var(--bv-create-trigger-size);
  padding: 0 !important;
  margin: 0;
  border-radius: 50%;
  color: var(--bv-accent) !important;
  background: transparent !important;
  text-decoration: none !important;
  line-height: 1 !important;
  transition: var(--bv-create-transition);
}

.bv-header .right-menu .bv-create-dropdown > a svg {
  width: var(--bv-create-icon-size);
  height: var(--bv-create-icon-size);
  /*stroke: var(--bv-accent) !important;*/
  stroke: #fff;
  fill: none !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bv-header .right-menu .bv-create-dropdown > a,
.bv-header .right-menu .bv-create-dropdown > a:hover {
  transform: none !important;
}

@media (max-width: 959px) {
  .bv-header .right-menu .bv-create-dropdown > a {
    width: var(--bv-create-trigger-size-mobile);
    height: var(--bv-create-trigger-size-mobile);
    min-width: var(--bv-create-trigger-size-mobile);
    min-height: var(--bv-create-trigger-size-mobile);
  }
}

/* Create + Dropdown */
.bv-create-dropdown {
  position: relative;
}

.bv-create-dropdown .bv-explore-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bv-header-dropdown-bg);
  color: var(--bv-header-text);
  border-radius: var(--bv-header-dropdown-radius);
  box-shadow: var(--bv-header-dropdown-shadow);
  z-index: var(--bv-header-dropdown-z);
  flex-direction: column;
  gap: 0;
  white-space: normal;
  line-height: var(--bv-dropdown-line-height);
  min-width: auto;
  max-width: none;
}

.bv-create-dropdown .bv-explore-menu a {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--bv-header-text);
  text-decoration: none;
  padding: 5px 20px;
  border-radius: var(--bv-header-item-radius);
  transition: background-color 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
}

.bv-create-dropdown .bv-explore-menu a:hover {
  background: var(--bv-accent-soft);
  color: var(--bv-accent-hover);
}

.bv-create-dropdown .bv-explore-menu i {
  margin-right: 8px;
  min-width: 20px;
  text-align: center;
}

@media (max-width: 959px) {
  .bv-create-dropdown .bv-explore-menu {
    position: relative;
    top: auto;
    left: auto;
    min-width: 100%;
    background: var(--bv-header-dropdown-bg);
    border-radius: var(--bv-header-dropdown-radius);
    flex-direction: column;
    gap: 10px;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--bv-dropdown-transition);
  }

  .bv-create-dropdown.open .bv-explore-menu {
    visibility: visible;
    opacity: 1;
    max-height: var(--bv-dropdown-open-max-height);
  }

  .bv-create-dropdown .bv-explore-menu a:hover {
    background: var(--bv-header-submenu-hover-bg);
    color: var(--bv-accent-hover);
  }
}

/* Label-Text für Create-Icon */
.bv-header .right-menu .bv-create-dropdown .bv-create-label {
  display: none;
  margin-left: 8px;
  color: var(--bv-header-text);
  font-size: var(--bv-create-label-font-size);
  font-weight: 500;
  white-space: nowrap;
  text-transform: capitalize;
}

@media (max-width: 959px) {
  .bv-header .right-menu .bv-create-dropdown > a {
    width: auto;
    padding: 0 10px !important;
    border-radius: var(--bv-header-create-pill-radius);
    gap: var(--bv-header-create-gap);
    background: var(--bv-header-create-mobile-bg);
  }

  .bv-header .right-menu .bv-create-dropdown .bv-create-label {
    display: inline-block;
    color: var(--bv-accent);
  }

  .bv-header .right-menu .bv-create-dropdown > a:hover .bv-create-label {
    color: var(--bv-accent-hover);
  }

  .menu-item-has-children.open > .bv-explore-menu {
    visibility: visible;
    opacity: 1;
    max-height: var(--bv-dropdown-open-max-height);
  }

  #site-navigation-wrap.open .menu-item-has-children > .bv-explore-menu {
    display: block;
  }
}

/*-------------------------------------------------------------------
  Mobile: Dropdowns inline anzeigen
-------------------------------------------------------------------*/

@media (max-width: 959px) {
  #site-navigation-wrap .main-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .menu-item-has-children > .bv-explore-menu {
    top: auto;
    left: auto;
    visibility: hidden;
    overflow: hidden;
    transition: var(--bv-inline-dropdown-transition);
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 8px 0 0 0;
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .menu-item-has-children > .bv-explore-menu a {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-height: 48px;
    padding: var(--bv-mobile-menu-subitem-padding) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    line-height: var(--bv-inline-line-height) !important;
    background: rgba(255, 255, 255, 0.03);
    color: var(--bv-header-text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 14px;
  }

  .menu-item-has-children > .bv-explore-menu a:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  .menu-item-has-children > .bv-explore-menu a.is-current,
  .menu-item-has-children > .bv-explore-menu a[aria-current="page"] {
    background: var(--bv-accent-hover);
    color: #fff;
  }

  .menu-item-has-children > a .menu-text::after {
    display: none;
  }

  .menu-item-has-children > .bv-explore-menu {
    border-left: 0;
    margin-left: 0;
  }
}

/*-------------------------------------------------------------------
  Desktop/Mobile Label Switching
-------------------------------------------------------------------*/

.bv-explore-dropdown .bv-explore-trigger {
  display: inline-flex;
}

.bv-explore-dropdown .bv-explore-label {
  display: none;
}

@media (max-width: 959px) {
  .bv-explore-dropdown .bv-explore-trigger {
    display: none !important;
  }

  .bv-header .right-menu .bv-create-dropdown > a.bv-explore-trigger {
    display: none !important;
  }

  .bv-explore-dropdown .bv-explore-label {
    display: inline-flex !important;
    align-items: center;
    padding: 10px 6px 2px;
    color: #fff;
    text-decoration: none;
    cursor: default;
    user-select: none;
    pointer-events: none;
    gap: var(--bv-header-label-gap);
    letter-spacing: 0.01em;
  }

  .bv-explore-dropdown .bv-explore-label:hover,
  .bv-explore-dropdown .bv-explore-label:active,
  .bv-explore-dropdown .bv-explore-label:focus {
    background: transparent !important;
    color: var(--bv-header-text) !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .bv-explore-divider {
    display: block;
    width: calc(100% - 12px);
    margin: 0 0 4px;
    margin-left: 6px;
    border-bottom: 1px solid color-mix(in srgb, var(--bv-accent) 28%, rgba(255, 255, 255, 0.08));
    opacity: 1;
    box-sizing: border-box;
  }

  .bv-your-area-dropdown .bv-explore-menu .bv-explore-label {
    margin-bottom: -15px;
  }

  .bv-header {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: var(--bv-header-mobile-width) !important;
    max-width: var(--bv-header-mobile-width) !important;
  }

  .bv-header .right-menu > li:last-child > a.baumvolk-button.secondary,
  .bv-header .right-menu > li:last-child > a.baumvolk-button {
    min-height: 54px;
    border-radius: 16px;
    margin-top: 8px;
    justify-content: center;
  }
}

/*-------------------------------------------------------------------
  Backdrop / Scroll Lock
-------------------------------------------------------------------*/

body.bv-lock {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

#bv-nav-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bv-header-backdrop-bg);
  z-index: var(--bv-header-backdrop-z);
  opacity: 0;
  pointer-events: none;
  transition: var(--bv-backdrop-transition);
}

#bv-nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 959px) {
  :root {
    --bv-menu-gap-top: -10px;
    --bv-menu-gap-bottom: 12px;
  }

  #site-navigation-wrap {
    top: calc(var(--bv-menu-top, var(--bv-menu-top-default)) + var(--bv-menu-gap-top)) !important;
    max-height: calc(
      100svh - var(--bv-menu-top, var(--bv-menu-top-default)) - var(--bv-menu-gap-top) - var(--bv-menu-gap-bottom)
    ) !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
  /*
  #site-navigation-wrap::after {
    content: "";
    display: block;
    height: max(12px, env(safe-area-inset-bottom));
    flex: 0 0 auto;
  }*/
}

/*-------------------------------------------------------------------
  Mobile Avatar Overlay
-------------------------------------------------------------------*/

@media (min-width: 960px) {
  .bv-mobile-avatar-overlay {
    display: none;
  }
}

@media (max-width: 959px) {
  .bv-mobile-avatar-overlay {
    position: relative;
    top: auto;
    right: auto;
    z-index: var(--bv-header-avatar-z);
    pointer-events: auto;
    display: flex;
    flex: 0 0 var(--bv-mobile-avatar-size);
    align-items: center;
    justify-content: center;
    order: 4;
    text-decoration: none;
    transition: transform 180ms ease;
  }

  .bv-mobile-avatar-overlay .bv-avatar {
    width: var(--bv-mobile-avatar-size);
    height: var(--bv-mobile-avatar-size);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    object-fit: cover;
  }
}

/*-------------------------------------------------------------------
  Logout Hover mobile deaktivieren
-------------------------------------------------------------------*/

@media (max-width: 959px), (hover: none) {
  .bv-header .right-menu a.bv-logout-link:hover,
  .bv-header .right-menu a.bv-logout-link:focus,
  .bv-header .right-menu a.bv-logout-link:active {
    background: transparent !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
}


/*Flaggen*/
/* Sprachdropdown */
.bv-lang-dropdown {
    position: relative;
    display: inline-block;
    font-family: sans-serif;
}

.bv-lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;

    background: transparent;
    border: none;
    color: var(--bv-header-text);
    font-size: var(--bv-lang-font-size);
    cursor: pointer;
    padding: 10px 15px;

    transition: var(--bv-menu-transition);
}

.bv-lang-toggle:hover {
    color: var(--bv-accent-hover) !important;
    transform: scale(1.05);
}

/* Menü selbst – optisch wie bv-explore-menu */
.bv-lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    margin: 4px 0 0;
    padding: 0;

    width: max-content;
    min-width: 100%;

    background: var(--bv-header-dropdown-bg);
    color: var(--bv-header-text);

    border: none;
    border-radius: var(--bv-header-dropdown-radius);
    box-shadow: var(--bv-header-dropdown-shadow);

    list-style: none;
    white-space: nowrap;
    z-index: var(--bv-header-dropdown-z);
}

.bv-lang-dropdown.open .bv-lang-menu {
    display: block;
}

.bv-lang-menu li {
    margin: 0;
    padding: 0;
}

/* Spracheintrag – wie Links im Explore-Menü */
.bv-lang-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;

    color: var(--bv-header-text);
    background: transparent;
    text-decoration: none;
    font-size: var(--bv-lang-font-size);

    border-radius: var(--bv-header-item-radius);

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

/* Derselbe Hover-Effekt wie im Explore-Menü */
.bv-lang-menu li a:hover {
    background: var(--bv-accent-soft) !important;
    color: #fff !important;
}

.bv-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}
