/* Kompakter Header auf Unterseiten (nur wenn html.ip-compact-pre, siehe js/compact-header.js) */
@media (min-width: 1200px) {
  html.ip-compact-pre .above-header-bar,
  html.ip-compact-pre #navbar-top,
  html.ip-compact-pre .highlighted,
  html.ip-compact-pre .site-name-slogan { display: none !important; }

  html.ip-compact-pre #navbar-main { padding: 12px 24px 12px 30px; background-color: #002071; border-top: 6px solid #8dc157; border-bottom: 0; gap: 18px; }
  html.ip-compact-pre .ip-compact-tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
  html.ip-compact-pre .ip-compact-tools .mb-3,
  html.ip-compact-pre .ip-compact-tools .form-actions,
  html.ip-compact-pre .ip-compact-tools .form-item { margin: 0 !important; }
  html.ip-compact-pre .ip-compact-tools form .d-flex { flex-wrap: nowrap !important; }
  html.ip-compact-pre .ip-compact-tools { padding: 0 !important; width: auto !important; max-width: none !important; margin: 0 0 0 auto !important; background: transparent !important; border: 0 !important; box-shadow: none !important; flex: 0 0 auto; }
  html.ip-compact-pre .ip-compact-tools .language-switcher-language-url { width: auto !important; margin: 0 !important; }
  html.ip-compact-pre .ip-compact-tools .block-views { width: 330px; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form .js-form-item,
  html.ip-compact-pre .ip-compact-tools .views-exposed-form .form-actions,
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[name="search_api_fulltext"],
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[type="submit"] { height: 38px !important; line-height: 38px !important; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[name="search_api_fulltext"] { border: 0 !important; }
  html.ip-compact-pre #CollapsingNavbar { flex: 0 0 auto; }

  /* Suche mittig in der Leiste, Flaggen und Menue rechts */
  html.ip-compact-pre #navbar-main { position: relative; }
  html.ip-compact-pre .ip-compact-tools { display: contents !important; }
  html.ip-compact-pre .ip-compact-tools #block-boot-sub-exposedformangebote-suchepage-1 { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0 !important; }

  /* Header-Leiste bleibt auf allen Unterseiten oben stehen (Startseite ausgenommen: dort wird die Klasse nicht gesetzt) */
  html.ip-compact-pre #header { position: sticky; top: 0; z-index: 60; }
  /* Auswahlmenue (Hauptkategorien) links auf Taxonomie-Seiten: bleibt unter der festen Leiste stehen (87px + 16px Abstand) */
  html.ip-compact-pre .block-hierarchical-taxonomy-menu { position: sticky; top: calc(var(--ip-header-h, 87px) + 24px); }
  html.ip-compact-pre body.toolbar-horizontal.toolbar-fixed .block-hierarchical-taxonomy-menu { top: calc(var(--ip-header-h, 87px) + 63px); }

  /* Berufe-/Profese-Liste links (ip_term_seo): bleibt ebenfalls unter der Leiste stehen, Listenhoehe passt sich dem Fenster an */
  html.ip-compact-pre .profese-nav__list.block { position: sticky; top: calc(var(--ip-header-h, 87px) + 24px); }
  html.ip-compact-pre .profese-nav__list.block .profese-nav ul { max-height: max(200px, calc(100vh - var(--ip-header-h, 87px) - 115px)); }
  html.ip-compact-pre body.toolbar-horizontal.toolbar-fixed .profese-nav__list.block { top: calc(var(--ip-header-h, 87px) + 63px); }
  /* Suchseite: Profese-Block als platzierter Block (.block.profese-nav), nicht als Term-Feld */
  html.ip-compact-pre .sidebar_first aside.section:has(> .block.profese-nav) { display: contents; }
  html.ip-compact-pre .sidebar_first .block.profese-nav { position: sticky; top: calc(var(--ip-header-h, 87px) + 24px); }
  html.ip-compact-pre .sidebar_first .block.profese-nav ul.profese-nav__list { max-height: max(200px, calc(100vh - var(--ip-header-h, 87px) - 115px)); }
  html.ip-compact-pre body.toolbar-horizontal.toolbar-fixed .sidebar_first .block.profese-nav { top: calc(var(--ip-header-h, 87px) + 63px); }

  /* Leaflet-Ebenen (z-index 400+) bleiben innerhalb der Karte und ueberdecken die feste Leiste nicht */
  html.ip-compact-pre .leaflet-container { isolation: isolate; }
  html.ip-compact-pre body.toolbar-horizontal.toolbar-fixed #header { top: 39px; }
  html.ip-compact-pre body.toolbar-horizontal.toolbar-fixed.toolbar-tray-open #header { top: 79px; }

  /* Logo auf weisser, abgerundeter Platte; Logo selbst bleibt bei x=50 (30 + 20 Innenabstand) */
  html.ip-compact-pre .navbar-brand { margin: 0 !important; background: #fff; border-radius: 8px; padding: 6px 20px; }
  html.ip-compact-pre .navbar-brand img { display: block; }

  /* Menue weiss auf dunkelblau, Flaggen auf dezenter Flaeche */
  html.ip-compact-pre #CollapsingNavbar .nav-link,
  html.ip-compact-pre #block-boot-sub-main-menu .navbar-nav .nav-item a { color: #fff !important; font-size: 18px; }
  html.ip-compact-pre #CollapsingNavbar .nav-link:hover,
  html.ip-compact-pre #block-boot-sub-main-menu .navbar-nav .nav-item a:hover { color: #8dc157 !important; }
  /* Hover ohne Aufblitzen: keine Transition, Unterstrich direkt gruen */
  html.ip-compact-pre #CollapsingNavbar .nav-link,
  html.ip-compact-pre #block-boot-sub-main-menu .navbar-nav .nav-item a { transition: none !important; text-decoration: none !important; }
  html.ip-compact-pre #CollapsingNavbar .nav-link:hover,
  html.ip-compact-pre #block-boot-sub-main-menu .navbar-nav .nav-item a:hover { border-bottom-color: #8dc157 !important; text-decoration: none !important; }
  /* Sprachumschalter ganz rechts, hinter dem Menue, ohne eigene Flaeche */
  html.ip-compact-pre #CollapsingNavbar { margin-left: auto; order: 5; }
  html.ip-compact-pre .ip-compact-tools .language-switcher-language-url { order: 10; margin: 0 0 0 8px !important; background: none !important; padding: 0 !important; }
  html.ip-compact-pre .ip-compact-tools .language-switcher-language-url * { background-color: transparent !important; }

  /* Flaggen rechteckig statt rund */
  html.ip-compact-pre #block-boot-sub-sprachumschalteranzeigesprachederwebsite .language-link {
    width: 30px;
    height: 20px;
    border-radius: 2px;
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: none;
  }
  html.ip-compact-pre #block-boot-sub-sprachumschalteranzeigesprachederwebsite .language-link:hover { transform: scale(1.08); }
  html.ip-compact-pre #block-boot-sub-sprachumschalteranzeigesprachederwebsite .language-link.is-active { border-color: #8dc157; box-shadow: 0 0 0 1px #8dc157; }

  /* Suche mittig in der Leiste, in hellem Gruenton */
  html.ip-compact-pre .ip-compact-tools #block-boot-sub-exposedformangebote-suchepage-1 { top: 50% !important; transform: translate(-50%, -50%) !important; width: 300px; z-index: 2; }
  html.ip-compact-pre .ip-compact-tools .block-views { width: 300px; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[name="search_api_fulltext"] { background-color: #fff !important; border: 0 !important; color: #1a2a5a !important; border-radius: 6px 0 0 6px !important; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[name="search_api_fulltext"]::placeholder { color: #7d889f; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[type="submit"] { background-color: #b9dc8f !important; border: 0 !important; border-radius: 0 6px 6px 0 !important; color: #1f4a0a !important; font-size: 0 !important; color: transparent !important; width: 46px !important; padding: 0 !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4a0a' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 20px 20px !important; }
  html.ip-compact-pre .ip-compact-tools .views-exposed-form input[type="submit"]:hover { background-color: #8dc157 !important; }

  /* Kategorien: Bildkacheln wie im vollen Header, nur flacher, auf weissem Grund */
  html.ip-compact-pre .featured-top { background: transparent; border: 0; padding: 14px 0 6px; }
  html.ip-compact-pre .featured-top__inner { max-width: none !important; }
  html.ip-compact-pre .featured-top .view-content > .row,
  html.ip-compact-pre .featured-top .view-content .row { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 14px !important; }
  html.ip-compact-pre .featured-top .col { width: auto !important; max-width: none !important; padding: 0 !important; display: flex; }
  html.ip-compact-pre .featured-top .card { height: auto !important; width: 100%; }
  html.ip-compact-pre .featured-top .card-img-top { height: auto !important; display: block; }
  html.ip-compact-pre .featured-top .card-img-top img { height: 100px !important; width: 100%; object-fit: cover; }
  html.ip-compact-pre .featured-top .card-body { position: static !important; inset: auto !important; transform: none !important; width: auto !important; height: auto !important; padding: 6px 8px !important; min-height: 46px !important; display: flex; align-items: center; justify-content: center; text-align: center; }
  html.ip-compact-pre .featured-top .card-text,
  html.ip-compact-pre .featured-top .card-text a { font-size: 13px; line-height: 1.25; }
}
