/* Betrifft Kinder – Cassiopeia im Look des bisherigen ja_purity-Templates */

:root {
  --cassiopeia-color-primary: #cc0000;
  --cassiopeia-color-hover: #cc0000;
  --cassiopeia-color-link: #cc0000;
  --link-color: #cc0000;
  --link-hover-color: #cc0000;
  --body-bg: #ffffe3;
  --body-color: #003366;
  --bk-red: #cc0000;
  --bk-yellow: #ffcc66;
  --bk-cream: #ffffe3;
  --bk-blue: #003366;
}

body {
  color: var(--bk-blue);
  background: var(--bk-cream);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  line-height: 160%;
}

a {
  color: var(--bk-red);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--bk-red);
  text-decoration: underline;
}

/* Überschriften */
h1, h2, h3, h4,
.contentheading, .componentheading {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: var(--bk-red);
  font-weight: bold;
}

h1 { font-size: 160%; line-height: 30px; margin-bottom: 20px; }
h2 { font-size: 130%; }
h3 { font-size: 115%; }
h4 { font-size: 100%; }

.container-component h2,
.container-component .item-title {
  padding: 15px 0 8px;
  margin: 0 0 24px;
  line-height: 140%;
  border-bottom: 1px solid #ececec;
}

.item-title a {
  color: var(--bk-red);
}

/* Weiterlesen */
.readmore {
  margin: 20px 0;
}

.readmore a.btn,
.readmore a.btn:hover {
  padding: 0;
  margin-top: 10px;
  color: var(--bk-red);
  font-weight: bold;
  text-transform: uppercase;
  background: none;
  border: 0;
  box-shadow: none;
}

/* Seitenbreite 980px wie bisher */
.grid-child {
  max-width: 980px;
}

/* Spalten wie bisher: links 196px, Inhalt mit 40px/21px Abstand, rechts 196px */
@supports (display: grid) {
  .site-grid {
    grid-gap: 0;
    padding-top: 6px;
    grid-template-columns: [full-start] minmax(0, 1fr) [main-start] minmax(0, 196px) minmax(0, 294px) minmax(0, 294px) minmax(0, 196px) [main-end] minmax(0, 1fr) [full-end];
  }

  @media (width >= 992px) {
    .site-grid .container-component {
      padding: 0 21px 0 40px;
    }
  }

  @media (width <= 991.98px) {
    .site-grid {
      padding-left: 10px;
      padding-right: 10px;
    }
  }
}

/* Startseite: Überschrift mit Abstand nach oben wie bisher */
body.itemid-239 .container-component {
  padding-top: 30px;
}

/* Kopfbereich */
.container-header {
  background: var(--bk-red);
  box-shadow: none;
}

.container-header .grid-child {
  padding: 0;
}

.container-header .navbar-brand {
  padding: 30px 0 27px;
}

.container-header .brand-logo img {
  max-width: 100%;
  height: auto;
}

/* Gelbe Hauptnavigation (Desktop) */
.container-header .container-nav {
  padding: 0;
  background: var(--bk-yellow);
  box-shadow: 0 0 0 100vmax var(--bk-yellow);
  clip-path: inset(0 -100vmax);
}

