/* Portfolio Section Styles */
.portfolio {
    padding: 80px 0;
    background: var(--background-light);
}

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

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: 1.5rem;
    }
}

.portfolio-item {
    background: var(--background-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-image {
    height: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.portfolio-content {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.portfolio-content h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.portfolio-metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-tags span {
    background: var(--border-color);
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.portfolio-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.portfolio-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Center case study buttons */
.portfolio-content .btn {
    display: block;
    margin: 0 auto;
    text-align: center;
    width: auto;
    min-width: 200px;
}

/* Portfolio CTA Section */
.portfolio-cta {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    color: white;
    padding: 80px 40px;
    border-radius: 25px;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.portfolio-cta .cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.portfolio-cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #e2e8f0;
    line-height: 1.6;
    opacity: 1;
}

/* Featured Categories */
.featured-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 40px auto 0;
}

.featured-card {
    padding: 50px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    transform: scale(1);
    transition: all 0.4s ease;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    padding: 2px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.featured-card .category-icon {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.featured-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.featured-card .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.featured-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

/* Responsive Design for Portfolio */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-categories {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .featured-card {
        padding: 40px 30px;
    }
    
    .featured-card .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .featured-card h3 {
        font-size: 1.7rem;
    }
    
    .portfolio-cta {
        padding: 60px 30px;
        margin-top: 60px;
    }
    
    .portfolio-cta h2 {
        font-size: 2rem;
    }
    
    .portfolio-cta p {
        font-size: 1.1rem;
    }
}
