/* Startseite (Itemid 105): Seitentitel/Kopfzeile ausblenden + Lücke entfernen */
body.itemid-105 .uk-article .page-header { display: none !important; }
body.itemid-105 .page-header             { display: none !important; } /* Fallback */
body.itemid-105 .page-header,
body.itemid-105 .article-details .article-header,
body.itemid-105 .entry-header {
  margin: 0 !important;
  padding: 0 !important;
}

/* Startseite: Bühne optimieren */
@media (min-width: 1200px) {
  body.itemid-105 #sp-main-body .container { max-width: 1700px; }
}
body.itemid-105 #sp-main-body .container,
body.itemid-105 #sp-main-body .container-inner {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* Startseite: Bild immer komplett im Viewport zeigen (ohne Beschnitt) */
@media (min-width: 992px){
  body.itemid-105 .uk-article figure:first-of-type img{
    height: calc(100dvh - 320px);
    object-fit: contain;
    object-position: center top;
  }
}
@media (min-width: 1200px){
  body.itemid-105 .uk-article figure:first-of-type img{
    height: calc(100dvh - 340px);
  }
}
@media (min-width: 1400px){
  body.itemid-105 .uk-article figure:first-of-type img{
    height: calc(100dvh - 360px);
  }
}

/* ===== Mobile Tweaks (≤ 767px) ===== */
@media (max-width: 767px){
  /* Weniger Innenabstand im Content-Container */
  body.itemid-105 #sp-main-body .container,
  body.itemid-105 #sp-main-body .container-inner{
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 8px !important;
    padding-bottom: 0 !important;
  }

  /* Hero-Bild: volle Breite, keine feste Höhe auf Mobile */
  body.itemid-105 .uk-article figure:first-of-type{
    max-height: none !important;
    margin: 8px auto 12px !important;
    overflow: visible !important;
  }
  body.itemid-105 .uk-article figure:first-of-type img{
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Footer etwas dichter ran */
  #sp-footer{ margin-top: 8px !important; }
}

/* iOS Safe-Area (Home-Indicator) berücksichtigen */
@supports (padding: max(0px)){
  @media (max-width: 767px){
    body{ padding-bottom: max(env(safe-area-inset-bottom), 0px); }
  }
}

/* Tablets quer/hoch (≈ 768–1024px): Bild nicht beschneiden */
@media (min-width: 768px) and (max-width: 1024px){
  body.itemid-105 .uk-article figure:first-of-type{
    max-height: none !important;
    overflow: visible !important;
  }
  body.itemid-105 .uk-article figure:first-of-type img{
    width: 100%;
    height: auto;
  }
}

/* Mittlere Desktops (992–1199px) – nicht so streng kappen */
@media (min-width: 992px) and (max-width: 1199px){
  body.itemid-105 .uk-article figure:first-of-type{
    max-height: none;
  }
}
