/* ===== Projects Section Enhanced ===== */

.proyectos {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.proyectos .section-title {
    margin-bottom: 3rem;
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out both;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

/* AI Project Special Styles */
.project-card.ai-project {
    position: relative;
    border-color: rgba(99, 102, 241, 0.3);
}

.project-card.ai-project:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.ai-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(139, 92, 246, 0.6);
    }
}

.project-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(6, 182, 212, 0.3) 100%);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-icon {
    position: relative;
    z-index: 1;
    font-size: 4rem;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

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

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

.project-tech span {
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent-color);
    gap: 0.75rem;
}

/* Stagger animation for project cards */
.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.15s;
}

.project-card:nth-child(3) {
    animation-delay: 0.2s;
}

.project-card:nth-child(4) {
    animation-delay: 0.25s;
}

.project-card:nth-child(5) {
    animation-delay: 0.3s;
}

.project-card:nth-child(6) {
    animation-delay: 0.35s;
}

.project-card:nth-child(7) {
    animation-delay: 0.4s;
}

.project-card:nth-child(8) {
    animation-delay: 0.45s;
}

.project-card:nth-child(9) {
    animation-delay: 0.5s;
}

.project-card:nth-child(10) {
    animation-delay: 0.55s;
}

/* CTA Section after projects */
.projects-cta {
    max-width: 800px;
    margin: 4rem auto 0;
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.projects-cta h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.projects-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Filter Buttons (optional for future) */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 180px;
    }

    .project-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        padding: 0 0.5rem;
    }

    .project-content {
        padding: 1.25rem;
    }
}