.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2.5rem 1rem;
    padding: 0;
}

.tools-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
}

.tools-sidebar {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    margin-top: 1rem;

    display: flex;
    flex-direction: column;
}

.filter-search {
    margin: 0 0 20px 0;
}

.filter-search p {
    margin-top: 0;
}

.total-found {
    float: left;
    padding-bottom: 10px;
    margin: 20px 0;
    font-weight: bold;
}

.sidebar-title {
    
}

.filter-form {
    display: flex;
    flex-direction: column;
    /* gap: 15px; */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

/* .filter-group:first-of-type {
    margin-bottom: 0;
}
 */

.filter-group > #search {
    margin-bottom: 0;
}

.filter-checkbox {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-row {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.checkbox-label {
    cursor: pointer;
}

.filter-label {
    /* font-size: 14px; */
    font-weight: 700;
    color: #333;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* font-size: 14px; */
    background: #fff;
    cursor: pointer;
    margin-bottom: 0;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #63bbea;
    box-shadow: 0 0 4px rgba(99, 187, 234, 0.3);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-filter,
.btn-reset {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    /* font-size: 14px; */
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-filter {
    background: #63bbea;
    color: #fff;
}

.btn-filter:hover {
    background: #4a9fcd;
}

.btn-reset {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    display: inline-block;
}

.btn-reset:hover {
    background: #f0f0f0;
}

.tools-content {
    min-width: 0;
}

.tool-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tool-card-link-wrapper {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

.tool-card-image {
    width: 100%;
    height: 200px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-card-image .no-image {
    color: #999;
    /* font-size: 48px; */
}

.tool-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-card-title {
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.tool-card-description {
    /* font-size: 14px; */
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tool-meta-tag {
    background: #639eead6;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    /* font-size: 12px; */

    max-width: calc(50% - 4px);
    white-space: nowrap;
    overflow: hidden;      
    text-overflow: ellipsis;
    display: inline-block;
}

.tool-card-footer {
    padding: 15px 20px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
}

.tool-card-link {
    color: #63bbea;
    text-decoration: none;
    /* font-size: 14px; */
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tool-card-link:hover {
    color: #281e69;
}

.clear {
    clear: both;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .tools-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tools-sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        flex-direction: column;
    }
}