/**
 * PROJECTS COMPONENT
 * 
 * Styles for the projects/portfolio section - Grid Layout
 */

/* Projects Section */
.projects {
    background-color: var(--bg-color-alt);
    position: relative;
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-button {
    background: linear-gradient(135deg, var(--bg-color), rgba(var(--primary-color-rgb), 0.05));
    color: var(--text-color);
    border: 2px solid rgba(var(--primary-color-rgb), 0.2);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.filter-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--primary-color-rgb), 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.filter-button:hover::before {
    width: 300px;
    height: 300px;
}

.filter-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.filter-button.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.4);
    transform: scale(1.05);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 0;
    justify-items: center;
}

/* Project Card - Enhanced styling */
.project-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-color-rgb), 0.02) 100%);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    position: relative;
    height: 100%;
    width: 100%;
    max-width: 360px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: left;
    z-index: 10;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(var(--primary-color-rgb), 0.2);
    border-color: var(--primary-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color-alt), rgba(var(--primary-color-rgb), 0.05));
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08) rotate(2deg);
}

.project-content {
    padding: 1.3rem 1.35rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.65rem;
}

.project-title {
    font-size: 1.15rem;
    margin-bottom: 0;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
    transition: color 0.3s ease;
    min-height: 3.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card:hover .project-title {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-color-light);
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.6;
    min-height: 4.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-features {
    margin: 0;
    padding-left: 0;
    color: var(--text-color-light);
    min-height: 6.7rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.35rem;
    list-style: none;
}
.project-features li {
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.project-features li::before {
    content: '\2022';
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Project Tech Stack */
.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.05));
    color: var(--primary-color);
    padding: 0.32rem 0.8rem;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    transition: all 0.3s ease;
}

.project-card:hover .tech-tag {
    background: rgba(var(--primary-color-rgb), 0.15);
    border-color: var(--primary-color);
}

/* Project Links */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.1);
    padding-top: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-link:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

/* Project Note */
.project-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-light);
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
}

.project-note i {
    color: var(--primary-color);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .project-card {
        border-radius: 12px;
    }
    
    .project-content {
        padding: 1.1rem 1.1rem 1rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        justify-content: center;
    }

    .project-card {
        max-width: 340px;
        margin: 0 auto;
    }
    
    .project-filters {
        margin-bottom: 2rem;
    }
}

/* Ensure the existing filter responsiveness for small screens is preserved */
@media screen and (max-width: 576px) {
    .project-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-button {
        width: 100%;
        max-width: 280px;
    }
}
