/*
 * Heidenheim.info – Unterseiten-CI 0.1.169
 * Grafik-Pass 2: Portal-Unterseiten nutzen auf Desktop die volle 1200-px-Achse.
 * Behebt die Gutenberg-Constrained-Layout-Begrenzung des Post-Content-Blocks,
 * ohne normale redaktionelle Leseseiten kuenstlich zu verbreitern.
 */

/* Der Post-Content-Block ist im Standard-Template auf contentSize (760px)
 * begrenzt. Portal-Seiten brauchen dagegen dieselbe 1200-px-Achse wie die
 * Startseite. Die Regeln liegen bewusst nach allen Gutenberg/Theme-Regeln. */
body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell > .wp-block-post-content,
body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell--wide > .wp-block-post-content{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:1200px!important;
  margin-inline:auto!important;
  align-self:stretch!important;
}
body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell > .wp-block-post-content > :where(*),
body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell--wide > .wp-block-post-content > :where(*){
  max-width:none!important;
}
body.hi-ci-subpage.hi-ci-portal-page :is(
  .hi-place-portal,.hi-gastro-portal,.hi-service-portal,.hi-destination-portal,
  .hi-topic-landing,.hi-event-directory,.hi-public-page,.hi-newsletter-page,
  .hi-owner-menu,.hi-doctor-portal,.hi-driving-school-portal,.hi-martial-arts-portal
){
  box-sizing:border-box!important;
  width:100%!important;
  max-width:1200px!important;
  margin-inline:auto!important;
}

/* Desktop: Hero und Navigationselemente bekommen die visuelle Praesenz der
 * Startseite. Text bleibt bewusst auf einer gut lesbaren linken Zone. */
@media (min-width:981px){
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
    .hi-topic-landing__hero,.hi-public-page__hero,.hi-newsletter-page__hero,
    .hi-owner-menu__hero,.hi-event-directory__head
  ){
    min-height:315px!important;
    padding:46px 52px!important;
    margin-bottom:26px!important;
  }
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-portal__hero,.hi-gastro-portal__hero,.hi-service-portal__hero,
    .hi-topic-landing__hero,.hi-public-page__hero,.hi-newsletter-page__hero,
    .hi-owner-menu__hero,.hi-event-directory__head
  ) :is(h1,h2){
    max-width:720px!important;
    font-size:clamp(2.7rem,3.55vw,4.05rem)!important;
  }
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-portal__intro,.hi-gastro-portal__intro,.hi-service-portal__intro,
    .hi-topic-landing__intro,.hi-public-page__hero p,.hi-newsletter-page__hero p,
    .hi-owner-menu__hero p,.hi-event-directory__head p
  ){
    max-width:760px!important;
    font-size:1.03rem!important;
  }
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-search,.hi-gastro-search,.hi-service-search,.hi-topic-search,
    .hi-doctor-search,.hi-driving-school-search,.hi-martial-arts-search,
    .hi-event-range-search,.hi-search-filters,.hi-new-entries__filter
  ){
    width:min(100%,940px)!important;
    max-width:940px!important;
    margin-top:24px!important;
  }

  /* Bereichskarten: mehr Luft und klarere Klickflaechen. */
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-type-grid,.hi-gastro-type-grid,.hi-service-topic-grid,.hi-municipality-useful-links
  ){
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:16px!important;
    margin:26px 0 38px!important;
  }
  body.hi-ci-subpage.hi-ci-portal-page :is(
    .hi-place-type-grid a,.hi-gastro-type-grid a,.hi-service-topic,.hi-municipality-useful-links a
  ){
    min-height:104px!important;
    padding:19px 20px!important;
    border-radius:16px!important;
  }
  body.hi-ci-subpage.hi-ci-portal-page :is(.hi-place-type-grid a,.hi-gastro-type-grid a,.hi-service-topic) :is(strong,.hi-service-topic__title){
    font-size:1.05rem!important;
  }

  /* Ergebnisraster auf der breiten Achse. */
  body.hi-ci-subpage.hi-ci-portal-page :is(.hi-place-directory,.hi-gastro-directory,.hi-service-directory,.hi-ui-event-grid){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:20px!important;
  }
}

/* Mittlere Displays: die volle Breite bleibt erhalten, Raster wird ruhiger. */
@media (min-width:681px) and (max-width:980px){
  body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell > .wp-block-post-content,
  body.hi-ci-subpage.hi-ci-portal-page main.hi-page-shell--wide > .wp-block-post-content{
    width:100%!important;
    max-width:none!important;
  }
}
