 :root {
      /* --khg-primary: #f6e27f;     Milderes Gelb – freundlich und weniger grell */
      /*--khg-primary: #ffd600;     Sonnengelb */
      /*--khg-secondary: #00897b;    Türkisgrün – Akzentfarbe */
      --khg-akzent: #f0ad4e;
      --khg-light: #f5f5f5;       /* Heller Hintergrund */
      --khg-dark: #212121;        /* Dunkles Grau – Texte & Struktur */
      --text-muted: #48515d;

      --khg-primary: #d0e8f2;     /* Hellblau – frisch, informativ und freundlich */
      --khg-secondary: #0077a2;   /* Klarer Blaugrünton – modern, frisch, kontrastreich */ 
      --khg-footer-bg: #4090b2;
    }
    body {
      font-family: 'Segoe UI', sans-serif;
      background-color: var(--khg-light);
      hyphens: auto;
    }
    .navbar {
      background-color: var(--khg-primary) !important;
      /* background-color: yellow !important; */
    }
    .navbar .nav-link,
    .navbar .navbar-brand {
      color: #000 !important;
    }
    .navbar-brand>img {
      /* height:45px; */
      height:60px;
    }
    .navbar-brand span{
      line-height: 1;
      /* font-size: 19px; */
      font-size: 18px;
      font-weight: normal;
      color: var(--khg-secondary);
    }
    .navbar .nav-link:hover {
      color: var(--khg-secondary) !important;
    }

    @media (min-width: 1200px) {
        #navbarNavDropdown .dropdown-menu.khg-align-end {
            left: auto;
            right: 0;
        }
    }

    .hero {
      background-color: var(--khg-dark);
      color: white;
      text-shadow: 0 0 10px rgba(0,0,0,0.7);
      /* padding: 5rem 0; */
      position: relative;
      z-index: 1;
    }
    .btn {
      border-radius: 30px;
      padding: 0.4rem 1rem;
      margin:5px 5px;
    }
    .btn-primary {
      /* background-color: var(--khg-secondary); */
      background: linear-gradient(135deg, var(--khg-secondary), #01506d);
      border: none;
    }
    .btn-primary:hover {
      /* background-color: #01506d; */
      /* background: linear-gradient(135deg, #01506d, #0099cc); */
      background: linear-gradient(135deg, #026487, #014d66);
    }
    .overlap-section {
      margin-top: -100px;
      position: relative;
      z-index: 2;
    }
    .icon-box {
      border-radius: 0.5rem;
      background-color: white;
      /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); */
      box-shadow: 22px 22px 25px rgba(0, 0, 0, 0.80);
      padding: 2rem;
      text-align: center;
      height: 100%;
      display: flex;
      flex-direction: column;
      /* justify-content: space-between; */
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .icon-box:hover {
      transform: translateY(-5px);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    }
    .icon-box h3, h3 {
      color: var(--khg-secondary);
    }
    .icon-box i.bi {
      font-size: 4rem;
      color: var(--khg-akzent);
      
    }
    .icon-box-linked {
        position: relative;
    }

    .icon-box-linked h3 a::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
    }
    .icon-box-linked h3 a:hover {
        text-decoration: none;
    }
    .icon-box-linked:has(h3 a:focus-visible) {
        outline: 2px solid var(--khg-secondary);
        outline-offset: 4px;
    }




    .equal-height-row > [class^="col"] {
      display: flex;
    }
    .image-row img,
    .icon-box img {
      border-radius: 0.5rem;
      object-fit: cover;
    }
    .icon-box .ce-gallery figure.image img {
      height: 150px;
    }
    .bg-light {
      background-color: #e6f1f8 !important;
    }
    section h2 {
      color: var(--khg-dark);
    }

/* RTE: semantische H2 mit der Darstellung einer H3. */
h2.h3-style {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: calc(1.3rem + 0.6vw);
    font-weight: 500;
    line-height: 1.2;
    color: var(--khg-secondary);
}

@media (min-width: 1200px) {
    h2.h3-style {
        font-size: 1.75rem;
    }
}


.nav-item a.nav-link.active {
  
  color: var(--khg-secondary);
}
.dropdown-item.active, .dropdown-item:active {
  color: var(--bs-dropdown-link-active-color);
  text-decoration: none;
  background-color: var(--khg-secondary);
}
.maincontent a, .maincontent .bg-light a  {
  text-decoration: none;
  color: var(--khg-secondary);
}

.maincontent a:hover {
  text-decoration: underline;
}

.maincontent a.btn {
 
  color: #fff;
}

.maincontent a.btn:hover {
 
  text-decoration: none;
}


.khg-text-highlight {
  /* font-weight: bold; */
  font-size: 1.4rem; 
}

video, .video-embed iframe {
  border-radius: 0.5rem;
}

/* video::-webkit-media-controls {
  display: none;
} */


 /*Damit es keinen Abstand bei Header und Footer gibt, wenn die Container-Fluid-Klasse verwendet wird. */
.maincontent>section>.container-fluid.px-0>.row {
  margin-left:0;
  margin-right:0;
}
.maincontent>section>.container-fluid.px-0>.row>.col-12 {
  padding-left:0;
  padding-right:0;
}




div.center-cropped, .news-single .image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    /* padding-top: 70%; */
    background-color: #ddd;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}
div.center-cropped img, .news-single .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Galerie-Regel mit height: auto übersteuern, damit object-fit mittig beschneidet. */
.ce-gallery figure.image div.center-cropped img,
.news-single .ce-gallery figure.image .image-wrapper img {
    height: 100%;
}

.news-single .ce-gallery figure.video .video-embed {
  padding-top: 0px;
}

.galerie figure {
  margin: 0.5rem;
}

.ce-textpic img, .ce-gallery img {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; 
}

.image-caption {
  font-size: 14px;
}


/* Header Begin */


@media (min-width: 1200px) {
    .h4, h4 {
        font-size: 1.3rem;
    }
}

/* Header End */


/* Carousel Begin */

.carousel .image-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* background-color: rgba(13, 60, 97, 0.5); */
  background-color: rgba(0, 0, 0, 0.5);
  
  z-index: 2;
}

