/* ======================================================
   NEWS CARDS
   ====================================================== */

.news .news-list-view {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px !important;
    margin: 0;
    padding: 0;
}


/* ======================================================
   TYPO3 / FLEX RESET
   ====================================================== */

.news .news-list-view > *,
.news .news-list-view .article,
.news-list-view .article,
.article:is(.articletype-0, .articletype-1) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0;

    float: none !important;
    flex: none !important;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    height: 100%;

    background: rgba(247, 243, 242, 0.70);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* ======================================================
   HOVER
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1):hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.news .news-list-view .article:is(.articletype-0, .articletype-1):hover h3 a {
    color: var(--primary);
}

.news .news-list-view .article:is(.articletype-0, .articletype-1):hover .news-img-wrap img {
    transform: scale(1.05);
}


/* ======================================================
   NEWSLISTE: BILD IMMER 100 % BREIT UND 4:3
   ====================================================== */

/*
 * Sichtbarer Bildrahmen.
 * Die Höhe ergibt sich immer aus dem Verhältnis 4:3.
 */
.news .news-list-view .article .news-img-wrap {
    order: 1;

    position: relative !important;
    display: block;

    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;

    aspect-ratio: 4 / 3 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    clear: both !important;

    overflow: hidden !important;

    background: none !important;
    box-sizing: border-box !important;
}


/*
 * TYPO3-Zwischencontainer füllen den Bildrahmen vollständig.
 */
.news .news-list-view .article .news-img-wrap > .outer,
.news .news-list-view .article .news-img-wrap > figure,
.news .news-list-view .article .news-img-wrap .mediaelement,
.news .news-list-view .article .news-img-wrap .mediaelement-image,
.news .news-list-view .article .news-img-wrap picture,
.news .news-list-view .article .news-img-wrap a {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;

    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;

    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;

    overflow: hidden !important;
    box-sizing: border-box !important;
}


/*
 * Das eigentliche Bild wird vollständig in den Rahmen skaliert.
 * Hochformatige oder zu große Bilder werden unten beziehungsweise
 * an den Seiten abgeschnitten.
 */
.news .news-list-view .article .news-img-wrap img {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;

    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;

    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;

    object-fit: cover !important;
    object-position: center top !important;

    transform-origin: center center;

    transition: transform 0.45s ease;
}


/* ======================================================
   NEWS OHNE BILDER
   ====================================================== */

/*
 * Deine Klasse bleibt erhalten.
 * Funktioniert auf einem übergeordneten Element,
 * direkt auf dem Artikel oder direkt am Bildcontainer.
 */
.news-ohne-bilder .news-img-wrap,
.article.news-ohne-bilder .news-img-wrap,
.news .article.news-ohne-bilder .news-img-wrap,
.news-list-view .news-ohne-bilder .news-img-wrap,
.news-img-wrap.news-ohne-bilder {
    display: none !important;
}


/* ======================================================
   DATUM UND KATEGORIE
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1) .footer {
    order: 2;

    margin: 0 !important;
    padding: 18px 28px 0 !important;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .footer p {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;

    gap: 4px !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1.2 !important;
}

.news .news-list-view .article .footer .news-list-category {
    order: 1;

    display: block !important;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1.2 !important;
    white-space: normal;
}

.news .news-list-view .article .footer .news-list-date {
    order: 2;

    display: block !important;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    color: #cb7a72 !important;

    font-size: 1.05rem !important;
    font-weight: 700;
    line-height: 1.2 !important;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    white-space: nowrap;
}


/* ======================================================
   HEADLINE
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1) .header {
    order: 3;

    min-height: 0 !important;

    margin: 0 !important;
    padding: 7px 28px 0 !important;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .header h3 {
    margin: 0 !important;
    padding: 0 !important;
}

.news .news-list-view .article .header h3,
.news .news-list-view .article .header h3 a,
.news .news-list-view .article .header h3 span {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;

  max-width: 100%;
  min-width: 0;

  line-height: 1.25 !important;
}

/* ======================================================
   TEASER
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text {
    order: 4;

    display: flex;
    flex-direction: column;
    flex: 1;

    margin: 0 !important;
    padding: 10px 28px 22px !important;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text,
.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text p {
    color: #555;

    font-size: 1rem;
    line-height: 1.4 !important;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text p {
    margin: 0 0 7px !important;
    padding: 0 !important;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text p:last-child {
    margin-bottom: 0 !important;
}


/* ======================================================
   BESCHREIBUNG
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1) [itemprop="description"] {
    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    min-height: 0 !important;

    margin: 0 !important;

    overflow: hidden;
}


/* ======================================================
   TYPO3-HINTERGRÜNDE ENTFERNEN
   ====================================================== */

.news-list .news-text-wrap,
.news-list .news-text-wrap *,
.news-list .news-list-title,
.news-list .news-title,
.news-list span[itemprop="headline"] {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
}


