/*
 * Heidenheim.info – Unterseiten-CI 0.1.184
 * Finaler Portal-Pass: einheitliche 1320px-Inhaltsachse, Full-Bleed-Hero,
 * gleich breite Ergebnisraster und zentrale Abschnittsueberschriften.
 */

:root{
  --hi184-axis:1320px;
  --hi184-gutter:28px;
  --hi184-gap:16px;
}

/* ---------- Seitenrahmen: kein grauer Zwischenraum vor dem Hero ---------- */
body:not(.home).hi-ci-portal-page main.hi-page-shell,
body:not(.home) main.hi-place-main,
body:not(.home) main.hi-gastro-main,
body:not(.home) main.hi-service-main,
body:not(.home) main.hi-destination-main,
body:not(.home) main.hi-event-archive-main{
  margin-top:0!important;
  padding-top:0!important;
}
body:not(.home).hi-ci-portal-page main.hi-page-shell>.wp-block-post-title,
body:not(.home).hi-ci-portal-page main.hi-page-shell>.wp-block-post-featured-image{
  display:none!important;
}
body:not(.home).hi-ci-portal-page main.hi-page-shell>.wp-block-post-content{
  margin-top:0!important;
  padding-top:0!important;
}
body:not(.home).hi-ci-portal-page main.hi-page-shell>.wp-block-post-content>:first-child{
  margin-top:0!important;
}