.carousel .dark-1 .image-overlay {
  background-color: rgba(0, 0, 0, 0.1);
}

.carousel .dark-2 .image-overlay {
  background-color: rgba(0, 0, 0, 0.2);
}

.carousel .dark-3 .image-overlay {
  background-color: rgba(0, 0, 0, 0.3);
}

.carousel .dark-4 .image-overlay {
  background-color: rgba(0, 0, 0, 0.4);
}

/* Hintergrundbanner ohne Text brauchen nur eine leichte Abdunklung. */
.carousel.carousel-no-text .image-overlay,
.carousel-no-text .carousel .image-overlay {
  background-color: rgba(0, 0, 0, 0.1);
}

.carousel .carousel-caption {
  
  z-index: 3;
}

.carousel h1 {
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}


.carousel .bg-video {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel .bg-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Carousel End */


/* Leitbild Begin */

.leitbild i.bi {
  color: var(--khg-secondary);
}



/* Leitbild End */

 /* To Top Button Begin */

#toTop {
  position: fixed;
  left: 10px;
  bottom: 25px;
  cursor: pointer;
  z-index: 100;
}

#toTop a {
  background-color: var(--khg-secondary);
  color: #fff;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s linear;
  padding: 8px 10px;
  display: none;
}

#toTop a:hover {
  opacity: 0.7;  
}

/* To Top Button End */    


/* Lange Links auf kleinen Bildschirmen umbrechen */
a {
    overflow-wrap: anywhere;
}


.card {
  border-radius: 1rem;
  /* border-top-left-radius: 1rem;
  border-top-right-radius: 1rem; */
}

