/* All Projects Page Styles */

.all-projects {
    padding: 10rem 5%;
    min-height: 100vh;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 4rem;
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-input {
    flex: 1;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--light);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    background: var(--primary);
    color: var(--light);
    border: none;
    padding: 0 2rem;
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Filter Buttons */
.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    background: var(--dark);
    color: var(--gray);
    font-size: 1.4rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.filter-btn:hover,
.filter-btn.active {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

/* Project Count */
.project-count {
    text-align: center;
    color: var(--gray);
    font-size: 1.4rem;
    margin-bottom: 3rem;
}

.project-count span {
    color: var(--primary);
    font-weight: 600;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
}

.project-card {
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    align-self: flex-start;
    backdrop-filter: blur(5px);
}

.project-links {
    display: flex;
    gap: 1.5rem;
    align-self: flex-end;
}

.project-link {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.project-link:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateY(-3px);
}

.project-info {
    padding: 2rem;
}

.project-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--light);
}

.project-description {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-tech span {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    border-radius: var(--radius-full);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 5rem;
    background: var(--dark);
    border-radius: var(--radius);
    color: var(--gray);
    margin: 4rem auto;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.no-results i {
    color: var(--primary);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.no-results p {
    font-size: 1.6rem;
}

/* Back to Home Button */
.back-to-home {
    text-align: center;
    margin-top: 4rem;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* For staggered appearance of project cards */
.projects-grid .project-card:nth-child(1) { animation-delay: 0.1s; }
.projects-grid .project-card:nth-child(2) { animation-delay: 0.2s; }
.projects-grid .project-card:nth-child(3) { animation-delay: 0.3s; }
.projects-grid .project-card:nth-child(4) { animation-delay: 0.4s; }
.projects-grid .project-card:nth-child(5) { animation-delay: 0.5s; }
.projects-grid .project-card:nth-child(6) { animation-delay: 0.6s; }
.projects-grid .project-card:nth-child(7) { animation-delay: 0.7s; }
.projects-grid .project-card:nth-child(8) { animation-delay: 0.8s; }
.projects-grid .project-card:nth-child(9) { animation-delay: 0.9s; }

/* Responsive Adjustments */
@media screen and (max-width: 1200px) {
    .all-projects {
        padding: 8rem 5%;
    }
}

@media screen and (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .all-projects {
        padding: 6rem 3%;
    }
    .search-container {
        max-width: 100%;
    }
    .projects-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1.5rem;
        justify-content: flex-start;
    }
    .filter-btn {
        white-space: nowrap;
    }
}

@media screen and (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .search-input, .search-btn {
        font-size: 1.4rem;
        padding: 1.2rem;
    }
    .search-btn {
        padding: 0 1.5rem;
    }
}