/* ==========================================================================
   AST Power – Responsive-Korrekturen
   Wird als LETZTE Stylesheet-Datei geladen und ergänzt/überschreibt gezielt.
   Die originalen Theme-CSS-Dateien bleiben unverändert.
   ========================================================================== */

/* 1) Überschriften: lange deutsche Wörter dürfen umbrechen, statt am Rand
      abgeschnitten zu werden.
      Auf dem Desktop (ab 990 px) bleibt alles wie zuvor – keine Silbentrennung.
      Auf Tablet und Smartphone wird getrennt (Seite hat lang="de"). */
#top h1,
#top h2,
#top h3,
#top h4,
#top h5,
#top h6,
#top .av-special-heading-tag,
#top .iconbox_content_title,
#top .av_iconlist_title,
#top .av-milestone-title,
#top .avia-caption-title,
#top .widgettitle,
#top .post-title {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

@media only screen and (max-width: 989px) {
  #top h1,
  #top h2,
  #top h3,
  #top h4,
  #top h5,
  #top h6,
  #top .av-special-heading-tag,
  #top .iconbox_content_title,
  #top .av_iconlist_title,
  #top .av-milestone-title,
  #top .avia-caption-title,
  #top .widgettitle,
  #top .post-title {
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
  }
}

/* Fließtext: sehr lange Wörter, Links und E-Mail-Adressen dürfen auf dem
   Smartphone umbrechen, statt über den Rand zu ragen.
   Nur unter 768 px, damit der Desktop unverändert bleibt. */
@media only screen and (max-width: 767px) {
  #top .entry-content p,
  #top .entry-content li,
  #top .iconbox_content_container,
  #top #footer,
  #top #socket {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  /* Telefonnummer in der Kopfzeile nicht mitten in der Nummer umbrechen */
  #top .phone-info a {
    white-space: nowrap;
  }

  /* Galerie-Bildunterschriften behalten ihr bisheriges Verhalten */
  #top figcaption {
    overflow-wrap: normal;
    word-wrap: normal;
  }
}

/* 2) Mittlere Smartphones / kleine Tablets */
@media only screen and (max-width: 767px) {
  #top .template-page .entry-content-wrapper h1,
  #top .template-page .entry-content-wrapper h2,
  #top h1,
  #top h2 {
    letter-spacing: 0.5px;
  }

  #top .template-page .entry-content-wrapper h1 { font-size: 26px; }
  #top .template-page .entry-content-wrapper h2 { font-size: 22px; line-height: 1.2em; }
  #top .template-page .entry-content-wrapper h3 { font-size: 18px; line-height: 1.2em; }
}

/* 3) Kleine Smartphones (z. B. iPhone SE, 320–390 px) */
@media only screen and (max-width: 479px) {
  #top .template-page .entry-content-wrapper h1 { font-size: 22px; }
  #top .template-page .entry-content-wrapper h2 { font-size: 19px; letter-spacing: 0; }
  #top .template-page .entry-content-wrapper h3 { font-size: 17px; }

  #top .av-special-heading-tag { font-size: 22px; letter-spacing: 0; }
  #top .avia-caption-title    { font-size: 22px; letter-spacing: 0; }
  #top .iconbox_content_title { font-size: 18px; }
}

/* 4) Medien dürfen nie breiter als der Bildschirm sein
      (Höhe bleibt unverändert, damit Slider/Galerien nicht verzerrt werden) */
#top video,
#top iframe,
#top embed,
#top object {
  max-width: 100%;
}

/* 5) Unsichtbare Hauptüberschrift (H1) für Suchmaschinen und Screenreader.
      Optisch nicht sichtbar, ändert das Layout nicht. */
.ast-sr-h1 {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