.card>img:first-child {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.accordion-button:not(.collapsed) {
    
    background-color: var(--khg-primary);
}

.accordion-button,
.accordion-button:focus,
.accordion-button:not(.collapsed) {
    box-shadow: none;
    outline: none;
}






/* TX_NEWS Begin */  

/* .news-list-view .category-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  z-index: 2;
} */

.news-list-view .news-categories {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.news-list-view .category-badge {
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.news-list-view .card-img-container {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}
.news-list-view .card-img-top {
  /* border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  object-fit: cover;
  height: 200px;
  transition: transform 0.4s ease; */
  object-fit: cover;
  height: 200px;
  width: 100%;
  transition: transform 0.4s ease;
}

.news-list-view .card-img-container::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0);
      transition: background-color 0.4s ease;
      pointer-events: none;
    }
.news-list-view .card:hover .card-img-top {
  transform: scale(1.05);
}
.news-list-view .card:hover .card-img-container::after {
  background-color: rgba(0, 0, 0, 0.2);
}

.news-list-view .card {
  border-radius: 1rem;
  
}
/* .news-list-view .card:hover {
  transform: translateY(-5px);
} */
.news-list-view .card:hover .card-img-top {
  transform: scale(1.05);
}

.news-list-view .btn-modern {
  /* background: linear-gradient(135deg, #007bff, #00c6ff); */
  background: linear-gradient(135deg, var(--khg-secondary), #01506d);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 0.4rem 1rem;
}
.news-list-view .btn-modern:hover {
  /* background: linear-gradient(135deg, #01506d, #0099cc); */
  background: linear-gradient(135deg, #026487, #014d66);
}

.news-list-view .card-title>a {
  text-decoration: none;
  color: var(--khg-dark);
}

.news-single img {
  border-radius: 0.5rem;
}



.news-single .header-img-container {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 1rem 1rem;
  max-height: 300px;
}
.news-single .header-img-container img {
  border-radius: 0 0 1rem 1rem;
}
.news-single .header-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  display: block;
}

@media (min-width: 768px) {
  .news-single .header-img-container {
    max-height: 400px;
  }
  .news-single .header-img {
    height: 400px;
  }
}

.news-single .header-img-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.5s ease;
}
.news-single .header-img-container:hover .header-img {
  transform: scale(1.05);
}
.news-single .header-img-container:hover::after {
  background: rgba(0,0,0,0.2);
}
/* .news-single .category-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  z-index: 2;


} */
.news-single .news-categories {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-single .category-badge {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}




.news .pagination {
  
  display: flex;
  justify-content: center;
  /* margin-top: 2rem; */
}

.news .pagination:last-child {
  margin-top: 2rem;
}

.news .active>.page-link {
  background-color: var(--khg-secondary);
}

/* TX_NEWS End */  

 /* FOOTER Begin  */
/* footer.css */

footer {
  background-color: #d0e8f2;
  /* background-color: var(--khg-footer-bg); */
  color: #f8f9fa;
  /* padding-top: 3rem; */
  padding-bottom: 1.5rem;
  margin-top: 3rem;
  color: #000;
}

.footer-logo {
  max-width: 160px;
  /* margin-bottom: 1rem; */
}

footer .legal p {
  margin-bottom: 0.2rem;
}

footer p {
  
  color: #000;
}

footer .ce-gallery figure {
  margin-bottom:0px;
}

footer .ce-gallery figure.image img {
  box-shadow: none !important;
}

footer a {
  /* color: #f8f9fa; */
  color: #000;
  text-decoration: none;
}

footer a:hover {
  /* color: #ffcc00; */
  color: #f0aa56;
  /* text-decoration: underline; */
  text-decoration: none;
}

footer h5 {
  color: #ffcc00;
  margin-bottom: 1rem;
}

footer .footer-link a {
  display: block;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #6c757d;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}






 /* FOOTER End  */

.text-justify {
 text-align: justify;
  text-justify: inter-word;
}





/* Modal Begin */

/* .modal-launcher.bg-image {
    min-height: 220px;
    padding: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: flex-end;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.modal-launcher[style*="background-image"]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.8),
        rgba(0,0,0,.05)
    );
    z-index: -1;
} */

.modal-launcher.bg-image {
    min-height: 220px;
    padding: 24px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

/* .modal-launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, .85) 0%,
        rgba(0, 0, 0, .3) 55%,
        transparent 100%
    );
    z-index: -1;
} */


/* .modal-launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(16, 65, 92, 0.78) 0%,
        rgba(16, 65, 92, 0.25) 45%,
        rgba(16, 65, 92, 0) 80%
    );
    z-index: -1;
} */


/* .modal-launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(16, 65, 92, 0.9) 0%,
        rgba(16, 65, 92, 0.4) 45%,
        rgba(16, 65, 92, 0) 90%
    );
    z-index: -1;
} */


.modal-launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(19, 74, 99, 0.644) 0%,
            rgba(19, 74, 99, 0.432) 35%,
            rgba(255, 255, 255, 0.10) 100%
        ),
        linear-gradient(
            rgba(255, 255, 255, 0.09),
            rgba(255, 255, 255, 0.09)
        );
    z-index: 0;
    pointer-events: none;
}
.modal-launcher > * {
    position: relative;
    z-index: 1;
}

.modal-launcher p {
    color: white;
    margin: 0;
    line-height: 1.4;
}

.modal-launcher p:first-child {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -.02em;
    margin-bottom: 6px;
}

.modal-launcher p:first-child strong {
    font-weight: inherit;
}

.modal-launcher p:nth-child(2) {
    font-size: .875rem;
    font-weight: 400;
    opacity: .9;
}

.modal-launcher:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}








/* Modal-Fenster */
.modal-content {
    border: 1px solid #dce7ed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(20, 58, 80, .16);
}

/* Kopfbereich */
.modal-header {
    background: #f2f8fb;
    border-bottom: 1px solid #dce7ed;
    padding: 18px 28px;
}

.modal-title {
    color: #173a4f;
    font-size: 1.5rem !important;
    font-weight: 600;
}

/* Inhalt */
.modal-body {
    padding: 24px 28px;
    color: #263e4e;
    line-height: 1.65;
}

.modal-body p {
    margin-bottom: 14px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* Fußbereich */
.modal-footer {
    border-top: 1px solid #e5edf1;
    padding: 12px 28px;
    background: #fafcfd;
}

/* Schließen-Button */
.modal-footer .btn-secondary {
    background: #21769a;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    color: #fff;
    transition: background .2s ease;
}

.modal-footer .btn-secondary:hover {
    background: #165572;
}



/* Modal End */




/* =====================================
   KHG Indexed Search – Suchformular
   ===================================== */

.khg-search {
    /* max-width: 850px; */
    margin: 20px 0 35px;
}

.khg-search .input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
}

.khg-search .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    height: 56px;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid #cbdfe8;
    border-radius: 10px 0 0 10px;
    font-size: 1.05rem;
    box-shadow: none;
}

