/* =========================================================
   Neue Kopfzeile Holzbau Flügge (WordPress-Theme)
   Alle Klassen mit "nh-" – kollidiert nicht mit style.css des Themes
   ========================================================= */
:root {
  --nh-gold: #e4ac00;
  --nh-ink: #0b0b0b;
  --nh-white: #fff;
  --nh-muted: rgba(255,255,255,.72);
  --nh-bg: rgba(228, 172, 0, .9);      /* Button-Gelb, leicht transparent */
  --nh-h: 76px;
  --nh-gutter: clamp(16px, 5vw, 64px);
}
/* Inhalt beginnt unter der Kopfzeile (überschreibt die alten Werte aus style.css/script.js) */
body.nh main, body.nh main.active { margin-top: var(--nh-h) !important; }
body.nh.home main, body.nh.home main.active { margin-top: 0 !important; }
body.admin-bar .nh-header { top: 32px; }
body.admin-bar .nh-panel { top: calc(var(--nh-h) + 32px); }
@media (max-width: 782px) { body.admin-bar .nh-header { top: 46px; } body.admin-bar .nh-panel { top: calc(var(--nh-h) + 46px); } }

.nh-header, .nh-header *, .nh-overlay, .nh-overlay * { box-sizing: border-box; margin: 0; padding: 0; }
.nh-header a, .nh-overlay a { color: inherit; text-decoration: none; }
.nh-header a:hover, .nh-overlay a:hover { text-decoration: none; }

