/*
 * Heidenheim.info – Service-Navigation 0.1.197
 * Stabiler Hero-Filter, kompakte Hauptbereiche und skalierbare Untergruppenwahl.
 */

/* Suche strukturell isolieren: die Felder liegen ab 0.1.197 in eigenen Wrappern,
   damit ältere >input/>button-Regeln die Anordnung nicht mehr zerlegen können. */
body:not(.home) .hi-service-portal .hi-service-search,
body:not(.home) .hi-service-portal .hi-service-search.hi-service-search--with-place{
  display:grid!important;
  grid-template-columns:minmax(0,1.7fr) minmax(210px,.72fr) 150px!important;
  gap:10px!important;
  align-items:stretch!important;
  width:min(980px,calc(100% - 24px))!important;
  max-width:980px!important;
  margin:22px auto 0!important;
  padding:8px!important;
  border:1px solid rgba(207,220,222,.96)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 12px 30px rgba(18,49,72,.13)!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-service-portal .hi-service-search>.hi-service-search__field,
body:not(.home) .hi-service-portal .hi-service-search>.hi-service-search__submit{
  display:block!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  grid-column:auto!important;
}
body:not(.home) .hi-service-portal .hi-service-search :is(input:not([type="hidden"]),select,button){
  display:block!important;
  width:100%!important;
  min-width:0!important;
  min-height:50px!important;
  height:50px!important;
  margin:0!important;
  box-sizing:border-box!important;
  border-radius:12px!important;
}
body:not(.home) .hi-service-portal .hi-service-search :is(input,select){
  border:1px solid #cfdadd!important;
  padding:0 13px!important;
  background:#fff!important;
  color:#26383d!important;
}
body:not(.home) .hi-service-portal .hi-service-search button{
  min-width:0!important;
  padding:0 17px!important;
  border:0!important;
  background:#16844a!important;
  color:#fff!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
body:not(.home) .hi-service-portal .hi-service-search button:hover,
body:not(.home) .hi-service-portal .hi-service-search button:focus-visible{
  background:#126c3d!important;
}

/* Hauptnavigation: auf breiten Ansichten nur zwei kompakte Reihen (4 + 3). */
body:not(.home) .hi-service-navigation{
  width:100%!important;
  margin:30px 0 0!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-service-navigation__head{
  max-width:760px!important;
  margin:0 auto 17px!important;
  text-align:center!important;
}
body:not(.home) .hi-service-navigation__head h2{
  margin:.18rem 0 0!important;
}
body:not(.home) .hi-service-portal .hi-service-topic-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  align-items:stretch!important;
  grid-auto-flow:row!important;
}
body:not(.home) .hi-service-portal .hi-service-topic-grid>.hi-service-topic{
  width:100%!important;
  max-width:none!important;
  min-height:92px!important;
  margin:0!important;
  align-self:stretch!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-service-portal .hi-service-topic-grid>.hi-service-topic .hi-service-topic__meta{
  color:#667982!important;
  font-size:.72rem!important;
  font-weight:700!important;
}

/* Untergruppen: eine kompakte Auswahl statt eines zweiten Kachelmeers. */
body:not(.home) .hi-service-subgroups{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(420px,.95fr)!important;
  gap:28px!important;
  align-items:center!important;
  width:100%!important;
  margin:28px 0 34px!important;
  padding:24px 26px!important;
  box-sizing:border-box!important;
  border:1px solid #d9e5e6!important;
  border-radius:20px!important;
  background:linear-gradient(135deg,#f6faf9 0%,#fff 100%)!important;
  box-shadow:0 7px 22px rgba(18,49,72,.055)!important;
}
body:not(.home) .hi-service-subgroups__copy h2{
  margin:.15rem 0 .45rem!important;
  color:#123148!important;
}
body:not(.home) .hi-service-subgroups__copy>p:last-child{
  max-width:650px!important;
  margin:0!important;
  color:#5e7078!important;
  line-height:1.5!important;
}
body:not(.home) .hi-service-subgroup-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:9px!important;
  align-items:end!important;
  margin:0!important;
}
body:not(.home) .hi-service-subgroup-form label{
  grid-column:1/-1!important;
  margin:0!important;
  color:#123148!important;
  font-size:.78rem!important;
  font-weight:800!important;
}
body:not(.home) .hi-service-subgroup-form select,
body:not(.home) .hi-service-subgroup-form button{
  min-height:48px!important;
  box-sizing:border-box!important;
  border-radius:12px!important;
}
body:not(.home) .hi-service-subgroup-form select{
  width:100%!important;
  min-width:0!important;
  border:1px solid #cbdadd!important;
  padding:0 13px!important;
  background:#fff!important;
  color:#26383d!important;
}
body:not(.home) .hi-service-subgroup-form button{
  border:0!important;
  padding:0 18px!important;
  background:#0b7a75!important;
  color:#fff!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
body:not(.home) .hi-service-subgroup-form button:hover,
body:not(.home) .hi-service-subgroup-form button:focus-visible{
  background:#086762!important;
}

/* Ergebnisbereich nur, wenn tatsächlich ein Bereich/Filter gewählt wurde. */
body:not(.home) .hi-service-directory-section{
  margin-top:30px!important;
}

/* Wichtig: auch bei Browser-Zoom/kleinerem Desktop bleibt die Suche in einer
   Zeile. Erst wenn drei Felder wirklich nicht mehr sinnvoll nebeneinander passen,
   wird vollständig gestapelt. */
@media (max-width:900px){
  body:not(.home) .hi-service-portal .hi-service-topic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body:not(.home) .hi-service-subgroups{
    grid-template-columns:1fr!important;
    gap:18px!important;
  }
}
@media (max-width:840px){
  body:not(.home) .hi-service-portal .hi-service-search,
  body:not(.home) .hi-service-portal .hi-service-search.hi-service-search--with-place{
    grid-template-columns:1fr!important;
    width:min(680px,calc(100% - 20px))!important;
  }
  body:not(.home) .hi-service-portal .hi-service-search>.hi-service-search__field,
  body:not(.home) .hi-service-portal .hi-service-search>.hi-service-search__submit{
    grid-column:auto!important;
  }
}
@media (max-width:560px){
  body:not(.home) .hi-service-portal .hi-service-topic-grid{
    grid-template-columns:1fr!important;
  }
  body:not(.home) .hi-service-subgroups{
    padding:18px!important;
  }
  body:not(.home) .hi-service-subgroup-form{
    grid-template-columns:1fr!important;
  }
  body:not(.home) .hi-service-subgroup-form label{
    grid-column:auto!important;
  }
  body:not(.home) .hi-service-subgroup-form button{
    width:100%!important;
  }
}
