:root {
  --header-blue: #294a70;
  --header-blue-dark: #203d5e;
  --header-blue-light: #365d88;
  --header-white: #ffffff;
  --header-text-muted: rgba(255, 255, 255, 0.78);
  --header-accent: #c7a76a;
  --header-shadow: 0 12px 35px rgba(12, 29, 48, 0.16);
}


main {
  padding-top: 130px;
}

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

.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--header-blue-dark) 0%,
    var(--header-blue) 58%,
    #31557e 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-header::after {
  position: absolute;
  right: 8%;
  bottom: 0;
  width: 160px;
  height: 2px;
  content: "";
  background: linear-gradient(
    90deg,
    transparent,
    var(--header-accent),
    transparent
  );
  opacity: 0.8;
}

.site-header .container {
  width: min(100% - 40px, 1320px);
  max-width: 1320px;
  margin-inline: auto;
}

.header-inner {
  min-height: 150px;
  gap: 50px;
}

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

.site-logo {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.site-logo .frame,
.site-logo .frame-group-container,
.site-logo .frame-group-inner,
.site-logo .frame-container,
.site-logo .frame-inner,
.site-logo .textmedia,
.site-logo .gallery-row,
.site-logo .gallery-item,
.site-logo figure {
  margin: 0;
  padding: 0;
}

.site-logo a {
  display: block;
}

.site-logo img {
  display: block;
  width: clamp(220px, 20vw, 300px);
  height: auto;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.site-logo a:hover img {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* =========================================================
   DESKTOP-NAVIGATION
   ========================================================= */

.desktop-menu {
  margin-left: auto;
}

.navilo {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.navilo > .nav-item {
  position: relative;
}

.navilo > .nav-item > a,
.navilo > .nav-item > .submenu-toggle {
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 10px 5px;
  border: 0;
  background: transparent;
  color: var(--header-white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.22s ease,
    opacity 0.22s ease;
}

.navilo > .nav-item > a::after,
.navilo > .nav-item > .submenu-toggle::after {
  position: absolute;
  right: 5px;
  bottom: 3px;
  left: 5px;
  height: 2px;
  content: "";
  background: var(--header-accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.28s ease;
}

.navilo > .nav-item:hover > a::after,
.navilo > .nav-item:hover > .submenu-toggle::after,
.navilo > .nav-item > a:focus-visible::after,
.navilo > .nav-item > .submenu-toggle:focus-visible::after,
.navilo > .nav-item.active > a::after,
.navilo > .nav-item.current > a::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.navilo > .nav-item:hover > a,
.navilo > .nav-item:hover > .submenu-toggle,
.navilo > .nav-item > a:focus-visible,
.navilo > .nav-item > .submenu-toggle:focus-visible {
  color: #fff;
}

/* Kontakt als dezenter Button */

.navilo > .nav-contact > a {
  min-height: 44px;
  margin-left: 8px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.navilo > .nav-contact > a::after {
  display: none;
}

.navilo > .nav-contact > a:hover,
.navilo > .nav-contact > a:focus-visible {
  border-color: var(--header-accent);
  background: var(--header-accent);
  color: var(--header-blue-dark);
  transform: translateY(-1px);
}

/* =========================================================
   DROPDOWN
   ========================================================= */

.menu-arrow {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.22s ease;
}

.has-sub:hover .menu-arrow,
.has-sub.is-open .menu-arrow {
  transform: translateY(3px) rotate(225deg);
}

.sub2 {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  width: min(360px, 90vw);
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(36, 70, 105, 0.11);
  border-radius: 5px;
  background: #fff;
  box-shadow: var(--header-shadow);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

/* Unsichtbare Hover-Brücke */

.sub2::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 16px;
  content: "";
}

.sub2::after {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(36, 70, 105, 0.11);
  border-left: 1px solid rgba(36, 70, 105, 0.11);
  background: #fff;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.has-sub:hover > .sub2,
.has-sub:focus-within > .sub2,
.has-sub.is-open > .sub2 {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.sub2 .sub-item + .sub-item {
  border-top: 1px solid rgba(36, 70, 105, 0.08);
}

.sub2 .sub-item a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 11px 14px 11px 34px;
  border-radius: 3px;
  color: #263d55;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    padding-left 0.2s ease;
}

.sub2 .sub-item a::before {
  position: absolute;
  left: 15px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--header-accent);
  border-right: 1.5px solid var(--header-accent);
  content: "";
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.sub2 .sub-item a:hover,
.sub2 .sub-item a:focus-visible {
  padding-left: 38px;
  background: #f2f5f8;
  color: var(--header-blue);
}

.sub2 .sub-item a:hover::before,
.sub2 .sub-item a:focus-visible::before {
  transform: translateX(3px) rotate(45deg);
}

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

.navilo a:focus-visible,
.submenu-toggle:focus-visible,
.mobile-toggle:focus-visible {
  outline: 2px solid var(--header-accent);
  outline-offset: 5px;
}

/* =========================================================
   MOBILE-BUTTON
   ========================================================= */

.mobile-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 3px;
  color: #fff;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.mobile-toggle:hover {
  border-color: var(--header-accent);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 5px;
  background: currentColor;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {
  .header-inner {
    min-height: 120px;
  }

  .site-logo img {
    width: 240px;
  }
}

@media (max-width: 767.98px) {
  .site-header .container {
    width: min(100% - 30px, 1320px);
  }

  .header-inner {
    min-height: 96px;
  }

  .site-logo img {
    width: clamp(185px, 56vw, 230px);
  }

  .mobile-toggle {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}