.khg-search .form-control:focus {
    border-color: #0077a2;
    box-shadow: 0 0 0 3px rgba(0, 119, 162, 0.12);
    z-index: 2;
}

.khg-search .khg-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    align-self: stretch;
    height: 56px;
    min-height: 56px;
    margin: 0;
    padding: 0 25px;
    border: 1px solid #0077a2;
    border-radius: 0 10px 10px 0;
    background: #0077a2;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.khg-search .khg-search-button:hover {
    background: #005f82;
    border-color: #005f82;
    color: white;
}

@media (max-width: 575.98px) {
    .khg-search .form-control {
        padding: 0 12px;
    }

    .khg-search .khg-search-button {
        padding: 0 16px;
    }

    .khg-search .khg-search-button .bi {
        margin-right: 0 !important;
    }
}





/* =====================================
   KHG Indexed Search – Ergebnisse
   ===================================== */

.khg-search-result {
    padding: 24px 0;
    border-bottom: 1px solid #dce7ed;
}

.khg-search-result:last-child {
    border-bottom: none;
}

.khg-search-result-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
}

.khg-search-result-title a {
    color: #0077a2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.khg-search-result-title a:hover {
    color: #005f82;
    text-decoration: underline;
}

.khg-search-result-description {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* Gefundene Suchbegriffe hervorheben */
.khg-search-result-description strong,
.khg-search-result-description .tx-indexedsearch-redMarkup {
    color: #173a4f;
    background: #e1f1f7;
    font-weight: 600;
    border-radius: 3px;
    padding: 0 2px;
}

.khg-search-subresults {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid #dce7ed;
}

@media (max-width: 575.98px) {
    .khg-search-result {
        padding: 18px 0;
    }

    .khg-search-result-title {
        font-size: 1.15rem;
    }

    .khg-search-result-description {
        font-size: 0.95rem;
    }
}



/* Ergebnisüberschrift */
.khg-search-summary {
    margin: 10px 0 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dce7ed;
    font-size: 1.1rem;
    font-weight: 500;
    color: #173a4f;
}

.khg-search-count {
    font-weight: 700;
    color: #0077a2;
}

/* Ergebnisliste */
.khg-search-results {
    margin-bottom: 25px;
}

/* Paginierung */
.khg-search-pagination {
    margin: 25px 0 40px;
}

.khg-search-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.khg-search-pagination li {
    list-style: none;
}

.khg-search-pagination a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #dce7ed;
    border-radius: 7px;
    color: #0077a2;
    text-decoration: none;
}

