/* Rasy Psów - Grid z filtrami */

/* Kontener główny */
.rasy-psow-grid-container {
    width: 100%;
    margin: 0 auto;
}

/* Sekcja filtrów */
.rasy-psow-filters {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.rasy-psow-filters h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

/* Wyszukiwarka - stare style (zachowane dla kompatybilności) */
.rasy-psow-search {
    margin-bottom: 15px;
}

.rasy-psow-search input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.rasy-psow-search input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
}

/* Wyszukiwarka w gridzie */
.rasy-psow-search-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    transition: border-color 0.3s;
}

.rasy-psow-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

/* Kontener filtrów - 2 kolumny */
.rasy-psow-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 15px;
    margin-bottom: 12px;
}

/* Filtry taksonomii */
.rasy-psow-filter-group {
    display: flex;
    flex-direction: column;
}

.rasy-psow-filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
    font-size: 13px;
}

.rasy-psow-filter-group select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.rasy-psow-filter-group select:focus {
    outline: none;
    border-color: #0073aa;
}

/* Przycisk resetowania */
.rasy-psow-reset {
    margin-top: 5px;
}

.rasy-psow-reset button {
    padding: 8px 16px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.rasy-psow-reset button:hover {
    background: #444;
}

/* Informacja o liczbie wyników */
.rasy-psow-results-info {
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    display: none;
}

.rasy-psow-results-info:not(:empty) {
    display: block;
}

/* Grid wpisów */
.rasy-psow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* Pojedyncza karta rasy */
.rasa-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.rasa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Link obrazu */
.rasa-card-image-link {
    display: block;
    text-decoration: none;
}

/* Miniatura */
.rasa-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

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

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

.rasa-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
}

/* Treść karty */
.rasa-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rasa-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rasa-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.rasa-card-title a:hover {
    color: #0073aa;
}

.rasa-card-excerpt {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

/* Tagi taksonomii */
.rasa-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.rasa-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #e7f3ff;
    color: #0073aa;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
}


/* Loading spinner */
.rasy-psow-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.rasy-psow-loading:before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Brak wyników */
.rasy-psow-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.rasy-psow-no-results h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.rasy-psow-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Paginacja / Load More */
.rasy-psow-pagination {
    text-align: center;
    margin-top: 30px;
}

.rasy-psow-load-more {
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.rasy-psow-load-more:hover {
    background: #005a87;
}

.rasy-psow-load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsywność */
@media (max-width: 1200px) {
    .rasy-psow-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .rasy-psow-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .rasy-psow-filters {
        padding: 12px 15px;
    }
    
    .rasy-psow-filters-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .rasy-psow-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rasy-psow-filters {
        padding: 12px;
    }
    
    .rasy-psow-filters h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .rasa-card-image {
        height: 200px;
    }
}

/* Animacja fade-in dla nowych elementów */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rasa-card {
    animation: fadeIn 0.5s ease-out;
}
