/* ============================================================
   GRÜNDER PILOTEN — Header + Mega Menu
   ============================================================ */
:root {
  --gp-navy:     #00253A;
  --gp-blue:     #009EDE;
  --gp-blue2:    #007BB5;
  --gp-beige:    #EEEDE7;
  --gp-beige2:   #F5F4EF;
  --gp-white:    #FFFFFF;
  --gp-font:     'Montserrat', -apple-system, sans-serif;
  --gp-h:        72px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--gp-font); -webkit-font-smoothing: antialiased; }

/* ── Header shell ───────────────────────────────────────────── */
#gp-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--gp-navy);
  height: var(--gp-h);
  box-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.gp-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 32px; height: 100%;
  display: flex; align-items: center; gap: 28px;
}

/* ── Logo ───────────────────────────────────────────────────── */
.gp-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.gp-logo img { height: 40px; width: auto; display: block; }

/* ── Desktop nav shell ──────────────────────────────────────── */
.gp-nav { flex: 1; display: flex; justify-content: center; }
#gp-header .gp-nav-list,
#gp-header .gp-nav-list li { list-style: none !important; margin: 0; padding: 0; }
#gp-header .gp-nav-list { display: flex; align-items: center; gap: 2px; }

/* Direct anchor links in nav */
#gp-header .gp-nav-list > li > a,
#gp-header .gp-nav-list > li > a:link,
#gp-header .gp-nav-list > li > a:visited {
  display: block; padding: 8px 14px;
  font-family: var(--gp-font); font-size: 13.5px; font-weight: 600;
  color: rgba(255,255,255,.8) !important;
  text-decoration: none !important; border-radius: 8px;
  transition: color .18s, background .18s; white-space: nowrap;
}
#gp-header .gp-nav-list > li > a:hover { color: #fff !important; background: rgba(255,255,255,.09); }

/* Trigger buttons */
.gp-nav-trigger {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--gp-font); font-size: 13.5px; font-weight: 600;
  color: rgba(255,255,255,.8); border-radius: 8px;
  transition: color .18s, background .18s; white-space: nowrap;
}
.gp-nav-trigger:hover,
.gp-has-mega.is-open .gp-nav-trigger { color: #fff; background: rgba(255,255,255,.09); }

.gp-chevron { width: 11px; height: 11px; flex-shrink: 0; transition: transform .22s; }
.gp-has-mega.is-open .gp-chevron,
.gp-has-mega:hover .gp-chevron { transform: rotate(180deg); }

/* ── Mega menu panel ────────────────────────────────────────── */
.gp-has-mega { position: relative; }

.gp-mega {
  position: absolute;
  top: calc(100% + 4px); right: 0; left: auto;
  background: var(--gp-white);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,37,58,.14), 0 0 0 1px rgba(0,37,58,.07);
  min-width: 520px;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s .15s, transform .2s .15s;
  z-index: 999;
}
.gp-mega--sm { min-width: 380px; }

/* Hover open (desktop) */
@media (min-width: 961px) {
  .gp-has-mega:hover .gp-mega {
    opacity: 1; pointer-events: auto; transform: translateY(0);
    transition: opacity .15s 0s, transform .15s 0s;
  }
  /* Bridge pseudo-element fills gap between trigger and panel */
  .gp-has-mega::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    height: 20px;
  }
}
/* Click open (JS) */
.gp-has-mega.is-open .gp-mega {
  opacity: 1; pointer-events: auto; transform: translateY(0);
  transition: opacity .15s 0s, transform .15s 0s;
}

/* Caret */
.gp-mega::before {
  content: ''; position: absolute;
  top: -6px; right: 26px;
  width: 12px; height: 12px;
  background: var(--gp-white);
  transform: rotate(45deg); border-radius: 2px;
  box-shadow: -2px -2px 4px rgba(0,37,58,.05);
}

.gp-mega-inner {
  display: flex; gap: 0; padding: 22px;
  position: relative; z-index: 1;
}

/* Columns */
.gp-mega-col { flex: 1; padding: 0 14px; }
.gp-mega-col:first-child { padding-left: 0; }
.gp-mega-col:last-child { padding-right: 0; }
.gp-mega-col--full { flex: 1; padding: 0; }

.gp-mega-divider { width: 1px; background: rgba(0,37,58,.08); flex-shrink: 0; margin: 0 6px; }

.gp-mega-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--gp-blue);
  margin-bottom: 12px; padding-left: 2px;
}

/* Cards */
.gp-mega-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 10px; border-radius: 11px;
  text-decoration: none !important; margin-bottom: 4px;
  transition: background .15s;
}
.gp-mega-card:hover { background: var(--gp-beige2); }
.gp-mega-card:last-of-type { margin-bottom: 0; }

.gp-mega-card-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(0,158,222,.1); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.gp-mega-card-icon svg { width: 18px; height: 18px; }
.gp-mega-card-icon--accent { background: rgba(0,158,222,.15); }

.gp-mega-card-title { font-size: 13.5px; font-weight: 700; color: var(--gp-navy); margin-bottom: 2px; line-height: 1.2; }
.gp-mega-card-desc { font-size: 11.5px; color: #5a7282; line-height: 1.45; }

/* Accent card (Förderfähigkeit) */
.gp-mega-card--accent { border: 1px solid rgba(0,158,222,.18); background: rgba(0,158,222,.04); }
.gp-mega-card--accent:hover { background: rgba(0,158,222,.09); }
.gp-mega-card--accent .gp-mega-card-title { color: var(--gp-blue); }

/* Hint box */
.gp-mega-hint {
  margin-top: 14px; padding: 13px 14px;
  background: var(--gp-navy); border-radius: 11px;
}
.gp-mega-hint-text { font-size: 10.5px; color: rgba(255,255,255,.4); font-weight: 600; margin-bottom: 6px; }
.gp-mega-hint-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700;
  color: var(--gp-blue) !important; text-decoration: none !important;
  transition: color .15s;
}
.gp-mega-hint-link:hover { color: #fff !important; }
.gp-mega-hint-link svg { width: 11px; height: 11px; }

/* Link rows */
.gp-mega-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--gp-navy) !important; text-decoration: none !important;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.gp-mega-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.gp-mega-link:hover { background: var(--gp-beige2); color: var(--gp-blue) !important; }

