/* Projects Section Styles */
#projects.projects-section {
    background: #f8f9fa;
    background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/projects-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

/* Background Overlay */
#projects.projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

#projects .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section Header */
#projects .section-header {
    text-align: center;
    margin-bottom: 60px;
}

#projects .section-badge {
    display: inline-block;
    background: var(--primary-green, #28a745);
    color: #ffffff;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 4px;
    position: relative;
}

#projects .section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
}

#projects .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 80px;
    height: 4px;
    transform: translateX(-50%);
    background: var(--primary-green, #28a745);
    border-radius: 2px;
}

#projects .section-description {
    font-size: 18px;
    color: #666666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Grid */
#projects .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Project Item */
#projects .project-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

#projects .project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Project Image */
#projects .project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

#projects .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

#projects .project-item:hover .project-image img {
    transform: scale(1.1);
}

/* Project Overlay */
#projects .project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#projects .project-item:hover .project-overlay {
    opacity: 1;
    visibility: visible;
}

#projects .project-actions {
    display: flex;
    gap: 15px;
}

#projects .project-actions a {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#projects .project-actions a:hover {
    background: #ffffff;
    color: var(--primary-green, #28a745);
    transform: scale(1.1);
}

/* Project Content */
#projects .project-content {
    padding: 25px;
}

#projects .project-category {
    display: inline-block;
    background: rgba(40, 167, 69, 0.1);
    color: var(--primary-green, #28a745);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 12px;
}

#projects .project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3a5f;
    line-height: 1.3;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

#projects .project-item:hover .project-title {
    color: var(--primary-green, #28a745);
}

#projects .project-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 0;
}

/* CTA Button */
#projects .projects-cta {
    text-align: center;
}

#projects .btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
    justify-content: center;
}

#projects .btn-primary {
    background: linear-gradient(135deg, var(--primary-green, #28a745) 0%, #20c464 100%);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

#projects .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c464 0%, var(--primary-green, #28a745) 100%);
}

#projects .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

#projects .btn:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    #projects.projects-section {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    #projects .section-header {
        margin-bottom: 40px;
    }
    
    #projects .section-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    #projects .section-description {
        font-size: 16px;
    }
    
    #projects .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 40px;
    }
    
    #projects .project-image {
        height: 220px;
    }
    
    #projects .project-content {
        padding: 20px;
    }
    
    #projects .project-title {
        font-size: 1.3rem;
    }
    
    #projects .btn {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    #projects.projects-section {
        padding: 40px 0;
    }
    
    #projects .container {
        padding: 0 15px;
    }
    
    #projects .section-title {
        font-size: 1.8rem;
    }
    
    #projects .section-description {
        font-size: 15px;
    }
    
    #projects .projects-grid {
        gap: 20px;
    }
    
    #projects .project-image {
        height: 200px;
    }
    
    #projects .project-content {
        padding: 18px;
    }
    
    #projects .project-actions a {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    #projects .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #projects .project-item,
    #projects .project-image img,
    #projects .project-actions a,
    #projects .btn {
        transition: none;
    }
    
    #projects .project-item:hover {
        transform: none;
    }
    
    #projects .project-item:hover .project-image img {
        transform: none;
    }
}

/* Prevent horizontal scrolling */
#projects * {
    box-sizing: border-box;
    max-width: 100%;
}
