/* Projects Page Mobile Optimizations */

/* No results message styling */
.no-results {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
    font-size: 1.1rem;
    grid-column: 1 / -1;
    width: 100%;
}

/* Reset container styles and fix overflow issues */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Project filters styles to match insights page */
.project-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    max-width: 100%;
}

.filter-categories {
    display: flex;
    gap: 12px;
    margin-right: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.filter-category {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-category:hover {
    background-color: #e8e8e8;
}

.filter-category.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-search {
    position: relative;
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.filter-search input {
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.filter-search:before {
    content: "🔍";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Media queries */
@media (max-width: 992px) {
    .project-filters {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .filter-search {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .projects-header {
        padding: 0 20px;
    }
    
    .projects-header h1 {
        font-size: 2.2rem;
    }
    
    .projects-header p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .projects-header {
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    .projects-header h1 {
        font-size: 2rem;
    }
    
    .projects-header p {
        font-size: 0.95rem;
    }

    .project-filters {
        width: 100%;
        box-sizing: border-box;
        padding-bottom: 15px;
        margin-bottom: 25px;
    }
    
    .filter-categories {
        width: 100%;
        box-sizing: border-box;
        margin-right: 0;
        padding-bottom: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .filter-category {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    
    .filter-search {
        width: 100%;
        margin-left: 0;
        margin-top: 12px;
    }
    
    .filter-search input {
        font-size: 0.85rem;
        padding: 8px 12px 8px 32px;
    }
    
    /* Fix any overflowing elements */
    .project-filters,
    .filter-categories,
    .filter-search {
        max-width: 100vw;
        overflow-x: hidden;
    }
}