/* Eigene Ergänzungen für die statische Seite (früher per JavaScript von Plugins erledigt) */

/* Instagram-Feed: quadratische Kacheln wie bisher */
#sb_instagram .sbi_photo { display: block; aspect-ratio: 1 / 1; }
#sb_instagram .sbi_photo img { width: 100%; height: 100%; object-fit: cover; }

/* Menü-Symbol auf dem Handy: im hellen Modus war es weiß auf weiß */
:root:not([data-color-mode*="dark"]) [data-header*="type-1"] [data-id="trigger"] { --theme-icon-color: #1A1A1A; --theme-icon-hover-color: #1A1A1A; }
@media (prefers-color-scheme: dark) {
  :root[data-color-mode*="os-default"] [data-header*="type-1"] [data-id="trigger"] { --theme-icon-color: #f7f7f7; --theme-icon-hover-color: #f7f7f7; }
}

/* Überschriften nicht mitten im Wort umbrechen (nur im Notfall bei sehr schmalen Bildschirmen) */
h1, h2, h3, .stk-block-heading__text { hyphens: manual; word-break: normal; overflow-wrap: break-word; }

/* Texte der Kategorie-Kopfbereiche nicht bis an den Bildschirmrand laufen lassen, bündig mit dem Logo */
[data-block*="hook"] .entry-content > :not(.alignfull):not(.hero-portrait) { padding-inline: max(20px, calc((100% - 1152px) / 2)); }

/* ---------- Startseite: „Was gibt's neues?“ als Karten ---------- */
.wp-block-latest-posts__list li {
  background: #fdfbf9;
  border: 1px solid rgba(43, 23, 7, 0.14);
  border-radius: 12px;
  box-shadow: 3px 6px 14px rgba(43, 23, 7, 0.12);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wp-block-latest-posts__list li .wp-block-latest-posts__post-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: #2b1a07;
  text-decoration: none;
}
.wp-block-latest-posts__list li .wp-block-latest-posts__post-date { color: #6b5a48; font-size: 14px; }
.wp-block-latest-posts__list li .wp-block-latest-posts__post-excerpt { color: #2b1a07; font-size: 17px; line-height: 1.4; margin-top: 4px; }
.wp-block-latest-posts__list li .wp-block-latest-posts__read-more {
  display: table;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ce500a;
  color: #fdfbf9;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

/* ---------- Handy ---------- */
@media (max-width: 689.98px) {
  /* Seitentitel nicht mehr bildschirmfüllend */
  body h1.stk-block-heading__text.stk-block-heading__text,
  body .hero-portrait h1.wp-block-heading.wp-block-heading {
    font-size: clamp(28px, 9vw, 42px) !important;
    line-height: 1.05 !important;
  }

  /* Figuren im Kopfbereich größer und mittig */
  .hero-portrait .wp-block-column figure,
  .hero-portrait .stk-block-image figure { display: flex; justify-content: center; margin-inline: auto !important; }
  .hero-portrait .stk-img-wrapper { width: auto !important; height: auto !important; }
  .hero-portrait figure img { height: 300px !important; width: auto !important; max-width: 100% !important; object-fit: contain; }

  /* Fußbereich kompakter */
  footer.stk-108eba7 { margin-top: 40px !important; }
  footer.stk-108eba7 .stk-aed0701-column { row-gap: 18px !important; }
  footer.stk-108eba7 .stk-block-column { padding: 16px 20px !important; }
  footer.stk-108eba7 .stk-e202e2d { top: 0 !important; margin-bottom: 4px !important; }
  footer.stk-108eba7 .stk-b8adfb4 { margin-bottom: 0 !important; }
  footer.stk-108eba7 h5 { margin: 0; }
}

/* ---------- Handy: Kopfzeile und Kopfbereich (Hero) ---------- */
@media (max-width: 689.98px) {
  /* Kopfzeile: Logo links, Hell/Dunkel-Umschalter direkt neben dem Menü */
  .ct-header [data-device="mobile"] [data-row*="middle"] > .ct-container { display: flex !important; align-items: center; gap: 6px; }
  .ct-header [data-device="mobile"] [data-column="start"] { margin-right: auto; }
  .ct-header [data-device="mobile"] [data-column="middle"] { justify-content: flex-end; }

  /* Hero-Karte: nicht mehr am Rand abgeschnitten, kompakter */
  .hero-portrait.hero-portrait {
    width: auto !important;
    margin: 12px 14px 32px !important;
    min-height: 0 !important;
  }
  .hero-portrait .hero-section { gap: 0 !important; padding: 0 !important; }
  .hero-portrait .hero-section > .wp-block-column { padding: 22px 18px 6px !important; }
  .hero-portrait .hero-section > .wp-block-column:last-child { padding-top: 0 !important; padding-bottom: 14px !important; }
  .hero-portrait .stk-block-heading { margin-bottom: 14px !important; }
  .hero-portrait h1 { text-align: center !important; }
  .hero-portrait .is-layout-flex:has(> p) { justify-content: center !important; gap: 8px !important; margin-top: 0 !important; }
  .hero-portrait .is-layout-flex > p { margin: 0 !important; }
  .hero-portrait .stk-block-button-group { margin-top: 18px !important; margin-bottom: 0 !important; }
  .hero-portrait .stk-block-button-group .stk-row { justify-content: center !important; }
  .hero-portrait figure img { height: 250px !important; }
}

/* ---------- Lesbarkeit: Zeilenabstand, Zeilenlänge, Abstände ---------- */
:is(.entry-content, [data-block*="hook"]) :is(p, li):not(.has-custom-css):not(footer *) {
  line-height: 1.6;
}
/* Fließtext in einer gut lesbaren Spalte (ca. 70 Zeichen) */
:is(body.single-post, body.page:not(.home), body.category, body.tag)
  :is(.entry-content, [data-block*="hook"])
  :is(p, ul, ol, h2, h3, h4, h5, blockquote):not(.has-custom-css):not(footer *):not(.entry-meta):not(.wp-block-latest-posts__list) {
  max-width: 720px;
  width: min(100%, calc(100vw - 40px));
  margin-inline: auto;
}
/* Zwischenüberschriften mit mehr Luft nach oben */
:is(body.single-post, body.page:not(.home)) .entry-content :is(h2, h3):not(footer *):not(:first-child) {
  margin-top: 1.8em;
}
:is(.entry-content) li:not(footer *) { margin-bottom: 0.4em; }
/* Auch Überschriften-, Text- und Hinweisblöcke direkt im Inhalt in die Lesespalte */
:is(body.single-post, body.page:not(.home)) .entry-content > :is(.stk-block-heading, .stk-block-text, .wp-block-heading, .wp-block-group:not(.alignfull):not(.hero-portrait), .wp-block-quote, .wp-block-pullquote, .stk-block-blockquote):not(footer *) {
  max-width: 720px !important;
  width: min(100%, calc(100vw - 40px));
  margin-inline: auto !important;
}
/* Hinweis- und Zitatkästen etwas breiter als der Text, aber nicht über die ganze Seite */
:is(body.single-post, body.page:not(.home)) .entry-content :is(.stk-block-text.stk-block-background, .stk-block-column.stk-block-background:only-child):not(footer *) {
  max-width: 780px !important;
  margin-inline: auto !important;
}

/* Handy: Untertitel „Es ist pink. Es glitzert: Ich will es!“ unter dem Logo */
@media (max-width: 689.98px) {
  .ct-header [data-device="mobile"] [data-row*="middle"] > .ct-container { min-height: 62px; padding-top: 6px; padding-bottom: 6px; box-sizing: border-box; }
  .ct-header [data-device="mobile"] [data-column="start"],
  .ct-header [data-device="mobile"] [data-column="start"] [data-items],
  .ct-header [data-device="mobile"] .site-branding { display: flex; align-items: center; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  .ct-header [data-device="mobile"] .site-title-container { display: flex; flex-direction: column; gap: 3px; margin: 0 !important; }
  .ct-header [data-device="mobile"] .site-description {
    display: block !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: nowrap;
  }
}
@media (max-width: 359.98px) {
  .ct-header [data-device="mobile"] .site-description { font-size: 10.5px !important; }
}
