/**
 * Ratgeber Styling - Neue Version mit horizontaler Navigation
 * Speichere als: css/ratgeber.css in deinem Theme
 */

/* ===== Layout ===== */


.ratgeber-header {
    margin-bottom: 30px;
    text-align: center;
}

.ratgeber-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* ===== Filter-Navigation oben ===== */
.ratgeber-filter-top {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
   /*  background: #f8f9fa; */
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
/*    box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #007bff;
}

.ratgeber-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.ratgeber-search-input:focus {
    outline: none;
    border-color: #007bff;
}

.btn-reset-top {
    width: 100%;
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background 0.3s;
}

.btn-reset-top:hover {
    background: #5a6268;
}

/* Aktive Filter oben */
.active-filters-top {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff7700;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.active-filter .remove-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 1rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.active-filter .remove-filter:hover {
    opacity: 0.7;
}

/* ===== Ergebnis-Info ===== */
.ratgeber-results-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

#results-count {
    font-weight: 600;
    color: #555;
}

/* ===== Loading Spinner ===== */
.ratgeber-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Artikel Grid - 4 Spalten auf Desktop ===== */
.ratgeber-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.ratgeber-card {
    background: white;
    /* border-radius: 12px; */
    overflow: hidden;
    /* box-shadow: 0 2px 12px rgba(0,0,0,0.1); */
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

/* .ratgeber-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}*/

.ratgeber-card-image {
    overflow: hidden;
    aspect-ratio: 16/9;
}

.ratgeber-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ratgeber-card:hover .ratgeber-card-image img {
    transform: scale(1.05);
}

.ratgeber-card-content {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ratgeber-card-meta {
    margin-bottom: 12px;
}

.kategorie-badge {
    display: inline-block;
    background: #ff7700;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ratgeber-card-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.ratgeber-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
	font-weight:700
}

.ratgeber-card-title a:hover {
    color: #ff7700;
}

.ratgeber-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
    margin-top: auto;
}

.tag-badge {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ratgeber-card-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.ratgeber-card-link:hover {
    color: #0056b3;
}

/* ===== Keine Ergebnisse ===== */
.ratgeber-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.ratgeber-no-results p {
    font-size: 1.1rem;
    color: #666;
}

/* ===== Pagination ===== */
.ratgeber-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 0 15px;
}

.ratgeber-pagination a,
.ratgeber-pagination span {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.ratgeber-pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.ratgeber-pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Prev/Next Buttons */
.ratgeber-pagination .prev,
.ratgeber-pagination .next {
    font-weight: 600;
}


/* ===== Responsive ===== */

/* Große Desktops - 4 Spalten */
@media (min-width: 1400px) {
    .ratgeber-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mittlere Desktops - 3 Spalten */
@media (max-width: 1399px) {
    .ratgeber-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets - 2 Spalten */
@media (max-width: 1024px) {
    .ratgeber-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .filter-item {
        min-width: 150px;
    }
}



.ratgeber-card-date {
    font-size: 0.85rem;
    color: #999;
}


/* Untere Zeile: Anzahl + Aktive Filter */
.filter-bottom-row {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.filter-count-inline {
   
    padding: 8px 16px;
    white-space: nowrap;
}

.filter-count-inline span {
    font-weight: 600;
    color: #007bff;
    font-size: 0.9rem;
}

/* Aktive Filter bleiben wie sie sind, wachsen flexibel */
.active-filters-top {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Mobile - 1 Spalte */
@media (max-width: 768px) {
    /* Grid auf 1 Spalte */
    .ratgeber-grid {
        grid-template-columns: 1fr;
    }
    
    /* Header */
    .ratgeber-header h1 {
        font-size: 2rem;
    }
    
    /* Filter Items */
    .filter-item {
        flex-basis: 100%;
        min-width: unset;
    }
    
    /* Filter Top Container */
    .ratgeber-filter-top {
        padding: 15px;
        gap: 12px;
    }
    
    /* Reset Button Styling */
    .btn-reset-top {
        width: 100%;
        padding: 0;
        background: #ffffff;
        color: #555555;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.95rem;
        white-space: nowrap;
        transition: background 0.3s;
    }

    .btn-reset-top:hover, 
    .btn-reset-top:focus {
        background: #ffffff;
        color: #999999;
    }
    
    /* Filter-Bottom-Row stapeln */
    .filter-bottom-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-count-inline {
        width: 100%;
        text-align: center;
        padding: 0 !important;
    }
    
    .active-filters-top {
        justify-content: center;
        margin-top: 0 !important;
    }
    
    /* Pagination Mobile */
    .ratgeber-pagination {
        gap: 6px;
        margin-top: 30px;
        padding: 0 10px;
    }
    
    .ratgeber-pagination a,
    .ratgeber-pagination span {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 36px;
    }
    
    /* Kürze die Text-Buttons auf Mobile - zeige nur Pfeile */
    .ratgeber-pagination .prev,
    .ratgeber-pagination .next {
        font-size: 0;
        padding: 8px 14px;
    }
    
    .ratgeber-pagination .prev::before {
        content: '‹';
        font-size: 1.2rem;
    }
    
    .ratgeber-pagination .next::before {
        content: '›';
        font-size: 1.2rem;
    }
}