﻿/* =========================================================
   NEWS
   Bootstrap 5 / TYPO3 News
   ========================================================= */


/* ---------- Allgemein ---------- */

.news {
    --news-radius: 0.75rem;
    --news-bg: #f5f5f5;
    --news-bg-highlight: #f6f1e5;
    --news-text: #3d3d3d;
    --news-heading: #706f6f;
    --news-accent: #d6a31b;
    --news-white: #ffffff;
}


.news .article .news-img-wrap img {
  float: inherit !important;
  height: auto;
  width: 100% !important;
}

/* =========================================================
   NEWS LISTE
   ========================================================= */

.news-list-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}


/* ---------- News Karte ---------- */

.news-list-view .article,
#pageid1 .news .article,
#pageid1 .news .topnews {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 0;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background-color: var(--news-bg);
    border-radius: var(--news-radius);
}


/* Hervorgehobene News */

#pageid1 .news .topnews {
    background-color: var(--news-bg-highlight);
}


/* =========================================================
   HEADER / ÜBERSCHRIFT
   ========================================================= */

.news .article .header {
    padding: 1.25rem 1.25rem 1rem;
}

.news .article h3 {
    margin: 0;
    padding: 0;

    min-height: 0;

    font-size: 1.125rem !important;
    line-height: 1.35;
    font-weight: 600;

    text-decoration: none !important;
}

.news .article h3 a {
    color: var(--news-heading);
    text-decoration: none !important;

    transition: color 0.2s ease;
}

.news .article h3 a:hover {
    color: var(--news-accent);
}


/* Optional alte Klasse weiter unterstützen */

.newsheadheight {
    min-height: 0;
}

.newsheadheight h3 a {
    color: var(--news-accent) !important;
    font-weight: 700;
    text-decoration: none;
}


/* =========================================================
   BILDER
   ========================================================= */

.news .article .news-img-wrap,
#pageid1 .news .article .news-img-wrap {
    width: 100%;
    max-height: none;
    margin: 0;

    aspect-ratio: 16 / 9;

    overflow: hidden;
    background: transparent !important;
}

.news .article .news-img-wrap a {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0 !important;

    border: 0 !important;
}

.news .article .news-img-wrap img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.3s ease;
}

.news .article .news-img-wrap a:hover img {
    transform: scale(1.02);
}


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

.news .article .teaser-text {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 1rem 1.25rem 1.25rem;

    color: var(--news-text);
}

.teaser-text p {
    margin: 0 0 1rem;

    font-size: 0.875rem;
    line-height: 1.5;
}

.teaser-text a {
    color: var(--news-text) !important;
    font-weight: 400;
    text-transform: lowercase;
}

.teaser-text a::before {
    content: "... ";
}


/* Teaser auf wenige Zeilen begrenzen */

.teaser-text-einleitung {
    display: -webkit-box;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.more,
.news-backlink-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;

    margin-top: 1rem;
    padding: 0.5rem 1rem;

    color: var(--news-text) !important;

    font-size: 0.875rem;
    line-height: 1.25;

    text-align: center;
    text-decoration: none;

    background: transparent;

    border: 1px solid #999;
    border-radius: 0.375rem;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.more:hover,
.news-backlink-wrap:hover {
    color: var(--news-white) !important;

    background-color: var(--news-accent);
    border-color: var(--news-accent);

    transform: translateY(-1px);
}

.news .article .more {
    align-self: flex-start;
    margin-top: auto;
}

.more {
    font-size: 0.75rem;
}


/* =========================================================
   DATUM
   ========================================================= */

.news-list-date {
    font-size: 0.75rem;
    color: var(--news-text);
}


/* =========================================================
   EINZELANSICHT
   ========================================================= */

.news-single .teaser-text {
    padding-bottom: 1rem;

    color: var(--news-text);

    font-size: 1.125rem;
    line-height: 1.6;
}

.news-single h3 {
    margin: 1.5rem 0;
    padding: 0;

    color: var(--news-heading);

    font-size: 1.75rem !important;
    line-height: 1.3;
    font-weight: 600;

    text-transform: none;
}


/* ---------- Bilder Einzelansicht ---------- */

.news-single .article .news-img-wrap {
    width: 100%;
}

.news-single .news-img-wrap {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 1rem;
}

.news-single .news-img-wrap .outer {
    width: auto;
    margin: 0;
}


/* =========================================================
   SPEZIALKLASSEN
   ========================================================= */

.hunderter .ce-gallery img {
    display: block;
    margin-inline: auto;
}

.animationstext {
    position: absolute;
    bottom: 15%;

    display: block;

    padding: 0.5rem 1rem;

    color: var(--news-white);

    background-color: var(--news-accent);
}

.frame-custom-18 img,
.frame-custom-19 img {
    outline: 2px solid var(--news-white);
    outline-offset: -10px;
}


/* =========================================================
   NEWS FOOTER AUSBLENDEN
   ========================================================= */

.news .footer {
    display: none;
}


/* =========================================================
   CROP
   ========================================================= */

.news crop {
    display: block;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .news-list-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }

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


@media (max-width: 767.98px) {

    .news-list-view {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .news .article .header {
        padding: 1rem;
    }

    .news .article .teaser-text {
        padding: 1rem;
    }

    .news-single .news-img-wrap {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   NEWS DETAIL – Text links, Bild rechts
   ========================================================= */

.news-single .article {
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    gap: 2rem;

    padding: 0;
    margin: 0;
    align-items: start;
}


/* Überschrift und Teaser volle Breite */

.news-single .header,
.news-single .footer,
.news-single .teaser-text {
    grid-column: 1 / -1;

    margin: 0;
    padding-left: 0;
    padding-right: 0;
}


/* Text links */

.news-single .news-text-wrap {
    grid-column: 1;
    grid-row: 4;

    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;
}


/* Bild rechts */

.news-single .news-img-wrap {
    grid-column: 2;
    grid-row: 4;

    display: block;

    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;
}


/* alte 3-Spalten-Regel überschreiben */

.news-single .news-img-wrap {
    grid-template-columns: none;
}


/* TYPO3 outer-Container */

.news-single .news-img-wrap .outer {
    display: block;

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

    margin: 0;
    padding: 0;
}


/* Link ebenfalls volle Breite */

.news-single .news-img-wrap .outer a,
.news-single .mediaelement,
.news-single .mediaelement-image {
    display: block;

    width: 100%;
    max-width: none;
}


/* Bild wirklich auf 100 % ziehen */

.news-single .news-img-wrap img {
    display: block;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0;
}


/* Tabelle sauber halten */

.news-single .table-responsive {
    width: 100%;
    overflow-x: auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {

    .news-single .article {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-single .header,
    .news-single .footer,
    .news-single .teaser-text,
    .news-single .news-text-wrap,
    .news-single .news-img-wrap {
        grid-column: 1;
        grid-row: auto;
    }
}