/* ── Desktop CTA button ─────────────────────────────────────── */
.gp-header-cta {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 10px 22px;
  background: var(--gp-blue); color: var(--gp-white) !important;
  font-family: var(--gp-font); font-size: 13.5px; font-weight: 700;
  text-decoration: none !important; border-radius: 10px;
  transition: background .2s, transform .15s; white-space: nowrap;
}
.gp-header-cta:hover { background: var(--gp-blue2); color: var(--gp-white) !important; transform: translateY(-1px); }

/* ── Hamburger ──────────────────────────────────────────────── */
.gp-hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 40px; height: 40px;
  background: transparent !important; border: none !important;
  cursor: pointer; padding: 4px; margin-left: auto;
  flex-shrink: 0; border-radius: 0 !important; box-shadow: none !important;
}
.gp-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gp-white); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.gp-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gp-hamburger.is-open span:nth-child(2) { opacity: 0; }
.gp-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile ─────────────────────────────────────────────────── */
.gp-nav-mobile-cta { display: none; }

@media (max-width: 960px) {
  /* Show hamburger, hide desktop elements */
  .gp-hamburger { display: flex; }
  .gp-header-cta { display: none; }

  /* Mobile nav drawer */
  .gp-nav {
    position: fixed;
    top: var(--gp-h); left: 0; right: 0;
    background: var(--gp-navy);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 8px 16px 24px;
    flex-direction: column;
    align-items: stretch;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility 0s .25s;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
    z-index: 999;
    overflow-y: auto;
    max-height: calc(100vh - var(--gp-h));
  }
  .gp-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .25s, transform .25s, visibility 0s 0s;
  }

  /* Nav list stacked */
  .gp-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  /* Trigger */
  .gp-nav-trigger {
    width: 100%;
    justify-content: space-between;
    text-align: left !important;
    font-size: 15px;
    padding: 13px 14px;
    color: rgba(255,255,255,.88);
    border-radius: 10px;
    white-space: normal !important;
  }
  .gp-has-mega.is-open > .gp-nav-trigger {
    color: #fff;
    background: rgba(255,255,255,.08);
  }

  /* Chevron */
  .gp-has-mega:hover .gp-chevron { transform: none; }
  .gp-has-mega.is-open > .gp-nav-trigger .gp-chevron { transform: rotate(180deg); }

  /* Accordion panel — override ALL desktop styles */
  .gp-mega,
  .gp-mega--sm {
    all: unset;
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .2s;
    background: rgba(255,255,255,.06);
    border-radius: 12px;
    margin: 2px 0 6px;
  }
  .gp-mega::before { display: none !important; }
  .gp-has-mega.is-open > .gp-mega {
    max-height: 800px;
    opacity: 1;
  }

  /* Disable desktop hover */
  .gp-has-mega:hover > .gp-mega { max-height: 0; opacity: 0; }
  .gp-has-mega.is-open:hover > .gp-mega { max-height: 800px; opacity: 1; }

  /* Inner layout — vertical */
  .gp-mega-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 14px 14px;
  }

  /* Columns */
  .gp-mega-col,
  .gp-mega-col--full {
    padding: 10px 0 0 !important;
    flex: none;
  }
  .gp-mega-col:first-child { padding-top: 4px !important; }
  .gp-mega-divider { display: none; }

  /* Labels */
  .gp-mega-label {
    color: rgba(255,255,255,.38);
    margin-bottom: 6px;
  }

  /* Cards */
  .gp-mega-card {
    padding: 10px 8px;
    border-radius: 10px;
    background: transparent;
    border: none;
  }
  .gp-mega-card:hover { background: rgba(255,255,255,.07); }
  .gp-mega-card--accent {
    border: 1px solid rgba(0,158,222,.25) !important;
    background: rgba(0,158,222,.08) !important;
  }
  .gp-mega-card-title { color: rgba(255,255,255,.92); }
  .gp-mega-card--accent .gp-mega-card-title { color: var(--gp-blue); }
  .gp-mega-card-desc { color: rgba(255,255,255,.38); }

  /* Hint box */
  .gp-mega-hint { background: rgba(0,158,222,.12); border-radius: 10px; }

  /* Links */
  .gp-mega-link {
    color: rgba(255,255,255,.78) !important;
    border-radius: 9px;
  }
  .gp-mega-link:hover { background: rgba(255,255,255,.07); color: #fff !important; }

  /* Mobile CTA */
  .gp-nav-mobile-cta {
    display: block;
    margin-top: 14px;
    padding: 14px 20px;
    background: var(--gp-blue);
    color: var(--gp-white) !important;
    font-family: var(--gp-font);
    font-size: 15px; font-weight: 700;
    text-decoration: none !important;
    border-radius: 10px; text-align: center;
  }
  .gp-nav-mobile-cta:hover { background: var(--gp-blue2); }
}


@media (max-width: 480px) {
  .gp-header-inner { padding: 0 16px; gap: 12px; }
  .gp-logo img { height: 34px; }
}