.container-header ul.desktop {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.container-header ul.desktop > li {
  margin: 0 1px 0 0;
  padding: 0;
}

.container-header ul.desktop > li > a {
  display: block;
  padding: 10px 12px;
  line-height: 15px;
  color: var(--bk-red);
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
}

.container-header ul.desktop > li.active,
.container-header ul.desktop > li:hover {
  background: var(--bk-cream);
}

/* Seitenleisten: keine Kästen, Module wie bisher */
.container-sidebar-left {
  padding-top: 25px;
}

.container-sidebar-right {
  padding-top: 15px;
}

.container-sidebar-right .moduletable:first-child {
  margin-top: 0;
}

.container-sidebar-left .moduletable {
  margin: 0;
  padding: 0 0 20px;
  border-bottom: 1px solid #c0c0c0;
}

.container-sidebar-left .moduletable + .moduletable {
  padding-top: 15px;
}

.container-sidebar-left .moduletable > *:last-child,
.container-sidebar-left .mod-search form {
  margin-bottom: 0;
}

.container-sidebar-left ul.bk-sidemenu {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Punkte und Trennlinien sitzen am Link, damit sie bei offenem Untermenü an der richtigen Zeile bleiben */
.container-sidebar-left ul.bk-sidemenu li {
  margin: 0;
  padding: 0;
  background: none;
}

.container-sidebar-left ul.bk-sidemenu li a {
  display: block;
  font-size: 88%;
  padding: 2px 0 2px 15px;
  line-height: 1.68;
  color: var(--bk-red);
  background:
    url("../images/bullet.gif") no-repeat 5px 50%,
    url("../images/hdot2.gif") repeat-x bottom;
  text-decoration: none;
}

.container-sidebar-left ul.bk-sidemenu li.active > a {
  background:
    url("../images/bullet3.gif") no-repeat 5px 50%,
    url("../images/hdot2.gif") repeat-x bottom;
}

.container-sidebar-left ul.bk-sidemenu li a:hover,
.container-sidebar-left ul.bk-sidemenu li.active > a {
  font-weight: bold;
}

/* Untermenü der aktiven Seite: immer offen, eingerückt, rote Punkte, ohne Trennlinien */
.container-sidebar-left ul.bk-sidemenu li ul {
  margin: 2px 0 4px;
  padding: 0 0 0 12px;
  list-style: none;
}

.container-sidebar-left ul.bk-sidemenu li li a {
  font-size: 88%;
  font-weight: normal;
  background: url("../images/bullet3.gif") no-repeat 5px 50%;
}

.container-sidebar-left ul.bk-sidemenu li li.active > a {
  font-weight: normal;
  background: url("../images/bullet3.gif") no-repeat 5px 50%;
}

.container-sidebar-left ul.bk-sidemenu li li.current > a {
  font-weight: bold;
  background: url("../images/bullet3.gif") no-repeat 5px 50%;
}

.container-sidebar-left ul.bk-sidemenu li li a:hover {
  font-weight: bold;
}

.container-sidebar-left ul.bk-sidemenu > li.active:has(> ul) {
  background: var(--bk-cream);
  border-bottom: 1px dotted #c9c3a8;
}

/* Kasten „Aktuell“ */
.moduletable.aktuell {
  background: #fff;
  padding: 15px 10px;
  border: 1px solid #e9e9e9;
}

.moduletable.aktuell h3 {
  text-transform: uppercase;
  border-bottom: 2px solid #e9e9e9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.moduletable.aktuell ul {
  margin: 0;
  padding-left: 5px;
  list-style: none;
}

.moduletable.aktuell li {
  margin: 0;
  padding: 0 0 0 15px;
  font-size: 82%;
  line-height: 22px;
  background: url("../images/bullet3.gif") no-repeat 5px 8px;
}

.moduletable.aktuell li a {
  font-size: inherit;
}

/* Suche: schlichtes Eingabefeld wie bisher */
.container-sidebar-left .mod-search .form-control {
  height: auto;
  padding: 2px 6px;
  font-size: 90%;
  line-height: 20px;
  color: var(--bk-blue);
  background: #fff;
  border: 1px solid #767676;
  border-radius: 0;
  box-shadow: none;
}

/* Breadcrumbs: nicht auf der Startseite, klein mit Pfeil-Trennern */
body.itemid-239 .mod-breadcrumbs__wrapper {
  display: none;
}

.mod-breadcrumbs.breadcrumb {
  margin: 0 0 10px;
  padding: 0 !important;
  font-size: 11px;
  background: none;
}

.mod-breadcrumbs__divider {
  display: none;
}

.mod-breadcrumbs .breadcrumb-item {
  color: var(--bk-blue);
}

.mod-breadcrumbs .breadcrumb-item + .breadcrumb-item {
  margin-left: 10px;
  padding-left: 0;
}

.mod-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  content: url("../images/arrow.png");
  float: none;
  padding-right: 0;
  margin-right: 10px;
}

.mod-breadcrumbs .breadcrumb-item.active {
  color: var(--bk-blue);
}

/* Fußzeile */
.footer {
  color: #666;
  background: var(--bk-yellow);
  border-top: 1px solid #ececec;
}

.footer .grid-child {
  padding: 1rem 0 20px;
}

.footer a:not(.btn) {
  color: #666;
}

/* Mobiles Menü: Button in der gelben Leiste */
.bk-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 8px 14px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  background: var(--bk-red);
  border: 0;
  border-radius: 6px;
}

.bk-menu-toggle:hover,
.bk-menu-toggle:focus-visible {
  background: #a30000;
}

.bk-burger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.bk-burger span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* Mobiles Menü: Panel von rechts, auf dem Handy bildschirmfüllend */
.bk-offcanvas.offcanvas-end {
  --offcanvas-width: min(100vw, 420px);
  color: var(--bk-blue);
  background: var(--bk-cream);
  border-left: 0;
  box-shadow: -6px 0 24px rgba(0, 0, 0, .2);
}

