/**
 * FIFE Core — Impact Projects List widget styles.
 *
 * Copied verbatim (same selectors, same values) from page-our-impact.php's
 * own inline <style> block — the "Search & Filter Bar" / "Project Card -
 * Horizontal Layout" sections — per the explicit 1:1 migration requirement.
 * This is not a re-interpretation: same class names, same rules, so the
 * rendered result is pixel-identical to the legacy Projects tab, not just
 * visually similar. (The legacy stylesheet's own `.top-projects-btn` class
 * is dead CSS there too — the "All Projects" button actually renders via
 * inline styles, reproduced as inline styles here for the same reason.)
 */

.impact-search-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: hsl(0, 0%, 96%);
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid hsl(0, 0%, 89.8%);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .impact-search-filter {
        flex-direction: row;
        align-items: stretch;
    }
}

.impact-search-input {
    position: relative;
    flex: 1;
}

.impact-search-input svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(0, 0%, 45.1%);
}

.impact-search-input input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    height: 3rem;
    background: white;
    border: 1px solid hsl(0, 0%, 89.8%);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.impact-search-input input:focus {
    outline: none;
    border-color: hsl(310, 58%, 35%);
}

.impact-filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(0, 0%, 45.1%);
    font-size: 0.875rem;
    font-weight: 500;
}

.impact-filter-label svg {
    width: 1.25rem;
    height: 1.25rem;
}

.impact-filter-select {
    width: 100%;
    height: 3rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid hsl(0, 0%, 89.8%);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .impact-filter-select {
        width: 10rem;
    }
}

.impact-filter-select:focus {
    outline: none;
    border-color: hsl(310, 58%, 35%);
}

.impact-results-count {
    font-size: 0.875rem;
    color: hsl(0, 0%, 45.1%);
    margin-bottom: 1.5rem;
}

.impact-no-results {
    text-align: center;
    padding: 3rem;
    background: hsl(0, 0%, 96%);
    border-radius: 1rem;
    border: 1px solid hsl(0, 0%, 89.8%);
    display: none;
}

.impact-no-results.show {
    display: block;
}

.impact-no-results svg {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: hsl(0, 0%, 45.1%);
}

.impact-no-results h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(0, 0%, 3.9%);
    margin-bottom: 0.5rem;
}

.impact-no-results p {
    color: hsl(0, 0%, 45.1%);
}

.impact-project-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid hsl(0, 0%, 89.8%);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-bottom: 1.5rem;
    min-height: 220px;
}

.impact-project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .impact-project-card {
        flex-direction: row;
        min-height: 220px;
        height: auto;
    }
}

.impact-project-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .impact-project-image {
        width: 320px;
        min-width: 320px;
    }
}

.impact-project-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
    display: block;
}

@media (min-width: 768px) {
    .impact-project-image img {
        height: 100%;
        width: 320px;
        min-height: 220px;
    }
}

.impact-project-card:hover .impact-project-image img {
    transform: scale(1.12);
    object-position: center center;
}

.impact-project-details {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .impact-project-details {
        width: auto;
    }
}

.impact-project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: hsl(0, 0%, 45.1%);
    margin-bottom: 0.5rem;
}

.impact-project-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.impact-project-meta svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.impact-project-meta .divider {
    color: hsl(0, 0%, 89.8%);
}

.impact-project-title {
    font-size: 1rem;
    font-weight: 700;
    color: hsl(311, 50%, 37%);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .impact-project-title {
        font-size: 1.1rem;
    }
}

.impact-project-card:hover .impact-project-title {
    color: hsl(311, 50%, 30%);
}

.impact-project-status {
    display: inline-flex;
    width: fit-content;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.impact-project-status.current {
    background: hsl(142, 76%, 90%);
    color: hsl(142, 71%, 29%);
}

.impact-project-status.completed {
    background: hsl(0, 0%, 96%);
    color: hsl(0, 0%, 32%);
}

.impact-project-hidden {
    display: none !important;
}
