/* Projects Popup Styles */

.projects-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.projects-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 24px;
    padding: 40px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projects-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

.projects-popup-close:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.projects-popup-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 40px 0;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.projects-emoji {
    font-size: 36px;
    display: inline-block;
}

.projects-title-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #2d3748;
}

.project-card p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a5568;
    margin: 0 0 24px 0;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.project-btn-app {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.project-btn-app:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.project-btn-docs {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.project-btn-docs:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    transform: translateY(-2px);
    border-color: #cbd5e0;
}

.projects-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.github-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #24292e 0%, #1a1e22 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.3);
}

.github-profile-link:hover {
    background: linear-gradient(135deg, #1a1e22 0%, #0d1117 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 41, 46, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .projects-popup-content {
        padding: 30px 20px;
        margin: 10px;
        max-height: 95vh;
    }

    .projects-popup-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-card {
        padding: 20px;
    }

    .project-image {
        height: 180px;
    }

    .project-card h3 {
        font-size: 20px;
    }

    .project-card p {
        font-size: 14px;
    }

    .project-links {
        flex-direction: column;
    }

    .project-btn {
        min-width: 100%;
    }

    .github-profile-link {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* Scrollbar personalizzata */
.projects-popup-content::-webkit-scrollbar {
    width: 8px;
}

.projects-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.projects-popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.projects-popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}
