/**
 * News Overview Plugin - Widget Styles
 */

/* Widget Container */
.news-widget-container {
    font-family: 'Montserrat', sans-serif;
    margin: 0 auto 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Verteilen der Karten, aber mit Ausrichtung bei wenigen Karten */
    gap: 30px;
    max-width: 1400px; /* Größere maximale Breite des Containers */
    width: 95%; /* Container nimmt mehr Platz ein - 95% statt 90% */
    box-sizing: border-box;
}

/* Nach der letzten Karte, wenn es nur 1 oder 2 in einer Zeile gibt */
.news-widget-item:last-child:nth-child(3n-1) {
    margin-right: auto;
    margin-left: 15px;
}

.news-widget-item:last-child:nth-child(3n-2) {
    margin-right: auto;
    margin-left: auto;
}

/* Einzelnes Widget-Element */
.news-widget-item {
    flex: 0 0 100%; /* Feste Breite, kein Wachsen/Schrumpfen */
    max-width: 100%;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 23px; /* Abgerundete Ecken wie in News Overview */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    height: 100%; /* Gleiche Höhe für alle Kacheln */
}

.news-widget-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Beitragsbild */
.news-widget-thumbnail {
    width: 100%;
    position: relative;
    line-height: 0; /* Verhindert unerwünschten Abstand unter dem Bild */
}

.news-widget-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9; /* Festes Seitenverhältnis für alle Bilder */
    border-radius: 23px 23px 0 0; /* Oberhalb abgerundete Ecken */
}

/* Kategorie-Tag */
.news-widget-category {
    position: absolute;
    top: 15px;
    left: 15px;
    display: inline-block;
    padding: 12px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000000;
    background-color: #FFD700;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Beitragsinhalt */
.news-widget-content {
    padding: 25px 30px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Beitragstitel */
.news-widget-title {
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: #222;
    text-align: center; /* Zentrierte Ausrichtung */
}

.news-widget-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
    background-clip: text;
    -webkit-background-clip: text;
}

.news-widget-title a:hover {
    color: transparent !important;
    background-image: linear-gradient(to right, #08A257, #00426A);
    -webkit-background-clip: text;
    background-clip: text;
    text-decoration: none;
}

/* Trennlinie unter dem Titel - auskommentiert/entfernt */
/*
.news-widget-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #e0e0e0;
    margin-top: 15px;
}
*/

/* Auszug */
.news-widget-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    flex-grow: 1;
    text-align: center; /* Zentrierte Ausrichtung */
}

/* Datum */
.news-widget-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: center; /* Zentrierte Ausrichtung statt rechtsbündig */
}

/* Weiterlesen-Button */
.news-widget-read-more {
    text-align: center;
    margin-top: auto; /* Button immer am Ende der Kachel */
}

.news-widget-read-more-link {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(to right, #08A257, #00426A); /* Farbverlauf wie in News Overview */
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 9999px; /* Runder Button wie in News Overview */
    transition: opacity 0.3s ease;
    opacity: 0.9; /* Leicht transparenter Button im Normalzustand */
}

.news-widget-read-more-link:hover {
    opacity: 1; /* Volle Opazität beim Hover */
    color: #ffffff !important;
}

/* Alle Neuigkeiten anzeigen Button */
.news-widget-all-news {
    width: 95%;
    max-width: 1400px;
    margin: 20px auto 40px;
    text-align: center;
}

.news-widget-all-news-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #08A257, #00426A); /* Gleicher Farbverlauf */
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 9999px; /* Runder Button */
    transition: opacity 0.3s ease;
    opacity: 0.9;
    text-transform: uppercase;
}

.news-widget-all-news-link:hover {
    opacity: 1;
}

/* Responsive Anpassungen für größere Bildschirme - Mehrspaltiges Layout */
@media screen and (min-width: 768px) {
    .news-widget-item {
        flex: 0 0 calc(50% - 15px); /* Feste Breite für 2 Spalten */
        max-width: calc(50% - 15px);
        min-width: 320px; /* Minimale Breite für jede Karte */
    }
}

@media screen and (min-width: 1024px) {
    .news-widget-item {
        flex: 0 0 calc(33.33% - 20px); /* Feste Breite für 3 Spalten */
        max-width: calc(33.33% - 20px);
        min-width: 350px; /* Größere Mindestbreite für Desktop */
    }
}

/* Für sehr große Bildschirme - breitere Kacheln */
@media screen and (min-width: 1440px) {
    .news-widget-item {
        flex: 0 0 calc(33.33% - 20px);
        max-width: 450px; /* Noch breitere maximale Kachelbreite */
    }
    
    .news-widget-container {
        max-width: 1500px; /* Größere maximale Breite für sehr große Bildschirme */
    }
}

/* Styles für den Widget-Shortcode */
.news-widget-shortcode {
    margin: 20px auto;
    width: 95%;
    max-width: 1400px;
}

.news-widget-shortcode-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
} 