/* ============================================================
   SYNOVA Header Widget — Premium Glass Nav + Mega-Menu + Live Clock
   ============================================================ */

.nh-wrap, .nh-wrap *, .nh-mobile, .nh-mobile * { box-sizing: border-box; }

.nh-wrap {
  --bg:      #0a0805;
  --fg:      #f3e6d2;
  --fg-mute: rgba(243,230,210,0.7);
  --gold:    #d4af7f;
  --gold-2:  #b8966e;
  --line:    rgba(184,150,110,0.15);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  font-family: var(--sans);
  transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
  /* Initial-Hintergrund — sanftes Dunkel mit Blur, damit der Header nie auf Weiß sitzt.
     Beim Scrollen verstärkt sich der Glass-Effekt (.nh-scrolled). */
  background: rgba(10, 8, 5, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* Animierter Lichtbalken oben */
.nh-beam {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, transparent 20%, rgba(184,150,110,0.5) 35%, rgba(212,175,127,0.95) 50%, rgba(184,150,110,0.5) 65%, transparent 80%, transparent 100%);
  background-size: 200% 100%;
  animation: nh-beam 7s linear infinite;
}
@keyframes nh-beam { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.nh-wrap.nh-scrolled {
  background: rgba(10, 8, 5, 0.78);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom-color: rgba(184,150,110,0.12);
}

.nh-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.15rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 0.4s ease;
}
.nh-wrap.nh-scrolled .nh-inner { padding: 0.75rem 2rem; }

/* ===== Logo ===== */
.nh-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--fg);
  line-height: 1;
}
.nh-logo-mark { position: relative; width: 42px; height: 42px; flex-shrink: 0; }
.nh-logo-mark svg { width: 42px; height: 42px; display: block; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.nh-logo:hover .nh-logo-mark svg { transform: rotate(90deg); }

.nh-logo-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
}
.nh-logo-thin {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.32em;
}
.nh-logo-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(212,175,127,0.8);
  margin-left: 0.5rem;
  animation: nh-dot-pulse 2s ease-in-out infinite;
}
@keyframes nh-dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}

/* ===== Navigation ===== */
.nh-nav-wrap { position: relative; }
.nh-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0; padding: 4px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Aktive-Item Indikator (gleitender Goldhintergrund) */
.nh-nav-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  background: rgba(212,175,127,0.12);
  border: 1px solid rgba(212,175,127,0.35);
  border-radius: 999px;
  transition: transform 0.4s cubic-bezier(.2,.85,.25,1), width 0.4s cubic-bezier(.2,.85,.25,1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.nh-nav:hover .nh-nav-indicator,
.nh-nav.has-active .nh-nav-indicator { opacity: 1; }

.nh-nav-item { position: relative; z-index: 1; }
.nh-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  color: var(--fg-mute);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.nh-nav-link:hover { color: var(--fg); }
.nh-nav-caret {
  width: 13px; height: 13px;
  opacity: 0.6;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nh-nav-item:hover .nh-nav-caret,
.nh-nav-item--open .nh-nav-caret { transform: rotate(180deg); opacity: 1; color: var(--gold); }

/* ===== MEGA-MENU ===== */
.nh-mega {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 720px;
  background: rgba(10,8,5,0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.2,.85,.25,1), visibility 0.3s;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  z-index: 100;
}
.nh-mega::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px;
  background: rgba(10,8,5,0.94);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.nh-nav-item--open .nh-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nh-mega-inner { display: grid; gap: 1.5rem; }
.nh-mega-head { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.nh-mega-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.nh-mega-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--fg);
}
.nh-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.nh-mega-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr 20px;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(.2,.85,.25,1);
  opacity: 0;
  transform: translateY(8px);
}
.nh-nav-item--open .nh-mega-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease var(--d, 0ms), transform 0.4s cubic-bezier(.2,.85,.25,1) var(--d, 0ms), background 0.3s ease, border-color 0.3s ease;
}
.nh-mega-card:hover {
  background: rgba(212,175,127,0.06);
  border-color: var(--line);
}
.nh-mega-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold);
  padding-top: 0.18em;
}
.nh-mega-card-title {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 0.25rem;
}
.nh-mega-card-desc {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--fg-mute);
  grid-column: 2;
}
.nh-mega-arrow {
  align-self: center;
  display: inline-flex;
  color: var(--gold);
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(.2,.85,.25,1);
}
.nh-mega-arrow svg { width: 16px; height: 16px; }
.nh-mega-card:hover .nh-mega-arrow { opacity: 1; transform: translateX(3px); }

