/* =========================================================
   BASIS: Nichts darf Buchstabe-für-Buchstabe umbrechen
   (betrifft vor allem den Button)
   ========================================================= */
.wp-block-button__link,
.wp-element-button,
a.wp-element-button,
button {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  hyphens: none !important;
}

/* Button darf nicht zu schmal werden */
.wp-block-button { min-width: max-content !important; }
.wp-block-button__link{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Logo niemals ausblenden */
.wp-block-site-logo { display: block !important; }
.wp-block-site-logo img { display: block !important; height: auto !important; }

/* Titel/Tagline nicht umbrechen */
.wp-block-site-title,
.wp-block-site-tagline{
  white-space: nowrap !important;
}


/* =========================================================
   TABLET (bis 1024px): alles kleiner, Button kleiner, Logo sichtbar
   ========================================================= */
@media (max-width: 1024px){

  /* Logo kleiner, aber sichtbar */
  .wp-block-site-logo img{
    width: 34px !important;  /* ggf. 30–40px */
    height: auto !important;
  }

  /* Header-Zeile kleiner */
  .wp-block-site-title{ font-size: 13px !important; line-height: 1.1 !important; }
  .wp-block-site-tagline{ font-size: 13px !important; line-height: 1.1 !important; }

  /* Navigation/Links kleiner */
  .wp-block-navigation,
  .wp-block-navigation a{
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  /* Button kleiner (Font + Padding) */
  .wp-block-button__link{
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
}


/* =========================================================
   MOBILE (bis 600px):
   - Logo + AGB + Impressum + Button bleiben sichtbar
   - Text in der Mitte wird auf "Corporate Finance Manufaktur" gekürzt
   - alles deutlich kleiner
   ========================================================= */
@media (max-width: 1000px){

  /* Tagline ausblenden => nur "Corporate Finance Manufaktur" */
  .wp-block-site-tagline{ display: none !important; }

  /* Logo klein */
  .wp-block-site-logo img{
    width: 20px !important;   /* ggf. 24–32px */
    height: auto !important;
  }

  /* Title sehr klein, zentriert falls er im Header mittig steht */
  .wp-block-site-title{
    font-size: 9px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  /* Navigation/Links (Impressum/AGB) kleiner */
  .wp-block-navigation,
  .wp-block-navigation a{
    font-size: 8px !important;
    line-height: 1.1 !important;
  }

  /* Button sehr klein + bleibt 1-zeilig */
  .wp-block-button__link{
    font-size: 8px !important;
    padding: 2px 3px !important;
  }

  /* Optional: insgesamt weniger Abstand im Header (macht alles kompakter) */
  header .wp-block-group,
  header .wp-block-columns,
  header .wp-block-column{
    gap: 8px !important;
  }
}
/* ===============================
   TABLET FIX (bis 1024px)
   Logo sichtbar + alles kleiner
   =============================== */
@media (max-width: 1024px){

  /* LOGO IMMER SICHTBAR */
  .wp-block-site-logo{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .wp-block-site-logo img{
    display: block !important;
    width: 40px !important;   /* wenn zu klein → 45px */
    height: auto !important;
    max-width: none !important;
  }

  /* Gesamten Header kompakter machen */
  header,
  header .wp-block-group{
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  /* Titel kleiner */
  .wp-block-site-title{
    font-size: 12px !important;
  }

  .wp-block-site-tagline{
    font-size: 12px !important;
  }

  /* Navigation kleiner */
  .wp-block-navigation a{
    font-size: 11px !important;
  }

  /* Button kleiner aber lesbar */
  .wp-block-button__link{
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

}
/* =================================
   MOBILE: kein horizontaler Scroll
   (nur bis 600px)
   ================================= */
@media (max-width: 600px){

  /* absoluter Notnagel gegen horizontalen Scroll */
  html, body{
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Header-Container dürfen umbrechen statt nach rechts zu schieben */
  header,
  header .wp-block-group,
  header .wp-block-columns,
  header .wp-block-column{
    max-width: 100% !important;
  }

  /* Wenn dein Header per Flex läuft: wrap aktivieren */
  header .wp-block-group{
    flex-wrap: wrap !important;
  }

  /* Mitte kürzen: nur "Corporate Finance Manufaktur" */
  .wp-block-site-tagline{
    display: none !important;
  }

  /* Title darf NICHT nowrap erzwingen -> sonst Scroll */
  .wp-block-site-title{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  /* Logo klein */
  .wp-block-site-logo img{
    width: 26px !important;
    height: auto !important;
  }

  /* Impressum / AGB dürfen umbrechen statt Scroll */
  .wp-block-navigation,
  .wp-block-navigation a{
    max-width: 100% !important;
    white-space: normal !important;
    font-size: 10.5px !important;
  }

  /* Button klein, aber bleibt 1-zeilig */
  .wp-block-button__link{
    font-size: 10.5px !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
  }
}
/* =================================
   MOBILE FINAL (bis 600px)
   ================================= */
@media (max-width: 600px){

  /* Kein horizontaler Scroll */
  html, body{
    overflow-x: hidden !important;
  }

  /* Header Layout nebeneinander */
  header .wp-block-group{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }

  /* Logo klein */
  .wp-block-site-logo img{
    width: 26px !important;
    height: auto !important;
  }

  /* Tagline ausblenden */
  .wp-block-site-tagline{
    display: none !important;
  }

  /* Titel in 2 Zeilen erzwingen */
  .wp-block-site-title{
    font-size: 11px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: normal !important;
    max-width: 140px !important;
  }

  /* Erzwingt Umbruch zwischen den Wörtern */
  .wp-block-site-title a{
    display: block !important;
  }

  /* Button kleiner */
  .wp-block-button__link{
    font-size: 10.5px !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
  }

  /* Navigation (AGB / Impressum) kleiner */
  .wp-block-navigation a{
    font-size: 10px !important;
  }

}
/* =================================
   MOBILE: Sparrings-partner sauber trennen
   ================================= */
@media (max-width: 600px){

  /* erlaubt automatische Silbentrennung */
  h1, h2, h3 {
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
  }

}
/* Mobile-only Umbruch */
/* Standard: kein Umbruch sichtbar */
.mobile-break{
  display: none !important;
}

/* Desktop + Tablet: Wort darf NICHT umbrechen */
@media (min-width: 601px){
  h1{
    white-space: nowrap !important;
  }
}
/* Mobile: Umbruch aktivieren */
@media (max-width: 600px){
  .mobile-break{
    display: block !important;
  }
}
}
/* Default: Mobile-Umbruch + Bindestrich aus */
.mobile-break{ display: none !important; }
.mobile-hyphen{ display: none !important; }

/* Mobile: Umbruch + Bindestrich an */
@media (max-width: 600px){
  .mobile-break{ display: block !important; }
  .mobile-hyphen{ display: inline !important; }
}
/* =================================
   MOBILE: Header Titel kleiner
   ================================= */
@media (max-width: 600px){

  header .wp-block-site-title{
    font-size: 10px !important;   /* wenn noch kleiner → 9px */
    line-height: 1.1 !important;
  }

}