.bk-offcanvas__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 12px 18px 16px;
  background: var(--bk-red);
}

.bk-offcanvas__logo {
  min-width: 0;
  max-width: calc(100% - 56px);
  height: auto;
}

.bk-offcanvas__close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: none;
  border: 0;
  border-radius: 50%;
}

.bk-offcanvas__close:hover,
.bk-offcanvas__close:focus-visible {
  background: rgba(255, 255, 255, .15);
}

.bk-offcanvas__body {
  flex-grow: 1;
  overflow-y: auto;
  border-top: 4px solid var(--bk-yellow);
}

.bk-mm {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bk-mm__item {
  border-bottom: 1px solid rgba(204, 0, 0, .12);
}

.bk-mm .bk-mm .bk-mm__item:last-child {
  border-bottom: 0;
}

.bk-mm__row {
  display: flex;
  align-items: stretch;
}

.bk-mm__link {
  flex: 1 1 auto;
  display: block;
  padding: 13px 16px 13px 20px;
  color: var(--bk-red);
  font-size: 17px;
  font-weight: bold;
  line-height: 1.35;
  text-decoration: none;
  border-left: 4px solid transparent;
}

.bk-mm__link:hover,
.bk-mm__link:focus-visible {
  color: var(--bk-red);
  text-decoration: none;
  background: rgba(255, 204, 102, .35);
}

.bk-mm__item.is-current > .bk-mm__row > .bk-mm__link {
  border-left-color: var(--bk-red);
  background: rgba(255, 204, 102, .45);
}

.bk-mm__toggle {
  position: relative;
  flex: 0 0 52px;
  padding: 0;
  background: none;
  border: 0;
  border-left: 1px solid rgba(204, 0, 0, .12);
}

.bk-mm__toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -7px 0 0 -5px;
  border-right: 2px solid var(--bk-red);
  border-bottom: 2px solid var(--bk-red);
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}

.bk-mm__toggle[aria-expanded="true"]::before {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.bk-mm__toggle:hover,
.bk-mm__toggle:focus-visible {
  background: rgba(255, 204, 102, .35);
}

/* Unterebenen: eingerückt, hellere Flächen, kleinere Schrift */
.bk-mm--level-2 {
  background: #fff6d9;
  border-top: 1px solid rgba(204, 0, 0, .12);
}

.bk-mm--level-2 .bk-mm__link {
  padding-left: 32px;
  color: var(--bk-blue);
  font-size: 16px;
  font-weight: normal;
}

.bk-mm--level-3 {
  background: #fffdf3;
  border-top: 1px solid rgba(204, 0, 0, .08);
}

.bk-mm--level-3 .bk-mm__link {
  padding-left: 44px;
  font-size: 15px;
}

.bk-mm--level-4 {
  background: #fff;
  border-top: 1px solid rgba(204, 0, 0, .08);
}

.bk-mm--level-4 .bk-mm__link {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 56px;
  font-size: 14px;
}

.bk-mm .bk-mm .bk-mm__item.is-active > .bk-mm__row > .bk-mm__link {
  color: var(--bk-red);
  font-weight: bold;
}

/* Mobil: Menü-Button statt gelber Leiste, ohne Untermenü links */
@media (width <= 991.98px) {
  .container-header .container-nav {
    justify-content: flex-end;
    padding: 8px 10px;
  }

  .container-header ul.desktop,
  .container-sidebar-left ul.menusecond_desktop {
    display: none !important;
  }

  .container-header .navbar-brand {
    padding: 20px 10px;
  }

  .container-header .container-nav {
    box-shadow: none;
    clip-path: none;
  }
}

/* Kontaktformular (RSForm „Kontakt“, Layout in der Formular-Konfiguration) */
.bk-form__title {
  margin-bottom: 20px;
}

.bk-form {
  padding: 0;
}

.bk-form__intro {
  margin-bottom: 20px;
  line-height: 1.6;
}

.bk-form__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px 18px;
}

.bk-form__field {
  grid-column: span 3;
  min-width: 0;
}

.bk-form__field--full {
  grid-column: 1 / -1;
}

.bk-form__field--plz {
  grid-column: span 2;
}

.bk-form__field--stadt {
  grid-column: span 4;
}

.bk-form label {
  display: block;
  margin-bottom: 5px;
  color: var(--bk-blue);
  font-size: 90%;
  font-weight: bold;
}

