/* Enhanced Project Section Styles */

/* Project Section Container */
.projects {
    position: relative;
    padding: 80px 0;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: -1;
}

/* Projects Wrapper for additional styling */
.projects-wrapper {
    position: relative;
    padding: 20px 0;
}

/* Filter Buttons Styling */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 50px;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.filter-btn:hover::before, 
.filter-btn.active::before {
    width: 100%;
}

.filter-btn:hover, 
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.3);
}

/* Project Card Container */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 10px;
}

/* Project Card Styling */
.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
}

/* Animation classes */
.project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.project-card.animate-out {
    opacity: 0;
    transform: translateY(20px);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-img::after {
    opacity: 1;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

.project-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    width: fit-content;
}

.project-content h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.project-card:hover .project-content h3::after {
    width: 100%;
}

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

.project-content p {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Key Points */
.project-content p:not(:first-child) {
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: var(--text-color);
    padding-left: 10px;
    position: relative;
}

.project-content p:not(:first-child)::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Project Technologies */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.project-tech span {
    padding: 5px 12px;
    border-radius: 50px;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.project-tech span:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Project Links */
.project-links {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.project-links a {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.project-links a i {
    font-size: 0.85rem;
}

.project-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .projects-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .project-filters {
        gap: 8px;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 7px 14px;
    }
}

@media (max-width: 576px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .project-img {
        height: 200px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-links a {
        width: 100%;
        justify-content: center;
    }
}