.khg-search-pagination a:hover {
    background: #e7f3f8;
}

.khg-search-pagination a[aria-current="page"] {
    background: #0077a2;
    border-color: #0077a2;
    color: white;
}

/* Keine Treffer */
.khg-search-no-results {
    padding: 20px 0 35px;
    color: #65747e;
}





/* KHG Suchen Link */

.khg-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #173a4f;
    text-decoration: none;
    transition: all 0.2s ease;
}

.khg-search-link:hover,
.khg-search-link:focus {
    background: rgba(0, 119, 162, 0.1);
    color: #0077a2;
    text-decoration: none;
}

.khg-search-link i {
    font-size: 1.2rem;
    line-height: 1;
}


/* KHG Indexed Search  END*/



/* ==========================================
   KHG Navigation – Suche und Hamburger
   ========================================== */

.khg-navbar-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

/* Hauptnavigation */
#navbarNavDropdown {
    min-width: 0;
}

/* Rechte Bedienelemente */
.khg-navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    /* margin-left: 15px; */
}

/* Suchsymbol */
.khg-search-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 8px;
    color: #173a4f;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.khg-search-link i {
    font-size: 1.2rem;
    line-height: 1;
}

.khg-search-link:hover,
.khg-search-link:focus-visible {
    background: rgba(0, 119, 162, .1);
    color: #0077a2;
}

/* Desktop ab 1200px */
@media (min-width: 1200px) {
/* @media (min-width: 1100px) { */

    #navbarNavDropdown {
        justify-content: flex-end;
    }

    #navbarNavDropdown .navbar-nav {
        flex-wrap: nowrap;
    }

    #navbarNavDropdown .nav-link {
        white-space: nowrap;
    }

}

/* Tablet und Smartphone */
@media (max-width: 1199.98px) {
/* @media (max-width: 1099.98px) { */

    .khg-navbar-container {
        flex-wrap: wrap;
    }

    .khg-navbar-actions {
        margin-left: auto;
    }

    /* Menü unterhalb der Kopfzeile */
    #navbarNavDropdown {
        flex-basis: 100%;
        order: 3;
    }

    #navbarNavDropdown .navbar-nav {
        width: 100%;
    }

}