/* ======================================================
   WEITERLESEN
   ====================================================== */

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text a.more {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    margin-top: auto !important;
    padding: 12px 0 0 !important;

    background: none !important;
    color: #56756d !important;

    font-size: 0.88rem !important;
    font-weight: 700;
    line-height: 1.2 !important;

    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text a.more::before {
    display: none;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text a.more::after {
    content: "→";

    font-size: 1.3rem;
    line-height: 1;

    transition: transform 0.25s ease;
}

.news .news-list-view .article:is(.articletype-0, .articletype-1):hover .teaser-text a.more::after {
    transform: translateX(5px);
}


/* ======================================================
   RESPONSIVE NEWS CARDS
   ====================================================== */

@media (max-width: 991px) {

    .news .news-list-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px !important;
    }

}

@media (max-width: 640px) {

    .news .news-list-view {
        grid-template-columns: 1fr;
        gap: 20px !important;
    }

    .news .news-list-view .article:is(.articletype-0, .articletype-1) .footer {
        padding: 16px 20px 0 !important;
    }

    .news .news-list-view .article:is(.articletype-0, .articletype-1) .header {
        min-height: 0 !important;
        padding: 7px 20px 0 !important;
    }

    .news .news-list-view .article:is(.articletype-0, .articletype-1) .teaser-text {
        padding: 10px 20px 20px !important;
    }

}


/* ======================================================
   NEWS BACKLINK
   ====================================================== */

.news-backlink-wrap {
    margin: 40px 0;
}

.news-backlink-wrap a {
    display: inline-flex;
    align-items: center;

    gap: 10px;
    padding: 12px 24px;

    background: #283f35;
    color: #fff !important;

    font-size: 1rem;
    font-weight: 600;

    text-decoration: none !important;

    border-radius: 4px;

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.news-backlink-wrap a:visited,
.news-backlink-wrap a:hover,
.news-backlink-wrap a:focus {
    color: #fff !important;
}

.news-backlink-wrap a::before {
    content: "←";

    color: #fff;

    font-size: 1.2rem;
    line-height: 1;

    transition: transform 0.3s ease;
}

.news-backlink-wrap a:hover {
    background: var(--primary);

    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.news-backlink-wrap a:hover::before {
    transform: translateX(-4px);
}


/* ======================================================
   NEWS SINGLE
   TEXT 100 %, ALLE BILDER DARUNTER
   ====================================================== */

.news-single .article {
    display: flex !important;
    flex-direction: column !important;
}


/* ======================================================
   NEWS SINGLE: REIHENFOLGE
   ====================================================== */

.news-single .header {
    order: 1 !important;
}

.news-single .footer {
    order: 2 !important;
}

.news-single .teaser-text {
    order: 3 !important;
}

.news-single .news-text-wrap {
    order: 4 !important;
}

.news-single .news-img-wrap {
    order: 5 !important;
}

.news-single .news-backlink-wrap {
    order: 6 !important;
}


/* ======================================================
   NEWS SINGLE: ALLES VOLLE BREITE
   ====================================================== */

.news-single .header,
.news-single .footer,
.news-single .teaser-text,
.news-single .news-text-wrap,
.news-single .news-img-wrap,
.news-single .news-backlink-wrap {
    width: 100% !important;
    max-width: 100% !important;

    float: none !important;
    clear: both !important;

    box-sizing: border-box;
}


/* ======================================================
   NEWS SINGLE: FOOTER
   ====================================================== */

.news-single .footer {
    margin: 0 !important;
    padding-bottom: 0 !important;
}

.news-single .footer p {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;

    gap: 5px !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1.2 !important;
}

.news-single .footer .news-list-category {
    order: 1;

    display: block !important;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    white-space: normal;
}

.news-single .footer .news-list-date {
    order: 2;

    display: block !important;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    color: #cb7a72 !important;

    font-size: 1.2rem !important;
    font-weight: 700;
    line-height: 1.2 !important;

    white-space: nowrap;
}


/* ======================================================
   NEWS SINGLE: TEXT
   ====================================================== */

.news-single .teaser-text,
.news-single .news-text-wrap {
    margin: 0 !important;
    padding: 0 !important;
}

.news-single .teaser-text p {
    margin: 0 0 12px !important;
    padding: 0 !important;

    font-size: 1.5rem;
    line-height: 1.35 !important;
}

.news-single .news-text-wrap p {
    margin: 0 0 12px !important;
    padding: 0 !important;

    line-height: 1.5 !important;
}

.news-single .teaser-text p:last-child,
.news-single .news-text-wrap p:last-child {
    margin-bottom: 0 !important;
}


/* ======================================================
   NEWS SINGLE: GALERIE
   ====================================================== */

.news-single .news-img-wrap {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;

    gap: 24px !important;

    margin: 32px 0 0 !important;
    padding: 0 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
}


/*
 * Jedes einzelne Galeriebild erhält einen eigenen 4:3-Rahmen.
 */
.news-single .news-img-wrap .outer {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    aspect-ratio: 4 / 3 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;

    overflow: hidden !important;

    visibility: visible !important;
    opacity: 1 !important;

    box-sizing: border-box !important;
}


/*
 * Zwischencontainer innerhalb des Einzelbildes.
 */
.news-single .news-img-wrap .outer > figure,
.news-single .news-img-wrap .outer .mediaelement,
.news-single .news-img-wrap .outer .mediaelement-image,
.news-single .news-img-wrap .outer picture,
.news-single .news-img-wrap .outer a {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;

    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;

    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;

    overflow: hidden !important;

    box-sizing: border-box !important;
}


/*
 * Einzelbilder füllen ihren 4:3-Rahmen vollständig.
 */
.news-single .news-img-wrap .outer img,
.news-single .mediaelement img {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;

    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;

    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;

    object-fit: cover !important;
    object-position: center top !important;
}


/* ======================================================
   NEWS SINGLE: NUR EIN BILD
   ====================================================== */

.news-single .news-img-wrap:has(.outer:first-child:last-child) {
    grid-template-columns: minmax(0, 33.333%) !important;
}


/* ======================================================
   NEWS SINGLE: ZURÜCK-LINK
   ====================================================== */

.news-single .news-backlink-wrap {
    margin-top: 40px !important;
}


/* ======================================================
   NEWS SINGLE: TABLET
   ====================================================== */

@media (max-width: 991px) {

    .news-single .news-img-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .news-single .news-img-wrap:has(.outer:first-child:last-child) {
        grid-template-columns: minmax(0, 50%) !important;
    }

}


/* ======================================================
   NEWS SINGLE: MOBILE
   ====================================================== */

@media (max-width: 640px) {

    .news-single .news-img-wrap,
    .news-single .news-img-wrap:has(.outer:first-child:last-child) {
        grid-template-columns: 1fr !important;
    }

    .news-single .teaser-text p {
        font-size: 1.25rem;
    }

}


.news-ohne-bilder .news-img-wrap {display: none;}


@media (min-width:1200px){

/* Seitenlayout */
#pageid26 #inhalt > article,
#pageid27 #inhalt > article{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:2rem;
    align-items:stretch;
    width:calc(100% - 3rem);
    max-width:1320px;
    margin-inline:auto;
}

/* Breadcrumb + Überschriften */
#pageid26 #inhalt > article > .container,
#pageid27 #inhalt > article > .container,
#pageid26 #inhalt > article > #c51,
#pageid27 #inhalt > article > #c90{
    grid-column:1 / -1;
    width:100%;
    max-width:none;
    padding-inline:0;
}

/* Nur auf Seite 26 vorhanden */
#pageid26 #inhalt > article > .grid-gv{
    display:contents;
}

/* Karten */
#pageid26 #inhalt .frame-custom-50,
#pageid27 #inhalt .frame-custom-50{
    min-width:0;
    margin:0;
    height:100%;
}

