:root {
  --gc-bg: rgba(244, 246, 248, 0.9);
  --gc-line: #d9dfe6;
  --gc-line-strong: #bec8d2;
  --gc-text: #49525d;
  --gc-text-muted: #7a8490;
  --gc-brand: #247f66;
  --gc-brand-dark: #1d6652;
  --gc-surface: #ffffff;
  --gc-shadow: 0 20px 44px rgba(14, 24, 34, 0.14);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  background: var(--gc-bg);
  border-bottom: 1px solid var(--gc-line);
}

.site-topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  padding-block: 0.65rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--gc-line-strong);
  background: #fff;
  color: var(--gc-text);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.site-nav a,
.site-nav button {
  text-decoration: none;
  color: var(--gc-text);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.site-nav a:hover,
.site-nav button:hover {
  color: var(--gc-brand);
  border-color: var(--gc-line);
  background: #fff;
}

.site-nav a.active,
.site-nav button.active {
  color: var(--gc-brand);
  background: #fff;
  border-color: var(--gc-line-strong);
}

.site-nav .nav-cta {
  background: linear-gradient(120deg, var(--gc-brand), #3f9f86);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.site-nav .nav-cta:hover {
  background: linear-gradient(120deg, var(--gc-brand-dark), var(--gc-brand));
  color: #fff;
}

.menu-shell {
  position: relative;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.menu-trigger::after {
  content: "▾";
  font-size: 0.72rem;
  transform: translateY(-1px);
}

.menu-shell.open .menu-trigger::after {
  content: "▴";
}

.menu-dropdown {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: min(940px, calc(100vw - 2rem));
  background: var(--gc-surface);
  border: 1px solid var(--gc-line);
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(14, 24, 34, 0.18);
  padding: 1.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.menu-shell.open .menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.9fr);
  align-items: stretch;
}

.mega-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr;
}

.mega-group {
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  min-height: 100%;
}

.mega-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gc-brand);
  margin-bottom: 0.5rem;
}

.mega-list {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mega-item,
.mega-item:link,
.mega-item:visited {
  display: block;
  text-decoration: none;
  color: var(--gc-text);
  border: 1px solid rgba(190, 200, 210, 0.7);
  border-radius: 14px;
  padding: 0.8rem 0.88rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  min-height: 100%;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.mega-item small {
  display: block;
  margin-top: 0.28rem;
  font-weight: 500;
  color: var(--gc-text-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.mega-item:hover,
.mega-item:focus-visible {
  color: var(--gc-brand);
  border-color: rgba(36, 127, 102, 0.28);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 24, 34, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.mega-item.is-placeholder {
  opacity: 0.72;
  cursor: not-allowed;
}

.mega-item.is-placeholder:hover,
.mega-item.is-placeholder:focus-visible {
  color: var(--gc-text);
  border-color: transparent;
  background: transparent;
}

.mega-preview {
  border: 1px solid var(--gc-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
}

.mega-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid var(--gc-line);
  object-fit: contain;
  background: linear-gradient(180deg, #eef3f7 0%, #e7edf3 100%);
  padding: 0.3rem;
}

.mega-preview strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--gc-text);
}

.mega-preview p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gc-text-muted);
}

.menu-dropdown[id="mega-leistungen"] .mega-preview img {
  object-fit: cover;
  object-position: center;
}

.menu-dropdown[id="mega-company"] {
  width: min(560px, calc(100vw - 2rem));
}

.menu-dropdown[id="mega-company"] .mega-layout {
  grid-template-columns: 1fr;
}

.menu-dropdown[id="mega-company"] .mega-list {
  grid-template-columns: 1fr;
}

.menu-dropdown[id="mega-company"] .mega-preview {
  display: none;
}

@media (max-width: 1280px) {
  .menu-dropdown {
    width: min(860px, calc(100vw - 2rem));
  }
}

/* Mobile drawer */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 31, 0.44);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 70;
}

.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100dvh;
  background: #fff;
  box-shadow: -12px 0 30px rgba(8, 14, 22, 0.22);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 71;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.show {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--gc-line);
}

.mobile-drawer-head strong {
  font-size: 0.95rem;
}

.mobile-close {
  border: 1px solid var(--gc-line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-drawer-body {
  padding: 0.9rem 1rem 1.2rem;
  overflow-y: auto;
}

.mobile-link {
  display: block;
  text-decoration: none;
  color: var(--gc-text);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.52rem 0;
}

.mobile-accordion {
  border-top: 1px solid var(--gc-line);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.mobile-acc-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.55rem 0;
  text-align: left;
  color: var(--gc-text);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.mobile-acc-toggle::after {
  content: "+";
  font-size: 1rem;
}

.mobile-accordion.open .mobile-acc-toggle::after {
  content: "−";
}

.mobile-acc-panel {
  display: none;
  padding: 0.15rem 0 0.65rem;
}

.mobile-accordion.open .mobile-acc-panel {
  display: block;
}

.mobile-acc-panel a,
.mobile-acc-panel span {
  display: block;
  padding: 0.38rem 0;
  text-decoration: none;
  color: var(--gc-text-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.mobile-acc-panel span {
  opacity: 0.7;
}

body.menu-open {
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: 2.1rem 0 2.8rem;
}

.footer-grid {
  border-top: 1px solid var(--gc-line);
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  color: var(--gc-text-muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.footer-links a {
  color: var(--gc-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--gc-brand);
}

.site-legal-note {
  margin-top: 0.7rem;
  color: var(--gc-text-muted);
  font-size: 0.8rem;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--gc-brand) 62%, #fff 38%);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu-dropdown {
    display: none;
  }

  .mega-layout {
    grid-template-columns: 1fr;
  }

  .mega-list {
    grid-template-columns: 1fr;
  }
}