/* ---------- Kopfzeile ---------- */
.nh-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--nh-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--nh-gutter);
  color: var(--nh-white); font-family: "Barlow", system-ui, sans-serif; line-height: 1.2;
  transition: background .35s ease, backdrop-filter .35s ease;
}
.nh-header.nh-scrolled, .nh-header.nh-solid { background: var(--nh-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.nh-logo img { height: 42px; width: auto; display: block; }

.nh-nav { display: flex; align-items: center; height: 100%; gap: clamp(20px, 3vw, 40px); }
.nh-nav > a, .nh-top, .nh-right a, .nh-contrast {
  font-family: "Barlow Condensed", sans-serif; font-weight: 600;
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nh-nav > a::after, .nh-top::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--nh-gold); transition: right .3s ease;
}
.nh-nav > a:hover::after, .nh-nav > a.nh-active::after,
.nh-dd:hover > .nh-top::after, .nh-dd.open > .nh-top::after, .nh-dd.nh-active > .nh-top::after { right: 0; }
.nh-scrolled .nh-nav > a::after, .nh-scrolled .nh-top::after,
.nh-solid .nh-nav > a::after, .nh-solid .nh-top::after { background: var(--nh-white); }

/* ---------- Dropdowns (Desktop) ---------- */
.nh-dd { height: 100%; display: flex; align-items: center; }
.nh-top { background: none; border: 0; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.nh-top svg { width: 10px; height: 10px; transition: transform .25s; }
.nh-dd:hover > .nh-top svg, .nh-dd.open > .nh-top svg { transform: rotate(180deg); }

.nh-panel {
  position: fixed; left: 0; right: 0; top: var(--nh-h);
  background: var(--nh-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid rgba(255,255,255,.18);
  padding: 40px var(--nh-gutter) 48px;
  display: grid; grid-template-columns: 220px 1fr 340px; gap: 48px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.nh-dd:hover .nh-panel, .nh-dd.open .nh-panel, .nh-dd:focus-within .nh-panel { opacity: 1; visibility: visible; transform: none; }
.nh-label { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--nh-white); opacity: .9; }
.nh-label + p { margin-top: 12px; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.88); }
.nh-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; align-content: start; }
.nh-links a {
  font-family: "Barlow Condensed", sans-serif; font-weight: 600;
  font-size: 24px; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.22);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--nh-white); transition: color .2s, padding .2s;
}
.nh-links a::after { content: "→"; color: var(--nh-ink); opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
.nh-links a:hover, .nh-links a[aria-current] { color: var(--nh-ink); padding-left: 6px; }
.nh-links a:hover::after, .nh-links a[aria-current]::after { opacity: 1; transform: none; }
.nh-card { position: relative; display: block; overflow: hidden; }
.nh-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; display: block; }
.nh-card:hover img { transform: scale(1.05); }
.nh-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 60%); }
.nh-card span { position: absolute; z-index: 2; left: 16px; bottom: 14px; color: #fff; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
/* Leistungen: ohne Bild, drei Spalten */
.nh-panel.nh-nocard { grid-template-columns: 220px 1fr; }
.nh-panel.nh-nocard .nh-links { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, auto); grid-auto-flow: column; max-width: 980px; }
/* Unternehmen: Links untereinander, Teamfoto groß */
.nh-panel.nh-team { grid-template-columns: 220px 260px 1fr; }
.nh-panel.nh-team .nh-links { grid-template-columns: 1fr; }
.nh-panel.nh-team .nh-card { height: 300px; }
.nh-panel.nh-team .nh-card img { object-position: center 35%; }
.nh-contact p { font-size: 18px; line-height: 2; color: var(--nh-white); }
.nh-contact a:hover { color: var(--nh-ink); }
.nh-header:has(.nh-dd:hover), .nh-header:has(.nh-dd.open) { background: var(--nh-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.nh-header:has(.nh-dd:hover) .nh-top::after, .nh-header:has(.nh-dd.open) .nh-top::after, .nh-header:has(.nh-dd:hover) .nh-nav > a::after { background: var(--nh-white); }

/* ---------- Rechts: Kontrast, Instagram, Telefon, Burger ---------- */
.nh-right { display: flex; align-items: center; gap: 22px; }
.nh-contrast { background: none; border: 0; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.nh-contrast svg { width: 18px; height: 18px; }
.nh-contrast .nh-txt { font-size: 13px; }
.nh-insta svg { width: 20px; height: 20px; display: block; }
.nh-burger { display: none; background: none; border: 0; color: var(--nh-white); cursor: pointer; width: 32px; height: 32px; }
.nh-burger span { display: block; height: 2px; background: currentColor; margin: 6px 0; transition: transform .3s, opacity .3s; }

/* ---------- Handy-Menü ---------- */
.nh-overlay {
  position: fixed; inset: 0; z-index: 999; background: var(--nh-ink); color: var(--nh-white);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: calc(var(--nh-h) + 24px) var(--nh-gutter) 40px; overflow-y: auto;
  font-family: "Barlow", system-ui, sans-serif; line-height: 1.2;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
body.nh-menu-open { overflow: hidden; }
body.nh-menu-open .nh-overlay { opacity: 1; pointer-events: auto; }
body.nh-menu-open .nh-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nh-menu-open .nh-burger span:nth-child(2) { opacity: 0; }
body.nh-menu-open .nh-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nh-overlay > a, .nh-m-top {
  font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 30px; letter-spacing: .08em; text-transform: uppercase;
}
.nh-overlay > a { display: block; border-bottom: 1px solid rgba(255,255,255,.12); padding: 16px 0; }
.nh-m-item { border-bottom: 1px solid rgba(255,255,255,.12); }
.nh-m-top { width: 100%; background: none; border: 0; color: var(--nh-white); cursor: pointer; text-align: left; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; }
.nh-m-top svg { width: 14px; height: 14px; transition: transform .25s; }
.nh-m-item.open .nh-m-top svg { transform: rotate(180deg); }
.nh-m-item.open .nh-m-top { color: var(--nh-gold); }
.nh-m-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.nh-m-item.open .nh-m-sub { grid-template-rows: 1fr; }
.nh-m-sub > div { overflow: hidden; }
.nh-m-sub a { display: block; padding: 8px 0 8px 16px; font-size: 18px; font-weight: 500; color: var(--nh-muted); border-left: 2px solid rgba(228,172,0,.5); }
.nh-m-sub > div > a:last-child { margin-bottom: 18px; }
.nh-m-sub a:hover, .nh-m-sub a[aria-current] { color: var(--nh-white); }
.nh-m-extra { display: flex; gap: 22px; align-items: center; margin-top: 28px; color: var(--nh-muted); }
.nh-m-extra .nh-contrast .nh-txt { font-size: 15px; }


@media (max-width: 1100px) and (min-width: 901px) {
  .nh-panel { grid-template-columns: 1fr 300px; }
  .nh-panel.nh-team { grid-template-columns: 220px 1fr; }
  .nh-panel > .nh-intro { display: none; }
  .nh-right .nh-phone, .nh-right .nh-contrast .nh-txt { display: none; }
}
@media (max-width: 900px) {
  .nh-nav, .nh-right .nh-phone, .nh-right .nh-contrast, .nh-right .nh-insta { display: none; }
  .nh-burger { display: block; }
  .nh-logo img { height: 34px; }
}

/* ---------- Kontrastmodus ---------- */
body.contrast { --nh-gold: #fff; --nh-bg: #000; }
body.contrast .nh-header, body.contrast .nh-header.nh-scrolled { background: #000; }
body.contrast .nh-links a:hover, body.contrast .nh-links a[aria-current],
body.contrast .nh-contact a:hover { color: #fff; text-decoration: underline; }
body.contrast .nh-links a::after { color: #fff; }
.nh-header :focus-visible, .nh-overlay :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