.bk-form__req {
  color: var(--bk-red);
}

#userForm .bk-form .rsform-input-box,
#userForm .bk-form .rsform-text-box {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 9px 11px;
  color: var(--bk-blue);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #bdb59a;
  border-radius: 4px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

#userForm .bk-form .rsform-text-box {
  min-height: 160px;
  resize: vertical;
}

#userForm .bk-form .rsform-input-box:hover,
#userForm .bk-form .rsform-text-box:hover {
  border-color: #a39b78;
}

#userForm .bk-form .rsform-input-box:focus,
#userForm .bk-form .rsform-text-box:focus {
  outline: 0;
  background: #fff;
  border-color: var(--bk-red);
  box-shadow: 0 0 0 3px rgba(255, 204, 102, .6);
}

/* Fehlermeldungen von RSForm */
.bk-form .formNoError {
  display: none;
}

.bk-form .formError {
  display: block;
  margin-top: 4px;
  color: var(--bk-red);
  font-size: 85%;
  font-weight: bold;
}

#userForm .bk-form .rsform-error {
  border-color: var(--bk-red);
  background: #fff4f4;
}

.bk-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #ececec;
}

.bk-form__note {
  color: #666;
  font-size: 85%;
}

#userForm .bk-form .rsform-submit-button {
  padding: 11px 30px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--bk-red);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 2px 0 #8f0000;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}

#userForm .bk-form .rsform-submit-button:hover,
#userForm .bk-form .rsform-submit-button:focus-visible {
  background: #a30000;
}

#userForm .bk-form .rsform-submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #8f0000;
}

#userForm .bk-form .rsform-submit-button:focus-visible {
  outline: 3px solid var(--bk-yellow);
  outline-offset: 2px;
}

@media (width <= 575.98px) {
  .bk-form__field,
  .bk-form__field--plz,
  .bk-form__field--stadt {
    grid-column: 1 / -1;
  }

  .bk-form__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  #userForm .bk-form .rsform-submit-button {
    width: 100%;
  }
}

/* Blog: Liste „weitere Beiträge“ wie bisher mit Punkten */
.com-content-blog__links {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.com-content-blog__links li {
  padding-left: 15px;
  background: url("../images/bullet3.gif") no-repeat 5px .65em;
}

.com-content-blog__links a {
  text-decoration: none;
}

.com-content-blog__links a:hover {
  text-decoration: underline;
}

/* Blog: Seitenzähler und Pagination */
.com-content-category-blog__navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #c0c0c0;
}

.com-content-category-blog__counter {
  order: 2;
  float: none !important;
  margin: 0;
  padding: 0 !important;
  color: #666;
  font-size: 85%;
  white-space: nowrap;
}

.com-content-category-blog__pagination {
  order: 1;
}

.com-content-category-blog__navigation .pagination {
  --pagination-padding-x: 0;
  --pagination-padding-y: 0;
  --pagination-color: var(--bk-red);
  --pagination-bg: transparent;
  --pagination-border-width: 0;
  --pagination-hover-color: var(--bk-red);
  --pagination-hover-bg: var(--bk-yellow);
  --pagination-focus-color: var(--bk-red);
  --pagination-focus-bg: var(--bk-yellow);
  --pagination-focus-box-shadow: 0 0 0 3px rgba(204, 0, 0, .25);
  --pagination-active-color: #fff;
  --pagination-active-bg: var(--bk-red);
  --pagination-disabled-color: #c9bfa3;
  --pagination-disabled-bg: transparent;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 !important;
}

.com-content-category-blog__navigation .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px !important;
  transition: background-color .15s ease, color .15s ease;
}

.com-content-category-blog__navigation .page-link [class^="icon-"] {
  font-size: 13px;
}

/* Gelbe Menüleiste bleibt beim Scrollen oben stehen (Höhe des roten Banners setzt js/user.js) */
body .container-header {
  position: sticky !important;
  top: calc(-1 * var(--bk-brand-h, 100px));
  z-index: 1020;
}

.container-header .container-nav {
  transition: box-shadow .2s ease;
}

.container-header.is-stuck .container-nav {
  box-shadow: 0 0 0 100vmax var(--bk-yellow), 0 3px 8px 100vmax rgba(0, 0, 0, .15);
}

/* Sprungziele (Anker) nicht unter der Leiste verstecken */
html {
  scroll-padding-top: calc(var(--bk-nav-h, 35px) + 10px);
}

@media (width <= 991.98px) {
  .container-header.is-stuck .container-nav {
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
  }
}
