/*
 * Heidenheim.info – Unterseiten-CI 0.1.173
 * Branchen-Hub: verbindliche Desktop-Proportionen nach dem visuellen QA-Lauf.
 * Nur Darstellung, keine Daten-/Funktionslogik.
 */

/* Portal-Achse: breit, aber nicht randlos. */
body:not(.home) .hi-place-portal[data-hi-ci="0173"]{
  width:min(1320px,calc(100vw - 48px))!important;
  max-width:1320px!important;
  box-sizing:border-box!important;
}

/* Hero: breiter und ruhiger, gleiche Flucht wie Kategorien und Feedback. */
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero{
  width:100%!important;
  max-width:none!important;
  min-height:310px!important;
  height:auto!important;
  padding:34px 36px 36px!important;
  border-radius:24px!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero h1{
  max-width:760px!important;
  margin:.14rem 0 .5rem!important;
  font-size:clamp(2.65rem,3.5vw,4rem)!important;
  line-height:1.02!important;
  letter-spacing:-.035em!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-portal__intro{
  max-width:760px!important;
  font-size:.94rem!important;
  line-height:1.52!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 240px 118px!important;
  gap:10px!important;
  width:min(100%,960px)!important;
  max-width:960px!important;
  margin-top:20px!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search input,
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search select,
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search button{
  min-height:44px!important;
  height:44px!important;
  box-sizing:border-box!important;
}

/* Kategorien: klares Portalraster statt schmaler Verwaltungs-Kacheln. */
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid{
  display:grid!important;
  grid-template-columns:repeat(10,minmax(0,1fr))!important;
  gap:16px!important;
  width:100%!important;
  max-width:none!important;
  margin:22px 0 30px!important;
  align-items:stretch!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a{
  grid-column:span 2;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:0!important;
  min-height:82px!important;
  height:auto!important;
  padding:14px 42px 14px 16px!important;
  border:1px solid #d8e3e5!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(18,49,72,.045)!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:16px!important;
  bottom:16px!important;
  width:4px!important;
  border-radius:0 4px 4px 0!important;
  background:#15906f!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-child(4n+2)::before{background:#198c9a!important}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-child(4n+3)::before{background:#5272b8!important}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-child(4n)::before{background:#73953b!important}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a::after{
  content:"→"!important;
  position:absolute!important;
  right:15px!important;
  bottom:13px!important;
  color:#087d78!important;
  font-size:1rem!important;
  font-weight:900!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a strong{
  display:block!important;
  margin:0!important;
  color:#123148!important;
  font-size:1rem!important;
  font-weight:850!important;
  line-height:1.13!important;
  letter-spacing:-.015em!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a span{
  display:block!important;
  margin-top:5px!important;
  color:#66757c!important;
  font-size:.75rem!important;
  line-height:1.25!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:hover,
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:focus-visible{
  transform:translateY(-2px)!important;
  border-color:#b8d0d0!important;
  box-shadow:0 10px 24px rgba(18,49,72,.09)!important;
}

/* Bei 17 Kategorien steht die letzte Karte im 4-Spalten-Raster bewusst zentriert. */
/* Große Desktops sind der Default: fünf Spalten. Bei 17 Kategorien werden
 * die letzten zwei Karten als Paar mittig gesetzt. */
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-last-child(2):nth-child(5n+1){
  grid-column:4 / span 2!important;
}
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:last-child:nth-child(5n+2){
  grid-column:6 / span 2!important;
}

/* Standard-Desktop: vier Spalten, Einzelrest mittig. */
@media (max-width:1599px) and (min-width:1180px){
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid{
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
  }
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a{grid-column:span 2!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-last-child(2):nth-child(5n+1),
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:last-child:nth-child(5n+2){grid-column:span 2!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:last-child:nth-child(4n+1){
    grid-column:4 / span 2!important;
  }
}

/* Feedback-CTA: exakt auf Portalachse, kompakter und visuell Teil des Systems. */
body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-feedback-cta{
  width:100%!important;
  max-width:none!important;
  margin:30px 0 0!important;
  padding:15px 18px!important;
  border:1px solid #cfe0df!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,#edf7f5,#fff)!important;
  box-shadow:0 5px 16px rgba(18,49,72,.045)!important;
  box-sizing:border-box!important;
}

/* Responsives Raster. */
@media (min-width:900px) and (max-width:1179px){
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a{grid-column:span 2!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:nth-last-child(2):nth-child(3n+1){grid-column:2 / span 2!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:last-child:nth-child(3n+2){grid-column:4 / span 2!important}
}
@media (min-width:640px) and (max-width:899px){
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero{padding:28px!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search{grid-template-columns:1fr 1fr!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search input{grid-column:1/-1!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search button{grid-column:1/-1!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a{grid-column:span 2!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a:last-child:nth-child(2n+1){grid-column:2 / span 2!important}
}
@media (max-width:639px){
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]{width:calc(100vw - 24px)!important;max-width:none!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero{padding:22px 18px!important;border-radius:18px!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero h1{font-size:clamp(2rem,11vw,2.75rem)!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search{grid-template-columns:1fr!important;width:100%!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search input,
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search select,
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-portal__hero .hi-place-search button{grid-column:auto!important;width:100%!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid{grid-template-columns:1fr!important;gap:11px!important}
  body:not(.home) .hi-place-portal[data-hi-ci="0173"]>.hi-place-type-grid>a{grid-column:auto!important;min-height:74px!important}
}
