/* Projects Section */
#projects {
    text-align: center;
    padding: 30px 20px;
    background-color: #ffffff;
    color: #000;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode #projects {
    background-color: #1a1a1a;
    color: #fff;
}

.projects-intro {
    font-size: 1.5em;
    color: #05adad;
    margin: 15px 0;
    font-family: 'Lato', sans-serif;
}

/* Grid container for project items */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 60px;
    justify-items: center;
    padding: 20px;
    margin-top: 20px;
}

/* Project Item Styles */
.project-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

body.dark-mode .project-item {
    background-color: #2b2b2b;
}

.project-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    max-width: 400px; /* Set max width for consistency */
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.project-content {
    text-align: center;
    flex-grow: 1;
}

.project-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 1.2em;
}

body.dark-mode .project-content h3 {
    color: #ffcc00;
}

.project-content p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

body.dark-mode .project-content p {
    color: #ddd;
}

.project-button {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    background-color: #007BFF;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.project-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .project-list {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Adjust column size on medium screens */
    }
}

@media (max-width: 768px) {
    .project-list {
        grid-template-columns: 1fr;
    }

    .projects-intro {
        font-size: 1.3em;
    }

    .project-content h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .projects-intro {
        font-size: 1.1em;
    }

    .project-content h3 {
        font-size: 1em;
    }

    .project-content p {
        font-size: 0.85em;
    }
}