/* Menü Design für mobile Geräte */

/* =====================================
   KHG – Mobile Navigation
   ===================================== */

@media (max-width: 1199.98px) {
/* @media (max-width: 1099.98px) { */

    /* Gesamter Menübereich */
    #navbarNavDropdown {
        width: 100%;
        margin-top: 15px;
        padding-bottom: 12px;
    }

    /* Hauptnavigation */
    #navbarNavDropdown .navbar-nav {
        width: 100%;
        gap: 0;
    }

    /* Hauptmenüpunkte */
    #navbarNavDropdown .navbar-nav > .nav-item {
        border-top: 1px solid rgba(23, 58, 79, 0.12);
    }

    #navbarNavDropdown .navbar-nav > .nav-item > .nav-link {
        display: flex;
        align-items: center;
        padding: 13px 12px;
        font-weight: 500;
        color: #173a4f;
        white-space: normal;
    }

    #navbarNavDropdown .navbar-nav > .nav-item > .nav-link:hover {
        color: #0077a2;
    }

    /* Dropdown als Teil des mobilen Menüs */
    #navbarNavDropdown .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin: 0 0 10px;
        padding: 5px 12px;
        border: 0;
        border-radius: 8px;
        background: #eaf5fa;
        box-shadow: none;
    }

      /* Untermenüs kompakter */
    #navbarNavDropdown .dropdown-menu {
        margin: 0 0 6px;
        padding: 4px 10px;
    }

    /* Untermenüpunkte */
    #navbarNavDropdown .dropdown-item {
        padding: 10px 12px;
        color: #24566c;
        font-size: 0.95rem;
        white-space: normal;
        border-radius: 5px;
    }

    /* Weniger Abstand zwischen Untermenüpunkten */
    #navbarNavDropdown .dropdown-item {
        padding: 7px 12px;
        line-height: 1.4;
    }

    #navbarNavDropdown .dropdown-item:hover,
    #navbarNavDropdown .dropdown-item:focus {
        background: #d4eaf3;
        color: #0077a2;
    }

    /* Dropdown-Pfeile rechts positionieren */
    #navbarNavDropdown .navbar-nav > .dropdown > .dropdown-toggle {
        justify-content: space-between;
    }

    /* Suchlupe und Hamburger */
    .khg-navbar-actions {
        gap: 8px;
        margin-left: auto;
    }

    .khg-search-link {
        width: 42px;
        height: 42px;
    }

    /* Aktiver Hauptmenüpunkt */
    #navbarNavDropdown .navbar-nav > .nav-item > .nav-link.active,
    #navbarNavDropdown .navbar-nav > .nav-item > .nav-link[aria-current="page"] {
        color: #0077a2;
        font-weight: 600;
    }

    /* Aktiver Untermenüpunkt */
    #navbarNavDropdown .dropdown-item.active,
    #navbarNavDropdown .dropdown-item[aria-current="page"] {
        background: rgba(0, 119, 162, 0.08);
        color: #0077a2;
        font-weight: 600;
        border-radius: 5px;
    }

    /* Geöffneten Menüpunkt hervorheben */
    #navbarNavDropdown .dropdown-toggle[aria-expanded="true"] {
        color: #0077a2;
        font-weight: 600;
    }


    /* Mobiles Menü: Untermenü mit aktivem Eintrag öffnen */
    #navbarNavDropdown .dropdown-menu:has(.dropdown-item.active),
    #navbarNavDropdown .dropdown-menu:has([aria-current="page"]) {
        display: block;
    }

    /* Übergeordneten Menüpunkt hervorheben */
    #navbarNavDropdown .dropdown:has(.dropdown-item.active) > .dropdown-toggle,
    #navbarNavDropdown .dropdown:has([aria-current="page"]) > .dropdown-toggle {
        color: #0077a2;
        font-weight: 600;
    }



}
/* =====================================
   KHG – Mobile Navigation END
   ===================================== */





