/* Add these new styles at the end of your CSS file */

/* Portfolio Grid Fixes */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.view-project {
    color: white;
    font-weight: 600;
    background: var(--gradient-ai);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-category {
    color: var(--accent-orange);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.portfolio-desc {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.ai-tag {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-ai);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* Lightbox/Modal Styles */
.lightbox-modal .modal-content {
    background: var(--dark-bg);
    color: var(--text-light);
    border-radius: 15px;
    overflow: hidden;
}

.lightbox-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.lightbox-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    flex-grow: 1;
}

.lightbox-category {
    background: var(--gradient-ai);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.lightbox-body {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.lightbox-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.lightbox-details {
    padding: 2rem;
}

.lightbox-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.lightbox-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-ai);
}

.lightbox-text {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.service-features li {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-box {
    text-align: center;
    background: var(--glass-bg);
    padding: 1.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-ai);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.lightbox-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.client-info {
    color: var(--text-light);
    font-weight: 500;
}

.project-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #ff8c5a;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .lightbox-body {
        flex-direction: column;
    }
    
    .lightbox-img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .lightbox-img {
        height: 250px;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

/* CTA Section Fix */
.cta-section {
    background: var(--gradient-ai);
    padding: 5rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section .btn-light {
    background: white;
    color: var(--secondary-blue);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer Fixes */
.footer h5 {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: var(--gradient-ai);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer a {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-orange);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icons a {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: var(--gradient-ai);
    color: white;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Active Nav Link */
.navbar-nav .nav-link.active {
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-ai);
}