/* Korrekturen gegenueber der alten Drupal-Seite (eingebunden vom Router, inc/seite.php hv_korrekturen) */

/* 1. Knopf "Secondary menu": Superfish baut unter 768 px ein Klappmenue, schaltet beim Breiterziehen aber
      erst 50 ms nach dem letzten Ziehen zurueck – so lange stand der Knopf in der Menueleiste.
      Gebraucht wird das Klappmenue nie (unter 768 px uebernimmt das Handy-Menue). */
#block-superfish-1 .sf-accordion-toggle,
#superfish-1-accordion {
  display: none !important;
}
/*    In derselben Zeitspanne versteckt Superfish das Hauptmenue (display:none) – der blaue Balken hatte
      dann keine Hoehe und war kurz weiss. Ab 768 px (dort zeigt Bootstrap die Leiste) bleibt es sichtbar. */
@media (min-width: 768px) {
  #superfish-1 {
    display: flex !important;
  }
}

/* 3. Kopfbereich (Wunsch 23.10.2026): Menuebalken etwas hoeher, Suchfeld ohne Punktmuster dahinter,
      Suchfeld und Knopf abgerundet, Lupe mittig im Knopf. */
#navbar {
  background-image: none;
}
@media (min-width: 768px) {
  #superfish-1 > li > a.sf-depth-1 {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  #superfish-1 > li.first > a.sf-depth-1 {
    padding-top: 15px;
    padding-bottom: 6px;
  }
}
#search-block-form .input-group .form-control {
  border-radius: 20px 0 0 20px;
  box-shadow: none;
  padding-left: 16px;
}
#search-block-form .input-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 0 20px 20px 0;
}
#search-block-form .input-group .btn .glyphicon {
  top: 0;
  line-height: 1;
}

/* 7. Einheitlicher Abstand vor Zwischenueberschriften im Artikeltext (Wunsch 23.10.2026). Die frueheren
      Enter-Umbrueche entfernt der Router (hv_ueberschriften_ohne_umbruch); Ueberschriften in Kaesten bleiben. */
.field-name-body .field-item > h2 {
  margin-top: 58px;
}
.field-name-body .field-item > h3 {
  margin-top: 42px;
}
.field-name-body .field-item > h2:first-child,
.field-name-body .field-item > h3:first-child {
  margin-top: 0;
}
@media (max-width: 767px) {
  .field-name-body .field-item > h2 {
    margin-top: 46px;
  }
  .field-name-body .field-item > h3 {
    margin-top: 34px;
  }
}

/* 8. Bewertungsformular (Wunsch 23.10.2026): Einleitung = eine Zeile + Haekchen-Reihe (inc/seite.php hv_formular_texte) */
.hv-intro {
  text-wrap: balance;
}
.hv-trust.hv-trust-oben {
  margin-top: 10px;
  font-size: .95em;
}
@media (max-width: 560px) {
  /* Ueberschrift nicht unter das KOSTENLOS-Band laufen lassen */
  .hv-card .hv-h2 {
    padding: 0 30px;
    text-wrap: balance;
  }
  .hv-trust.hv-trust-oben {
    flex-wrap: nowrap;
    gap: 5px;
    font-size: .84em;
  }
  .hv-trust.hv-trust-oben span {
    padding: 3px 8px;
    gap: 4px;
  }
  .hv-trust.hv-trust-oben span::before {
    width: 11px;
    height: 11px;
  }
}

/* 9. Zu breite Tabellen im Artikeltext seitlich wischbar (Rahmen aus korrekturen.js) */
.hv-tabelle {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}
.hv-tabelle > table {
  margin-bottom: 0;
}

