/* Projects Section Styles */
.projects {
    background: var(--bg-secondary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 80px;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.load-more-btn {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn i {
    margin-right: 0.5rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.project-complexity {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.complexity-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.complexity-stars {
    color: #ffd700;
    font-size: 0.9rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

/* WordPress icon fix */
.tech-tag i.fab.fa-wordpress {
    color: #21759b;
    font-size: 0.9em;
    margin-right: 0.25rem;
}

.tech-tag i.fab.fa-wordpress:before {
    content: "W";
    font-family: "Font Awesome 5 Brands";
    font-weight: 400;
}

/* Dark mode projects styles */
[data-theme="dark"] .projects {
    background: var(--bg-secondary);
}

[data-theme="dark"] .project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

/* Mobile Projects Styles */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
    }

    .projects-filter {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 10px;
        margin-bottom: 2rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        min-height: 44px;
        flex: 1;
        min-width: 0;
        max-width: calc(50% - 0.25rem);
    }

    .project-card {
        margin-bottom: 1rem;
        border-radius: 12px;
        overflow: hidden;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .project-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .project-complexity {
        align-self: flex-end;
    }

    .project-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .project-tech {
        gap: 0.5rem;
        margin-bottom: 1rem;
        justify-content: center;
    }

    .tech-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .project-card {
        margin-bottom: 1rem;
    }

    .project-content {
        padding: 1.2rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.85rem;
    }

    /* Better project filter layout */
    .projects-filter {
        padding: 0 10px;
        overflow-x: hidden;
    }

    .filter-btn {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
        max-width: calc(100% - 1rem);
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        min-height: 44px;
    }

    /* Fix WordPress icon on very small screens */
    .tech-tag i.fab.fa-wordpress {
        font-size: 0.8em;
    }
    
    /* Better spacing for tech tags */
    .tech-stack .tech-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}
