/* Custom CSS */
html { scroll-behavior: smooth;}
h1 {font-weight: 400;}
h2.lighter, h2.lighter {font-weight: 500;}


/* Suppress the category image as featured by the modified shop template */
.cat_image {display: none !important;}

/* style the custom image */
.custom_cat_image_container {
    border: 1px solid #DDDDDD;
    padding: 25px;
    width: inherit;
    height: 300px;
    position: relative;
    background: white;
    margin: 0 auto;
    margin-bottom: 25px;
    /* box-shadow: 0 0 3px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12); */
}
.custom_cat_image_container {
    display: flex;
    align-items: center;
    height: auto;          /* statt festem height: 300px */
    min-height: 300px;
    box-sizing: border-box;
    overflow: hidden;      /* statt Clearfix für die Floats */
}
.custom_cat_image_c1 {
    float: left;
    width: 300px;
    border-right: 1px solid #DDD;
}
.custom_cat_image_c1 {
    float: none;
    flex: 0 0 300px;
    box-sizing: border-box;
    text-align: center;
}

.custom_cat_image {
    width: 250px;
}
.custom_cat_image img {
    max-height: 250px;
}
.custom_cat_image_c2 {
    float: left;
    padding-left:50px;
    width: 65%;
}
.custom_cat_image_c2 h2 {
    color: #515151;
    font-weight: 300;
    padding-top: 15px;
    margin: 0 0 8px 0;
    font-size: 30px;
    font-weight: 300;
}

.custom_cat_image_c2 h3 {
    color: #515151;
    font-weight: 500;
}
.custom_cat_image_c2 p {
    max-width: 500px;
}
.custom_cat_image_c2 .button {
    display: inline-block;   /* damit margin-top und width greifen */
    box-sizing: border-box;
    text-align: center;
    margin-top: 25px;
    outline: 0;
    border: 0;
    background: none;
    border: 1px solid #d9d9d9;
    padding: 8px 14px;
    color: #515151;
    text-transform: uppercase;
    width: 125px;
    font-family: inherit;
    transition: all 0.3s ease;
    font-weight: 500;
}

.custom_cat_image_c2 .button:hover {
    /* background: darken(white, 2%); */
    border: 1px solid #DDD;
    color: #DDD;
    text-decoration: none;
}
.cat_decription #copytext {
    display: block;
    height: 0;
    scroll-margin-top: 100px;   /* an die Höhe eines fixierten Headers anpassen */
}
/* Schmale Bildschirme / Mobilgeräte: Bild oben, Linie horizontal, Teaser darunter */
@media (max-width: 768px) {
    .custom_cat_image_container {
        display: block;          /* hebt ein evtl. gesetztes display:flex auf */
        height: auto;
        min-height: 0;
        overflow: hidden;
    }
    .custom_cat_image_c1,
    .custom_cat_image_c2 {
        float: none;
        display: block;
        width: 100%;             /* jede Spalte nimmt die volle Breite, Teaser rutscht nach unten */
        flex: none;
        box-sizing: border-box;
    }
    .custom_cat_image_c1 {
        border-right: 0;
        border-bottom: 1px solid #DDD;
        padding-bottom: 25px;
        text-align: center;
    }
    .custom_cat_image {
        max-width: 100%;
    }
    .custom_cat_image_c2 {
        padding-left: 20px;
        padding-top: 25px;
    }
    .custom_cat_image_c2 p {
        max-width: none;
    }
}

/* Zweispaltiger Fließtext in der Kategoriebeschreibung */
.cat_description {
    column-width: 22rem;     /* so viele Spalten, wie mit mind. 22rem Breite passen (max. 2) */
    column-count: 2;
    column-gap: 2.5rem;
    column-fill: balance;
    margin-bottom: 35px;
}
/* Abstand nur nach unten, damit keine Spalte oben einen Leerraum hat */
.cat_description > p {
    margin-top: 0;
    margin-bottom: 1em;   /* an den Abstand des Templates anpassen */
}

/* Ohne Teaser-Container bleibt der obere Abstand des ersten Absatzes erhalten */
.cat_description > p:first-child {
    margin-top: 1em;      /* an den Abstand des Templates anpassen */
}

/* Nicht zweispaltig: Bild-Teaser-Container, Überschriften und Download-Block */
.cat_description .custom_cat_image_container,
.cat_description h1,
.cat_description h2,
.cat_description .category-attachements-container,
.cat_description .media_block {
    column-span: all;
}

/* Überschriften nicht am Spaltenende allein stehen lassen */
.cat_description h2,
.cat_description h3 {
    break-after: avoid;
}

/* Keine einzelnen Zeilen am Anfang oder Ende einer Spalte */
.cat_description p {
    orphans: 3;
    widows: 3;
    break-inside: auto;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Clearfix-Pseudoelemente würden sonst als eigene Spaltenboxen mitzählen */
.cat_description::before,
.cat_description::after {
    display: none;
}

/* Kleine Bildschirme: einspaltig */
@media (max-width: 768px) {
    .cat_description {
        column-count: 1;
        column-width: auto;
    }
}


/* Full-width section within the homepage's multicolumn text. */
.home_text .bmg-usps {
  -webkit-column-span: all;
  column-span: all;
  column-count: 1;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #dfe5e9;
}

.bmg-usps,
.bmg-usps * {
  box-sizing: border-box;
}

.home_text .bmg-usps > h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.2;
}

.home_text .bmg-usps > p {
  margin-bottom: 28px;
  color: #53616b;
  font-size: 18px;
  line-height: 1.6;
}

/* Each existing container holds a pair of cards. */
.bmg-usps .usp-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.bmg-usps .usp-container:last-child {
  margin-bottom: 0;
}

.bmg-usps .usp {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 28px;
  background: #f7f9fa;
  border: 1px solid #e1e7eb;
  border-radius: 12px;
}

/* Neutralize any legacy column sizing on these elements. */
.bmg-usps .usp > .col-1,
.bmg-usps .usp > .col-2 {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.bmg-usps .usp-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.bmg-usps .usp-image img {
  display: block;
  width: 100%;
  max-width: 64px;
  height: 64px !important;
  object-fit: contain;
}

.bmg-usps .usp-title {
  display: block;
  margin-bottom: 10px;
  color: #243746;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.bmg-usps .usp-description {
  display: block;
  color: #46535c;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .bmg-usps .usp-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
  }

  .bmg-usps .usp {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .bmg-usps .usp {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .bmg-usps .usp-image,
  .bmg-usps .usp-image img {
    height: 44px !important;
  }

  .bmg-usps .usp-title {
    font-size: 18px;
  }
}
/* The outer inline wrapper handles spanning the template columns. */
.home_text .bmg-usps {
  -webkit-column-span: none;
  column-span: none;
  column-count: auto;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