/* ---------- Eine Achse fuer ALLE Portalwurzeln ---------- */
body:not(.home) :is(
  .hi-place-portal,.hi-gastro-portal,.hi-service-portal,.hi-topic-landing,
  .hi-daily-menu-portal,.hi-municipality-portal,
  .hi-clubs-bars,.hi-public-infrastructure,.hi-new-entries,
  .hi-map-overview--portal
){
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  width:min(var(--hi184-axis),calc(100vw - 2 * var(--hi184-gutter)))!important;
  max-width:var(--hi184-axis)!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* ---------- Hero: nur das Bild ist Full-Bleed ---------- */
body:not(.home) :is(
  .hi-place-portal>.hi-place-portal__hero,
  .hi-gastro-portal>.hi-gastro-portal__hero,
  .hi-service-portal>.hi-service-portal__hero,
  .hi-topic-landing>.hi-topic-landing__hero,
  .hi-daily-menu-portal>.hi-daily-menu-portal__hero,
  .hi-municipality-portal>.hi-municipality-portal__hero,
  .hi-clubs-bars>.hi-place-portal__hero,
  .hi-public-infrastructure>.hi-place-portal__hero
){
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  width:100vw!important;
  max-width:none!important;
  min-height:340px!important;
  margin:0 0 30px calc(50% - 50vw)!important;
  padding:48px max(var(--hi184-gutter),calc((100vw - var(--hi184-axis))/2)) 46px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  text-align:center!important;
  color:#fff!important;
  isolation:isolate!important;
}

/* Innere Hero-Container duerfen nie wieder nach rechts driften. */
body:not(.home) :is(.hi-place-portal__hero-inner,.hi-portal-hero-inner){
  position:relative!important;
  left:auto!important;
  transform:none!important;
  width:min(var(--hi184-axis),calc(100vw - 2 * var(--hi184-gutter)))!important;
  max-width:var(--hi184-axis)!important;
  margin:0 auto!important;
  padding:0!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
body:not(.home) :is(
  .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
  .hi-topic-landing__hero__hero,.hi-daily-menu-portal__hero,
  .hi-municipality-portal__hero
) :is(h1,.hi-place-portal__intro,.hi-gastro-portal__intro,.hi-service-portal__intro,.hi-topic-landing__intro,.hi-daily-menu-portal__intro){
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
}
body:not(.home) :is(
  .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
  .hi-topic-landing__hero__hero,.hi-daily-menu-portal__hero,
  .hi-municipality-portal__hero
) h1{
  max-width:980px!important;
}
body:not(.home) :is(
  .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
  .hi-topic-landing__hero__hero,.hi-daily-menu-portal__hero,
  .hi-municipality-portal__hero
) :is(.hi-place-portal__intro,.hi-gastro-portal__intro,.hi-service-portal__intro,.hi-topic-landing__intro,.hi-daily-menu-portal__intro){
  max-width:860px!important;
}

/* Bildbeschreibung ganz am unteren aeusseren Rand. */
body:not(.home) :is(
  .hi-place-portal>.hi-place-portal__hero,
  .hi-gastro-portal>.hi-gastro-portal__hero,
  .hi-service-portal>.hi-service-portal__hero,
  .hi-topic-landing>.hi-topic-landing__hero,
  .hi-daily-menu-portal>.hi-daily-menu-portal__hero,
  .hi-municipality-portal>.hi-municipality-portal__hero,
  .hi-clubs-bars>.hi-place-portal__hero
)::after{
  position:absolute!important;
  right:10px!important;
  bottom:8px!important;
  left:auto!important;
  top:auto!important;
  z-index:8!important;
  display:inline-flex!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  padding:4px 8px!important;
  border:0!important;
  border-radius:5px!important;
  background:rgba(5,28,39,.72)!important;
  color:#fff!important;
  font-size:.64rem!important;
  font-weight:800!important;
  line-height:1.1!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
  pointer-events:none!important;
}
body:not(.home) .hi-place-portal>.hi-place-portal__hero::after,
body:not(.home) .hi-municipality-portal>.hi-municipality-portal__hero::after{content:"Härtsfeldsee · Dischingen"!important}
body:not(.home) :is(.hi-place-portal.hi-destination-portal,.hi-place-portal.hi-martial-arts-portal)>.hi-place-portal__hero::after{content:"Burg Katzenstein · Dischingen"!important}
body:not(.home) :is(.hi-place-portal.hi-doctor-portal,.hi-place-portal.hi-driving-school-portal)>.hi-place-portal__hero::after{content:"Küpfendorf · Steinheim am Albuch"!important}
body:not(.home) :is(.hi-gastro-portal>.hi-gastro-portal__hero,.hi-daily-menu-portal>.hi-daily-menu-portal__hero,.hi-clubs-bars>.hi-place-portal__hero)::after{content:"Schloss Hellenstein · Heidenheim"!important}
body:not(.home) :is(.hi-service-portal>.hi-service-portal__hero,.hi-topic-landing>.hi-topic-landing__hero)::after{content:"Küpfendorf · Steinheim am Albuch"!important}

/* ---------- Suchleisten ---------- */
body:not(.home) :is(.hi-place-search,.hi-gastro-search,.hi-service-search,.hi-topic-search,.hi-daily-menu-filter){
  width:min(100%,1040px)!important;
  max-width:1040px!important;
  margin:22px auto 0!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-service-search,
body:not(.home) .hi-service-search.hi-service-search--with-place{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(220px,300px) auto!important;
  gap:10px!important;
  align-items:stretch!important;
}
body:not(.home) .hi-service-search :is(input,select,button){
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  box-sizing:border-box!important;
}
body:not(.home) .hi-service-search button{width:auto!important;min-width:110px!important}

/* ---------- Alles UNTER dem Hero nutzt die komplette 1320px-Achse ---------- */
body:not(.home) :is(
  .hi-place-portal,.hi-gastro-portal,.hi-service-portal,.hi-topic-landing,
  .hi-daily-menu-portal,.hi-municipality-portal,
  .hi-clubs-bars,.hi-public-infrastructure
) > :not(
  .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
  .hi-topic-landing__hero__hero,.hi-daily-menu-portal__hero,
  .hi-municipality-portal__hero
){
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* Ueberschriften direkt unter dem Bild immer mittig. */
body:not(.home) :is(
  .hi-gastro-directory-section__head,.hi-service-map-section__head,
  .hi-topic-landing__section-head,.hi-daily-menu-map__head,
  .hi-gastro-map-section>.hi-gastro-directory-section__head
){
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  width:100%!important;
  text-align:center!important;
}
body:not(.home) :is(
  .hi-place-directory-section,.hi-gastro-directory-section,.hi-service-directory-section,
  .hi-topic-landing__section,.hi-clubs-bars__section,.hi-daily-menu-day-group
) > :is(h2,.hi-topic-landing__section-head){
  text-align:center!important;
}
body:not(.home) .hi-clubs-bars__section>h2{width:100%!important;text-align:center!important}
body:not(.home) :is(.hi-gastro-directory-section__head,.hi-topic-landing__section-head)>a{
  margin-top:2px!important;
}

/* Kachelraster: volle Achse, nie als schmale zentrierte Insel. */
body:not(.home) :is(.hi-place-directory,.hi-gastro-directory,.hi-service-directory,.hi-daily-menu-list){
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:var(--hi184-gap)!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  justify-content:stretch!important;
  align-items:stretch!important;
}
body:not(.home) :is(.hi-place-type-grid,.hi-gastro-type-grid,.hi-service-topic-grid,.hi-municipality-grid,.hi-place-subcategory-grid){
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:var(--hi184-gap)!important;
  width:100%!important;
  max-width:none!important;
  margin:22px 0 30px!important;
  justify-content:stretch!important;
  align-items:stretch!important;
}
body:not(.home) .hi-place-subcategory-grid>a{
  display:flex!important;
  min-height:78px!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:5px!important;
  padding:14px 16px!important;
  border:1px solid #dce5e8!important;
  border-radius:15px!important;
  background:#fff!important;
  color:#123148!important;
  text-decoration:none!important;
  box-shadow:0 4px 14px rgba(18,49,72,.05)!important;
}
body:not(.home) .hi-place-subcategory-grid>a strong{font-size:.95rem!important;line-height:1.2!important}
body:not(.home) .hi-place-subcategory-grid>a span{color:#0b7a75!important;font-size:.72rem!important}
body:not(.home) .hi-place-subcategory-grid>a.is-active{border-color:#0b7a75!important;box-shadow:0 0 0 2px rgba(11,122,117,.1)!important}

/* Service-Start: gleichmaessiges 4er-Raster ohne Loch zwischen zwei Spalten. */
body:not(.home) .hi-service-topic-grid{
  grid-auto-flow:row!important;
}
body:not(.home) .hi-service-topic-grid>.hi-service-topic{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

/* Tagesessen: Toolbar, Zeitraeume, Tagesgruppen und Anbieter nutzen dieselbe Breite. */
body:not(.home) :is(.hi-daily-menu-days,.hi-daily-menu-toolbar,.hi-daily-menu-hint,.hi-daily-menu-day-group,.hi-daily-menu-map){
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* Karten bleiben auf der Portalachse und werden nicht ein zweites Mal full-bleed. */
body:not(.home) :is(.hi-gastro-map-section,.hi-service-map-section,.hi-topic-landing__section--map,.hi-daily-menu-map){
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
body:not(.home) :is(.hi-gastro-map-section,.hi-service-map-section,.hi-topic-landing__section--map,.hi-daily-menu-map) :is(.hi-map-overview,.hi-portal-map,.leaflet-container){
  width:100%!important;
  max-width:100%!important;
}

/* Feedbackbox auf der gleichen Achse. */
body:not(.home) .hi-feedback-cta{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

@media(max-width:1050px){
  :root{--hi184-gutter:22px}
  body:not(.home) :is(.hi-place-directory,.hi-gastro-directory,.hi-service-directory,.hi-daily-menu-list){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body:not(.home) :is(.hi-place-type-grid,.hi-gastro-type-grid,.hi-service-topic-grid,.hi-municipality-grid,.hi-place-subcategory-grid){grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  :root{--hi184-gutter:14px}
  body:not(.home) :is(.hi-place-directory,.hi-gastro-directory,.hi-service-directory,.hi-daily-menu-list){grid-template-columns:1fr!important}
  body:not(.home) :is(.hi-place-type-grid,.hi-gastro-type-grid,.hi-service-topic-grid,.hi-municipality-grid,.hi-place-subcategory-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body:not(.home) :is(.hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,.hi-topic-landing__hero__hero,.hi-daily-menu-portal__hero,.hi-municipality-portal__hero){min-height:300px!important;padding-top:38px!important;padding-bottom:40px!important}
  body:not(.home) .hi-service-search,
  body:not(.home) .hi-service-search.hi-service-search--with-place{grid-template-columns:1fr!important}
  body:not(.home) .hi-service-search button{width:100%!important}
}
@media(max-width:520px){
  body:not(.home) :is(.hi-place-type-grid,.hi-gastro-type-grid,.hi-service-topic-grid,.hi-municipality-grid,.hi-place-subcategory-grid){grid-template-columns:1fr!important}
}
