/* Projects Section Styling */
#projects {
    padding: 100px 5%;
    text-align: center;
    background-color: var(--background-color);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Mobile responsiveness for projects */
@media screen and (max-width: 768px) {
    #projects {
        padding: 60px 3%;
    }
    
    #projects h2 {
        font-size: 2.2rem;
        margin-bottom: 30px;
        letter-spacing: 2px;
    }
    
    .project-grid {
        gap: 2rem;
        padding: 0 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    #projects {
        padding: 40px 2%;
    }
    
    #projects h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
        letter-spacing: 1px;
    }
    
    .project-grid {
        gap: 1.5rem;
        padding: 0;
    }
    
    .project-card {
        padding: 1.5rem;
        min-height: 350px;
    }
    
    .project-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .project-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .project-image {
        height: 150px;
        margin-bottom: 1rem;
    }
}

#projects h2 {
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

#projects h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.4s ease;
}

#projects:hover h2::after {
    width: 120px;
}

/* Project Grid Layout */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Project Category */
.project-category {
    margin-bottom: 3rem;
}

.project-category > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Project Cards - Now clickable */
.project-card {
    display: block;
    text-decoration: none;
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    color: inherit;
    height: fit-content;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

/* Project Image Container */
.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background);
    flex-shrink: 0;
}

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

.project-image img.hidden {
    display: none;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Project Icon Container */
.project-icon {
    font-size: 4rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    display: none;
}

.project-icon.hidden {
    display: none;
}

.project-icon:not(.hidden) {
    display: block;
}

.project-card:hover .project-icon:not(.hidden) {
    transform: scale(1.1);
    color: var(--accent-color);
}

.project-card h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    padding: 0 1.5rem;
    font-weight: 600;
    flex-grow: 0;
}

.project-card p {
    color: var(--text-light);
    font-size: 1rem;
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* Update CTA button to look like a button but not be clickable */
.project-card .cta-button {
    display: inline-block;
    margin: 0 15px 20px;
    font-size: 0.9rem;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    transition: background 0.3s ease;
    pointer-events: none; /* Prevent the button from being clickable */
}

.project-card:hover .cta-button {
    background: var(--primary-hover-color);
}

/* Project category headings */
.project-category h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-grid {
        gap: 2rem;
        padding: 0 0.5rem;
    }
    
    .project-category > div {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        min-height: 350px;
    }
}