/* Global site header – replaces Elementor HTML widget nav */

body.vu-global-nav {
  --vu-header-height: 78px;
}

/* Hide the old page-level Elementor nav (homepage HTML widget) */
body.vu-global-nav .elementor-element.links-nav {
  display: none !important;
}

/* Kill Hello Elementor default header/footer chrome */
body.vu-global-nav .site-header,
body.vu-global-nav .site-footer,
body.vu-global-nav .dynamic-footer {
  display: none !important;
}

.vu-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  width: 100%;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

.vu-site-header.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vu-site-header .vu-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  box-sizing: border-box;
}

.vu-site-header .vu-logo img {
  display: block;
  height: auto;
  max-height: 50px;
  width: auto;
}

.vu-site-header .vu-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.vu-site-header .vu-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
  position: relative;
}

/* Dropdown: Kontaktpakete → children */
.vu-site-header .vu-menu .menu-item-has-children > a {
  padding-right: 0.85rem;
}

.vu-site-header .vu-menu .menu-item-has-children > a::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.7;
}

.vu-site-header .vu-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 12.5rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(90, 92, 97, 0.12);
  box-shadow: 0 10px 28px rgba(90, 92, 97, 0.12);
  z-index: 80;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.vu-site-header .vu-menu .sub-menu li {
  display: block;
  width: 100%;
}

.vu-site-header .vu-menu .sub-menu a {
  display: block;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
  font-size: 14px;
}

.vu-site-header .vu-menu .sub-menu a::after {
  display: none;
}

.vu-site-header .vu-menu .menu-item-has-children:hover > .sub-menu,
.vu-site-header .vu-menu .menu-item-has-children:focus-within > .sub-menu,
.vu-site-header .vu-menu .menu-item-has-children.is-open > .sub-menu {
  display: flex;
}

.vu-site-header .vu-menu a {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.2;
  color: #5A5C61;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transform: none !important;
  transition: color 0.25s ease;
}

.vu-site-header .vu-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--primary, #D7725B);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  opacity: 0.9;
}

.vu-site-header .vu-menu a:hover {
  color: var(--primary, #D7725B);
}

.vu-site-header .vu-menu a:hover::after {
  transform: scaleX(1);
}

/* ——— Footer (left-aligned, same inset as header) ——— */
.vu-site-footer {
  background: #fff;
  border-top: 1px solid rgba(90, 92, 97, 0.12);
  padding: 2rem 0;
  text-align: left !important;
}

.vu-site-footer__inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "logo meta nav"
    "copy copy copy";
  align-items: center;
  justify-items: start;
  gap: 1rem 2.5rem;
  text-align: left !important;
}

.vu-site-footer__logo {
  grid-area: logo;
  justify-self: start;
  text-align: left;
}

.vu-site-footer__logo img {
  display: block;
  max-height: 44px;
  width: auto;
  margin: 0;
}

.vu-site-footer__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  text-align: left !important;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--text, #5A5C61);
}

.vu-site-footer__meta a {
  color: var(--text, #5A5C61);
  text-decoration: none;
}

.vu-site-footer__meta a:hover {
  color: var(--primary, #D7725B);
}

.vu-site-footer__sep {
  opacity: 0.45;
}

.vu-site-footer__nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  justify-content: flex-end;
  justify-self: end;
  text-align: left;
}

.vu-site-footer__nav a {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  color: var(--accent, #457A79);
  text-decoration: none;
  font-weight: 500;
}

.vu-site-footer__nav a:hover {
  color: var(--primary, #D7725B);
}

.vu-site-footer__copy {
  grid-area: copy;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(90, 92, 97, 0.1);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  color: rgba(90, 92, 97, 0.75);
  text-align: left !important;
  justify-self: start;
  width: 100%;
}

body.error404 .vu-site-footer {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(90, 92, 97, 0.1);
}

@media (max-width: 768px) {
  .vu-site-footer__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "meta"
      "nav"
      "copy";
    gap: 1rem;
    justify-items: start;
    text-align: left !important;
  }

  .vu-site-footer__nav {
    justify-content: flex-start;
    justify-self: start;
  }

  .vu-site-footer__logo,
  .vu-site-footer__meta,
  .vu-site-footer__copy {
    justify-self: start;
    text-align: left !important;
  }
}

/* Hidden until ready (Hausverwaltungen) – remove class in Appearance → Menus to show */
.vu-site-header .vu-menu .vu-menu-item--hidden,
.vu-site-header .vu-menu .menu-item.vu-menu-item--hidden {
  display: none !important;
}

.vu-site-header .vu-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.vu-site-header .vu-burger .bar {
  width: 100%;
  height: 3px;
  background: #5A5C61;
  border-radius: 2px;
  margin: 3px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .vu-site-header .vu-logo img {
    max-height: 44px;
  }

  .vu-site-header .vu-burger {
    display: flex;
  }

  .vu-site-header .vu-nav {
    justify-content: space-between;
    align-items: center;
  }

  .vu-site-header .vu-menu {
    display: none;
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    gap: 1rem;
    border-radius: 0 0 10px 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .vu-site-header .vu-nav.open {
    background: #fff;
  }

  .vu-site-header .vu-nav.open .vu-menu {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  .vu-site-header .vu-menu .menu-item-has-children {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .vu-site-header .vu-menu .sub-menu {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.5rem 0 0;
    display: none;
    align-items: center;
    gap: 0.65rem;
  }

  .vu-site-header .vu-menu .menu-item-has-children.is-open > .sub-menu {
    display: flex;
  }

  .vu-site-header .vu-menu .sub-menu a {
    padding: 0.35rem 0.5rem;
    text-align: center;
  }

  .vu-site-header .vu-nav.open .vu-burger .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .vu-site-header .vu-nav.open .vu-burger .bar:nth-child(2) {
    opacity: 0;
  }

  .vu-site-header .vu-nav.open .vu-burger .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