/* 4. Vorschlagsliste der Suche (Wunsch 23.10.2026: moderner) – jQuery-UI-Liste als Karte */
ul.ui-autocomplete.ui-menu {
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 42, 56, .16), 0 2px 6px rgba(16, 42, 56, .08);
  padding: 6px;
  margin-top: 6px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  font-family: "Source Sans Pro", sans-serif;
  z-index: 1001;
}
ul.ui-autocomplete li.ui-menu-item,
ul.ui-autocomplete li.ui-menu-item-odd,
ul.ui-autocomplete li.ui-menu-item-even {
  padding: 0;
  margin: 0;
  border: 0;
  background: none !important;
  list-style: none;
}
ul.ui-autocomplete li.ui-menu-item > a,
ul.ui-autocomplete li.ui-menu-item > div {
  display: block;
  margin: 0;
  padding: 9px 12px;
  border: 0 !important;
  border-radius: 9px;
  background: none !important;
  color: #1d2a33;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}
ul.ui-autocomplete li.ui-menu-item > a.ui-state-focus,
ul.ui-autocomplete li.ui-menu-item > a.ui-state-active,
ul.ui-autocomplete li.ui-menu-item > a:hover {
  background: #eef5f8 !important;
  color: #266a83;
}
ul.ui-autocomplete .ui-autocomplete-fields,
ul.ui-autocomplete .ui-autocomplete-field-title {
  background: none !important;
  border: 0 !important;
  padding: 0;
  font: inherit;
  color: inherit;
}
ul.ui-autocomplete .ui-autocomplete-field-term {
  font-weight: 700;
  color: #266a83;
  background: none;
}

/* 5. Aufklappmenues (Wunsch 23.10.2026: moderner) – Karte mit Schatten, ruhige Eintraege, lange Listen zweispaltig */
@media (min-width: 768px) {
  #superfish-1 ul.sf-megamenu {
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(16, 42, 56, .18), 0 2px 8px rgba(16, 42, 56, .08);
    padding: 8px;
  }
  #superfish-1 ul.sf-megamenu li.sf-megamenu-wrapper {
    background: #fff !important;
    max-height: min(70vh, 560px) !important;
    scrollbar-width: thin;
  }
  #superfish-1 ul.sf-megamenu:has(ol > li:nth-child(13)) {
    width: 660px !important;
  }
  #superfish-1 ul.sf-megamenu ol:has(> li:nth-child(13)) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 6px;
  }
  /* Theme faerbt beim Ueberfahren auch das <li> dunkelblau – im Aufklappmenue nur das hellblaue Feld des Links
     (Wunsch 23.10.2026: ohne Rundung, ohne dunkelblauen Hintergrund) */
  #superfish-1 ul.sf-megamenu li.sf-megamenu-wrapper li {
    background: none !important;
  }
  #superfish-1 ul.sf-megamenu a.sf-depth-2 {
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    color: #1d2a33;
    font-size: 15px;
    line-height: 1.3;
    background: none;
  }
  #superfish-1 ul.sf-megamenu a.sf-depth-2:hover,
  #superfish-1 ul.sf-megamenu a.sf-depth-2:focus,
  #superfish-1 ul.sf-megamenu a.sf-depth-2.active {
    background: #eef5f8;
    color: #266a83;
  }
}

/* 6. Handy-Ansicht (Wunsch 23.10.2026): Logo im festen Kopfbalken klickbar (der Logo-Link liegt unsichtbar darueber),
      Schatten des Kopfbalkens blasser, Suche hinter einer Lupe, Breadcrumbs als ein Zurueck-Link */
