/* ============================================================
   Brand — Logo + Icon + Nav Toggle (inside #site-header)
   HTML: <div id="brand"> > #icon + #logo + #nav-toggle
   ============================================================ */

/* --- Icon (favicon / small brand mark) --- */

/* Breite nach Seitenverhältnis, Höhe wie das Logo (Dirk 09.11.2026, compact: „Icon und Logo müssten gleich hoch sein“) —
   vorher quadratischer Kasten: ein breites Bildzeichen (Haus) wurde darin auf 46 statt 56 px verkleinert. */
#icon {
  flex-shrink: 0;
  width: auto;
  height: var(--header-height);
}

#icon a {
  display: block;
  height: 100%;
}

#icon img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

/* --- Logo (full wordmark) --- */

#logo {
  flex: 1;
  min-width: 0;
  height: var(--header-height);
  overflow: hidden;
}

#logo a {
  display: block;
  height: 100%;
}

#logo picture,
#logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Logo und Icon für dunklen Hintergrund (img.logo-dark / img.icon-dark, nur mit hochgeladener logo-footer.svg bzw.
   icon-dark.svg): standardmäßig aus. Drei IDs, damit Kunden-Regeln wie `#site-header #brand > #icon img { display: block }`
   sie nicht einschalten. Kunden-CSS mit dunklem Hero schaltet um, z. B.
     … #site-header:not(.scrolled) #logo:has(.logo-dark) picture { display: none; }
     … #site-header:not(.scrolled) #logo .logo-dark { display: block; }
   Für das Icon entsprechend `#icon:has(.icon-dark) img:not(.icon-dark)` / `#icon .icon-dark`. */
#site-header #brand #logo .logo-dark,
#site-header #brand #icon .icon-dark {
  display: none;
}

/* --- Desktop: prominentes Logo (mehr Höhe als var(--header-height)) --- */

@media screen and (min-width: 79.5rem), screen and (min-width: 74rem) and (orientation: landscape) {
  #icon {
    height: 3.5rem;
  }

  #logo {
    height: 3.5rem;
  }
}

/* --- Mobile + Tablet: smaller brand --- */

@media screen and (max-width: 73.999rem), screen and (max-width: 79.499rem) and (orientation: portrait) {
  #icon {
    height: 2.5rem;
  }

  #logo {
    height: 2.5rem;
  }
}

/* ============================================================
   MOBILE + TABLET (< 79.5rem) — alle Sub-Desktop-Viewports
   volle Breite, Brand + Burger.
   Konsolidiert aus den 3 Tier-Files (default/pro/basic). Tier-Files
   behalten nur noch ihre Optik-spezifischen Anpassungen (Logo hide,
   Topbar-Layout etc.). */

@media (max-width: 73.999rem), (max-width: 79.499rem) and (orientation: portrait) {

  #site-header #brand,
  #site-header #main-nav {
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
  }

  /* Logo links-bündig, Burger rechts-bündig (overrides 04-layout.css).
     Logo etwas weniger Einrückung (--space-2 = 0.5rem) als Nav-Text
     (--space-4 = 1rem) → Logo wirkt am Rand verankert, Nav-Text hat
     visuell sichtbaren Atemabstand.
     --brand-inset (30.10.2026): Kunden-CSS kann das Logo verschieben, ohne die Regel zu überschreiben — z. B. bündig mit dem
     Menütext (Hermeier): calc(2 * var(--space-4) + 0.0625rem) = Einrückung li + a + Rand der Liste (components/nav.css).
     Die mobile Google-Bewertung (service-nav.css, .service-rating) fluchtet mit. Ohne Wert unverändert. */
  #site-header #brand > :first-child {
    margin-inline-start: var(--brand-inset, var(--space-4));
  }
  #site-header #brand > :last-child {
    margin-inline-end: var(--space-4);
  }

  /* Service-Icons: rechte Kante = Burger (#brand > :last-child hat margin-inline-end: var(--space-4)), in allen
     Tiers (Kern-Anfrage Topbar-Randabstand, 29.09.2026). Zwei Aufbauten:
     - Leiste direkt im Header (1 Sprache / 6+ im Dropdown): die Leiste setzt die Kante — vorher 0, das letzte
       Icon saß am Viewport-Rand.
     - Leiste im #topbar-Wrapper (2–5 Sprachen): der Wrapper setzt sie (sonst doppelt) — vorher --padding-page,
       8px weiter innen als der Burger. Links fluchtet der Sprachumschalter so mit dem Logo. */
  #site-header > .service {
    padding-inline: 0 var(--space-4);
  }
  #site-header #topbar .service {
    padding-inline: 0;
  }
  #site-header #topbar {
    padding-inline: var(--space-4);
  }
}


/* Tablet-Landscape: nur Icon, kein volles Logo */
@media (min-width: 45rem) and (max-width: 73.999rem) and (orientation: landscape) {

  #site-header #brand > :first-child {
    margin-inline-start:0;
  }

}

/* Mobiler Rand --rand-mobil (00-variables.css, Dirk 19.11.2026): Logo links und die sichtbaren Striche des Menü-Knopfs rechts auf dem Wert.
   Der Knopf hat 0,5 rem Innenpolster, deshalb Wert − 0,5 rem. Rückfälle = bisherige Werte (Logo --brand-inset/space-4, Knopf space-4 =
   1,5 rem − 0,5 rem). Topbar: Symbole rechts und Wrapper (2–5 Sprachen) ebenso. */
@media (max-width: 44.999rem) {
  #site-header #brand > :first-child {
    margin-inline-start: var(--rand-mobil, var(--brand-inset, var(--space-4)));
  }
  #site-header #brand > :last-child {
    margin-inline-end: calc(var(--rand-mobil, 1.5rem) - 0.5rem);
  }
  #site-header > .service {
    padding-inline-end: var(--rand-mobil, var(--space-4));
  }
  #site-header #topbar {
    padding-inline: var(--rand-mobil, var(--space-4));
  }
}