/* Video-Vorschaubild */
.khg-video-preview {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #173a4f;
    cursor: pointer;
}

.khg-video-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: center center;
    transition: transform .3s ease;
}

/* Play-Button */
.khg-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    border-radius: 50%;

    background: rgba(0, 119, 162, .9);
    color: #fff;
    font-size: 28px;

    transition: background .2s ease, transform .2s ease;
}

/* Hover-Effekt */
.khg-video-preview:hover img {
    transform: scale(1.04);
}

.khg-video-preview:hover .khg-video-play {
    background: #005b7d;
    transform: translate(-50%, -50%) scale(1.08);
}


/* Video Shariff: Play-Button im KHG-Design */
.video-shariff-preview-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 48px !important;
    height: 48px !important;

    border-radius: 50% !important;
    background: rgba(0, 119, 162, .9) !important;

    position: relative;
    border: none !important;
    box-shadow: none !important;

    transition: background .2s ease, transform .2s ease;
}

/* Altes Icon ausblenden */
.video-shariff-preview-icon::before,
.video-shariff-preview-icon::after {
    content: none !important;
}

/* Neues Play-Icon */
.video-shariff-preview-icon {
    background-image: none !important;
}

.video-shariff-preview-icon::before {
    content: "\f4f4" !important;
    display: block !important;
    font-family: "bootstrap-icons" !important;
    font-size: 28px;
    color: #fff;
    line-height: 1;
}

/* Hover */
.video-shariff-play:hover .video-shariff-preview-icon {
    background: #005b7d !important;
    transform: scale(1.08);
}

/* News-Layout: Kommende Termine */
.news-termin-container {
    padding-block: 3rem;
    padding-left: 0;
    padding-right: 0;
}

.news-termin-list {
    display: grid;
    gap: 1rem;
}