/* ===== Actions (right side) ===== */
.nh-actions { display: flex; align-items: center; gap: 0.85rem; }

/* Live Clock */
.nh-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
}
.nh-clock-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  animation: nh-clock-pulse 2.5s ease-in-out infinite;
}
@keyframes nh-clock-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.nh-clock-time {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.nh-clock-label {
  color: rgba(243,230,210,0.4);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.62rem;
}

/* CTA Button */
.nh-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.nh-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.nh-cta > * { position: relative; z-index: 1; }
.nh-cta:hover {
  transform: translateY(-1px);
  color: var(--bg);
  box-shadow: 0 10px 28px rgba(212,175,127,0.4);
}
.nh-cta:hover::before { transform: translateY(0); }
.nh-cta svg {
  width: 14px; height: 14px;
  transition: transform 0.3s ease;
}
.nh-cta:hover svg { transform: translateX(3px); }

/* ===== Burger ===== */
.nh-burger {
  display: none;
  width: 42px; height: 42px;
  background: rgba(184,150,110,0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nh-burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nh-burger span:nth-child(1) { transform: translate(-50%, -6px); }
.nh-burger span:nth-child(2) { transform: translate(-50%, -50%); width: 12px; }
.nh-burger span:nth-child(3) { transform: translate(-50%, 5px);  }
.nh-wrap.nh-open .nh-burger span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg);  width: 18px; }
.nh-wrap.nh-open .nh-burger span:nth-child(2) { opacity: 0; transform: translate(-50%, -50%) scaleX(0); }
.nh-wrap.nh-open .nh-burger span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); width: 18px; }

/* ===== Mobile Sheet ===== */
.nh-mobile {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(184,150,110,0.18), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(122,82,48,0.18), transparent 60%),
    rgba(10, 8, 5, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  padding: 6rem 1.75rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  font-family: 'DM Sans', sans-serif;
}
.nh-wrap.nh-open ~ .nh-mobile { transform: translateY(0); pointer-events: auto; }

.nh-mobile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nh-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0.5rem;
  color: #f3e6d2;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(184,150,110,0.1);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.25s ease;
}
.nh-mobile-arrow { font-family: 'DM Sans', sans-serif; color: rgba(184,150,110,0.45); transition: transform 0.25s ease, color 0.25s ease; }
.nh-mobile-link:hover { color: #d4af7f; }
.nh-mobile-link:hover .nh-mobile-arrow { color: #d4af7f; transform: translateX(6px); }

.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link { opacity: 1; transform: translateX(0); }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link { transition-delay: calc(0.08s * var(--i, 0)); }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(1) { --i: 1; }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(2) { --i: 2; }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(3) { --i: 3; }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(4) { --i: 4; }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(5) { --i: 5; }
.nh-wrap.nh-open ~ .nh-mobile .nh-mobile-link:nth-child(6) { --i: 6; }

.nh-mobile-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.nh-mobile-clock {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(243,230,210,0.55);
}
.nh-mobile-clock .nh-clock-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.6); animation: nh-clock-pulse 2.5s ease-in-out infinite; }
.nh-mobile-meta {
  color: rgba(184,150,110,0.55);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  padding-left: 0.4em;
}

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .nh-nav-wrap { display: none; }
  .nh-burger { display: block; }
  .nh-inner { padding: 1rem 1.25rem; }
}
@media (max-width: 720px) {
  .nh-clock { display: none; }
  .nh-cta { padding: 0.55rem 0.95rem; font-size: 0.78rem; }
  .nh-cta svg { width: 12px; height: 12px; }
}
@media (max-width: 480px) {
  .nh-logo-name { font-size: 1.05rem; letter-spacing: 0.32em; padding-left: 0.32em; }
  .nh-logo-mark, .nh-logo-mark svg { width: 36px; height: 36px; }
  .nh-cta span { display: none; }
  .nh-cta { padding: 0.55rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nh-beam, .nh-logo-dot, .nh-clock-dot { animation: none; }
  .nh-logo:hover .nh-logo-mark svg { transform: none; }
}