.hv-lupe,
.hv-liste-knopf {
  display: none;
}
@media (max-width: 767px) {
  /* Artikelliste der Seitenleiste zugeklappt hinter einem Knopf (korrekturen.js) */
  .hv-liste .block-title {
    display: none;
  }
  .hv-liste-knopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 10px 0 20px;
    padding: 14px 16px;
    border: 1px solid #c9dde5;
    border-radius: 10px;
    background: #f4f9fb;
    color: #266a83;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
  }
  .hv-liste:not(.hv-liste-zu) .hv-liste-knopf {
    margin-bottom: 8px;
  }
  .hv-liste-knopf .hv-pfeil {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s;
  }
  .hv-liste:not(.hv-liste-zu) .hv-pfeil {
    margin-top: 4px;
    transform: rotate(-135deg);
  }
  .hv-liste.hv-liste-zu .menu-block-wrapper {
    display: none;
  }

  /* Empfehlungen als kompakte Liste (Wunsch 23.10.2026): kleines Bild links, Titel rechts statt
     bildschirmbreiter Kacheln (vorher bis 2.800 px). "Beliebte Artikel zum Thema" hat das Bild als
     Hintergrund – das Element selbst zeigt es nicht mehr (Groesse 0), ::before uebernimmt es per inherit. */
  #block-views-similarterms-block div.col-xs-12 {
    height: auto !important;
    margin-bottom: 10px;
  }
  #block-views-similarterms-block .group-bgimage {
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto;
    margin: 0;
    border: 0;
    background-size: 0 0;
  }
  #block-views-similarterms-block .group-bgimage .field-name-title {
    position: static;
    flex: 1 1 auto;
    width: auto;
    margin: 0;
  }
  #block-views-similarterms-block .group-bgimage::before {
    content: "";
    flex: 0 0 104px;
    height: 78px;
    border-radius: 8px;
    background-image: inherit;
    background-size: cover;
    background-position: center;
  }
  #block-views-similarterms-block .group-bgimage h2,
  #block-views-linkblock-news-block-5 .node-teaser header h2 {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 16px;
    line-height: 1.3;
  }
  #block-views-similarterms-block .group-bgimage h2 a,
  #block-views-linkblock-news-block-5 .node-teaser header h2 a {
    color: #1d2a33;
    font-weight: 600;
  }
  #block-views-linkblock-news-block-5 .views-row {
    margin-bottom: 10px;
  }
  #block-views-linkblock-news-block-5 .node-teaser {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    align-items: center;
    margin: 0;
  }
  /* clearfix-Pseudoelemente wuerden im Raster eine leere zweite Zeile bilden */
  #block-views-linkblock-news-block-5 .node-teaser::before,
  #block-views-linkblock-news-block-5 .node-teaser::after {
    display: none;
  }
  #block-views-linkblock-news-block-5 .node-teaser header {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  #block-views-linkblock-news-block-5 .node-teaser .field-name-field-bild {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  #block-views-linkblock-news-block-5 .node-teaser .field-name-field-bild img {
    width: 104px;
    max-width: none;
    height: 78px;
    margin: 0;
    object-fit: cover;
    border-radius: 8px;
  }
  #block-views-linkblock-news-block-5 .node-teaser .field-name-body,
  #block-views-linkblock-news-block-5 .node-teaser footer {
    display: none;
  }
  #navbar a.logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 230px;
    height: 64px;
    z-index: 1000000;
  }
  .mean-bar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12) !important;
  }
  #navbar {
    height: auto;
  }
  /* Suchfeld klappt ueber die Lupe im Kopfbalken auf (korrekturen.js) statt fest Platz zu belegen */
  /* Der Streifen liegt zugeklappt hinter dem Kopfbalken und gleitet beim Oeffnen weich darunter hervor */
  #navbar #block-search-form {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    margin: 0 !important;
    padding: 13px 15px;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .12);
    z-index: 999998;
    transform: translateY(calc(-100% - 24px));
    visibility: hidden;
    transition: transform .25s ease-in, visibility 0s linear .25s;
  }
  body.hv-suche-offen #navbar #block-search-form {
    transform: none;
    visibility: visible;
    transition: transform .32s cubic-bezier(.22, .9, .3, 1), visibility 0s;
  }
  /* unsichtbarer Absende-Bereich unter dem Feld hatte 15 px Abstand – Feld sass dadurch zu weit oben */
  #navbar #block-search-form .form-actions {
    margin-bottom: 0;
  }
  @media (prefers-reduced-motion: reduce) {
    #navbar #block-search-form,
    body.hv-suche-offen #navbar #block-search-form {
      transition: none;
    }
  }
  body.hv-suche-offen ul.ui-autocomplete.ui-menu {
    position: fixed !important;
    z-index: 1000001;
  }
  .hv-lupe {
    display: block;
    position: fixed;
    top: 0;
    right: 62px;
    width: 48px;
    height: 62px;
    padding: 0;
    border: 0;
    background: none;
    color: #005777;
    font-size: 20px;
    line-height: 1;
    z-index: 1000000;
  }
  .hv-lupe .glyphicon {
    top: 1px;
  }
  body.hv-suche-offen .hv-lupe {
    color: #266a83;
  }
  /* Breadcrumbs: nur die naechsthoehere Ebene als Zurueck-Link ("‹ Wissen") */
  .breadcrumb > li:not(:last-child) {
    display: none;
  }
  .breadcrumb > li:last-child::before {
    content: "\2039\00a0";
    padding: 0;
    color: #266a83;
  }
  .breadcrumb > li:last-child > a {
    color: #266a83;
  }
  /* Platz des frueheren Suchfelds: Kopfbereich endet mit dem Balken (64 px), Zurueck-Link 12 px darunter (vorher 23) */
  #page-header .region-header {
    margin-top: 64px;
    padding-top: 0;
  }
  .breadcrumb {
    margin-top: 12px;
    margin-bottom: 0;
  }
  /* Seitentitel (Wunsch 23.10.2026): naeher an die Breadcrumbs, etwas groesser (vorher 25 px, H2 21 px;
     28 px war zu gross) */
  h1.page-header {
    padding-top: 4px;
    font-size: 26px;
    line-height: 1.2;
    text-wrap: balance;
  }
  /* Menuepunkt "Start" im Handy-Menue entfaellt – das Logo fuehrt zur Startseite (Wunsch 23.10.2026) */
  .mean-nav #block-superfish-1 > ul > li:has(> a[href="/"]),
  .mean-nav #block-superfish-1 > ul > li:has(> a[href="https://www.hausverkauf.de/"]) {
    display: none;
  }
}

/* 2. Sprung beim Scrollen: Stickynav setzt den Menuebalken auf position:fixed und will die Luecke ueber
      body{padding-top} ausgleichen, das Theme setzt body.not-logged-in{padding-top:0 !important}.
      Mit sticky bleibt der Balken im Seitenfluss – keine Luecke, kein Sprung. */
body.not-logged-in .navigation-top.stickynav-active {
  position: sticky;
}