.news-termin {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    padding: 1.25rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.news-termin-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.25rem;
    border-radius: 0.5rem;
    background: var(--khg-primary);
    color: var(--khg-dark);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.news-termin-day {
    font-size: 2rem;
    font-weight: 700;
}

.news-termin-month, .news-termin-year {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    text-align: center;
}

.news-termin-content {
    overflow-wrap: anywhere;
}

.news-termin-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.news-termin-title a,
.news-termin-link {
    color: var(--khg-secondary);
    text-decoration: none;
}

.news-termin-title a:hover,
.news-termin-title a:focus-visible,
.news-termin-link:hover,
.news-termin-link:focus-visible {
    text-decoration: underline;
}

.news-termin-teaser {
    margin: 0 0 0.75rem;
}

.news-termin-link {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .news-termin {
        grid-template-columns: 4.25rem minmax(0, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
}


/* NEU: Integrierte Uhrzeit & Metadatenzeile */
.news-termin .meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.news-termin .meta-info .meta-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
}

.news-termin .meta-icon {
    flex-shrink: 0;
}

.news-termin .meta-text {
    min-width: 0;
    overflow-wrap: anywhere;
    hyphens: none;
}

@media (max-width: 575.98px) {
    .news-termin .meta-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

.news-termin p.news-termin-teaser {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 8px 0;
}


/* Innerhalb einer Card bilden die Termine eine gemeinsame Liste. */
.card .news-termin-container {
    max-width: none;
    padding: 0.5rem 0 0;
}

.card .news-termin-list {
    gap: 0;
}

.card .news-termin {
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.card .news-termin + .news-termin {
    border-top: 1px solid #e3ebef;
}

.card .news-termin:last-child {
    padding-bottom: 0;
}

.card .news-termin-date {
    padding: 0.625rem 0.25rem;
}

.card .news-termin-day {
    font-size: 1.75rem;
}

.card .news-termin-month, .card .news-termin-year {
    font-size: 0.75rem;
}

.card .news-termin-title {
    margin-bottom: 0.375rem;
    font-size: 1.125rem;
    line-height: 1.35;
    hyphens: none;
}

.card .news-termin-teaser {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.card .news-termin-link {
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .card .news-termin {
        grid-template-columns: 3.75rem minmax(0, 1fr);
        gap: 0.75rem;
    }
}

/* News-Layout: Kommende Termine – zweispaltig */
@media (min-width: 768px) {
    .news-termin-list-two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Termin-Stilprobe: Datumsstreifen und Karten nach der HTML-Vorlage. */
.news-termin-list {
    gap: 1.25rem;
}
.card .news-termin-list {
    gap: 1.25rem;
}
.news-termin-list .news-termin {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 5%), 0 2px 4px -2px rgb(0 0 0 / 5%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .news-termin-list .news-termin:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 8%);
    }
}
.news-termin-list .news-termin .news-termin-date {
    justify-content: center;
    padding: 20px 10px;
    border-radius: 0;
    border-right: 1px solid #e2e8f0;
    background: var(--khg-primary);
    color: var(--khg-dark);
    text-align: center;
}
.news-termin-list .news-termin-day {
    /* font-size: 32px; */
    font-size: 28px;
    /* font-size: 24px; */
    font-weight: 800;
    line-height: 1;
}
.news-termin-list .news-termin-month, .news-termin-list .news-termin-year {
    /* margin-top: 4px; */
    margin-top: 10px;
    font-size: 13px;
    /* font-weight: 700; */
    /* text-transform: uppercase; */
    letter-spacing: 1px;
}
.news-termin-list .news-termin-month {
    font-weight: 700;
}

.news-termin-list .news-termin-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
}
.news-termin-list .news-termin-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    hyphens: none;
}
.news-termin-list .news-termin-title a {
    color: var(--khg-secondary);
}
.news-termin-list .news-termin .meta-info,
.news-termin-list .news-termin p.news-termin-teaser {
    color: var(--text-muted);
}
.news-termin-list .news-termin-link {
    width: fit-content;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: #2279a0;
}

.news-list-view[id^="news-container-"] {
    scroll-margin-top: 8rem;
}

@media (max-width: 480px) {
    .news-termin-list .news-termin {
        grid-template-columns: minmax(0, 1fr);
    }
    .news-termin-list .news-termin .news-termin-date {
        flex-direction: row;
        gap: 12px;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .news-termin-list .news-termin-month, .news-termin-list .news-termin-year {
        margin-top: 0;
    }
    
    .news-termin-list .news-termin-content {
        padding: 16px;
    }
}

/* News-Layout: Termine – Detailansicht */
.news-termin-detail {
    margin-block: 1.5rem 2rem;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.news-termin-detail-header {
    margin-bottom: 1.5rem;
}
.news-termin-detail-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin: 0;
}
.news-termin-detail-meta > div {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}
.news-termin-detail-meta dt {
    margin: 0;
    text-align: center;
    color: var(--khg-secondary);
    font-weight: 700;
}
.news-termin-detail-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.news-termin-detail-description {
    margin: 1.5rem 0 0;
    line-height: 1.6;
}
.news-termin-detail-description > :last-child {
    margin-bottom: 0;
}


html {
    scroll-behavior: auto !important;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body > .maincontent {
    flex: 1 0 auto;
}

body > header,
body > #footer {
    flex-shrink: 0;
}

/* Native Video-Lightbox: weißen Inline-Innenabstand entfernen. */
.glightbox-container .gslide-inline:has(video[controls][playsinline]) {
    background: #000;
}

.glightbox-container .gslide-inline .ginlined-content:has(video[controls][playsinline]) {
    padding: 0;
}