#pageid26 #inhalt .frame-custom-50 > .frame-group-container,
#pageid26 #inhalt .frame-custom-50 .frame-group-inner,
#pageid26 #inhalt .frame-custom-50 .frame-container,
#pageid26 #inhalt .frame-custom-50 .frame-inner,
#pageid27 #inhalt .frame-custom-50 > .frame-group-container,
#pageid27 #inhalt .frame-custom-50 .frame-group-inner,
#pageid27 #inhalt .frame-custom-50 .frame-container,
#pageid27 #inhalt .frame-custom-50 .frame-inner{
    height:100%;
}

/* Bild links – Text rechts */
#pageid26 #inhalt .frame-custom-50 .textmedia:has(> .textmedia-gallery),
#pageid27 #inhalt .frame-custom-50 .textmedia:has(> .textmedia-gallery){
    display:grid;
    grid-template-columns:180px minmax(0,1fr);
    gap:1.75rem;
    align-items:start;
    height:100%;
}

#pageid26 #inhalt .frame-custom-50 .textmedia-gallery,
#pageid27 #inhalt .frame-custom-50 .textmedia-gallery{
    width:auto;
    margin:0;
}

#pageid26 #inhalt .frame-custom-50 .gallery-row,
#pageid26 #inhalt .frame-custom-50 .gallery-item,
#pageid26 #inhalt .frame-custom-50 figure,
#pageid26 #inhalt .frame-custom-50 picture,
#pageid27 #inhalt .frame-custom-50 .gallery-row,
#pageid27 #inhalt .frame-custom-50 .gallery-item,
#pageid27 #inhalt .frame-custom-50 figure,
#pageid27 #inhalt .frame-custom-50 picture{
    height:100%;
}

#pageid26 #inhalt .frame-custom-50 img,
#pageid27 #inhalt .frame-custom-50 img{
    display:block;
    width:100%;
    height:220px;
    object-fit:cover;
}

#pageid26 #inhalt .frame-custom-50 .textmedia-text,
#pageid27 #inhalt .frame-custom-50 .textmedia-text{
    min-width:0;
}

#pageid26 #inhalt .frame-custom-50 .textmedia-text h2,
#pageid27 #inhalt .frame-custom-50 .textmedia-text h2{
    margin-top:0;
}

}


