/**
 * News Overview Plugin - Frontend Styles
 */

/* Montserrat Font einbinden */

/* Container für die gesamte News-Übersicht */
.news-overview-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

/* Ladezustand */
.news-overview-container.loading {
    min-height: 200px;
    opacity: 0.6;
}

.news-overview-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid transparent;
    border-left: 4px solid transparent;
    border-radius: 50%;
    background-image: linear-gradient(to right, #08A257, #00426A);
    background-origin: border-box;
    background-clip: border-box;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Such- und Filterbereich */
.news-overview-search-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    align-items: center;
}

/* Suchbereich */
.news-overview-search {
    display: flex;
    flex: 1;
    min-width: 250px;
    position: relative;
}

.news-overview-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 9999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.news-overview-search input:focus {
    border-color: #00426A;
}

.news-overview-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.3s;
}

.news-overview-search button:hover {
    color: #00426A;
}

/* Filter-Bereich */
.news-overview-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.news-filter-item {
    min-width: 150px;
}

.news-filter-item select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 9999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.news-filter-item select:focus {
    border-color: #00426A;
}

/* Fehlermeldungen */
.news-overview-no-results,
.news-overview-error {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #666;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}

.news-overview-error {
    color: #d32f2f;
}

/* Einzelne News-Karte */
.news-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

/* Kategorie-Tag */
.news-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000000;
    background-color: #FFD700;
    border-radius: 9999px;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Inhaltsbereich der Karte */
.news-card-content {
    display: grid;
    grid-template-columns: 35% 65%;
    width: 100%;
    padding: 0;
    gap: 25px;
}

/* Bild-Container */
.news-card-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 23px;
    aspect-ratio: 16/9;
    height: auto;
    width: 100%;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: none;
    border-radius: 23px;
    display: block;
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 23px;
}

/* Textbereich */
.news-card-text {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.news-card-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.news-card-title a {
    color: #333333;
    text-decoration: none;
    background-image: linear-gradient(to right, #08A257, #00426A);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.news-card-title a:hover {
    color: #002E18;
    background-size: 100% 2px;
}

/* Trennlinie unter dem Titel */
.news-card-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background-color: #e0e0e0;
    margin-top: 15px;
}

.news-card-excerpt {
    margin: 15px 0 25px 0;
    color: #333333;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
}

/* Footer-Bereich mit Button und Meta-Informationen */
.news-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.news-card-read-more {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(to right, #08A257, #00426A);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

/* Rahmen mit Farbverlauf */
.news-card-read-more::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(to right, #08A257, #00426A);
    z-index: -1;
}

.news-card-read-more:hover {
    background: linear-gradient(to right, #08A257, #00426A);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 66, 106, 0.3);
}

.news-card-read-more:hover::before {
    background: linear-gradient(to right, #08A257, #00426A);
}

.news-card-meta {
    font-size: 14px;
    color: #666666;
    font-style: normal;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}

.news-card-date,
.news-card-time {
    display: inline-block;
}

.news-card-date::after {
    content: " - ";
    margin: 0 5px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .news-overview-search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .news-overview-filters {
        width: 100%;
    }
    
    .news-filter-item {
        flex: 1;
        min-width: 100%;
    }
    
    .news-card-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card-image-container {
        width: 100%;
        aspect-ratio: 16/9;
    }
    
    .news-card-category {
        top: 10px;
        left: 10px;
    }
    
    /* Footer-Bereich für Tablet-Ansicht anpassen */
    .news-card-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .news-card-meta {
        font-size: 13px;
        margin-top: 0;
        text-align: right;
        flex-shrink: 1;
    }
}

@media screen and (max-width: 480px) {
    .news-card-title {
        font-size: 22px;
    }
    
    .news-card-excerpt {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    /* Feintuning für kleinere Mobilgeräte */
    .news-card-read-more {
        padding: 8px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }
}

/* Paginierung */
.news-overview-pagination {
    margin-top: 40px;
    text-align: center;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.news-overview-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.news-overview-pagination .page-numbers li {
    display: inline-block;
    margin: 0 2px;
}

.news-overview-pagination .page-numbers a,
.news-overview-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-overview-pagination .page-numbers a {
    color: #333;
    background-color: #f5f5f5;
}

.news-overview-pagination .page-numbers a:hover {
    background: linear-gradient(to right, #08A257, #00426A);
    color: white;
}

.news-overview-pagination .page-numbers .current {
    background: linear-gradient(to right, #08A257, #00426A);
    color: white;
}

.news-overview-pagination .page-numbers .prev,
.news-overview-pagination .page-numbers .next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* "Mehr anzeigen"-Button und Bereich */
.news-overview-load-more {
    margin-top: 30px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.news-overview-load-more p {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.news-load-more-button {
    display: inline-block;
    padding: 8px 25px;
    background: linear-gradient(to right, #08A257, #00426A);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.news-load-more-button::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(to right, #08A257, #00426A);
    z-index: -1;
}

.news-load-more-button:hover {
    background: linear-gradient(to right, #08A257, #00426A);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 66, 106, 0.3);
}

.news-load-more-button:hover::before {
    background: linear-gradient(to right, #08A257, #00426A);
} 