.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.project-card {
    background-color: var(--primary-background);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 250px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-card h3,
.project-card p,
.project-card .project-footer,
.project-card .project-tags,
.project-card .card-meta,
.project-card .tag {
    pointer-events: none;
    position: relative;
    z-index: 2;
}


.project-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}


.project-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}


.project-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.project-footer {
    margin-top: auto;
}


/* Renamed from project-meta to card-meta */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    width: 100%; /* Ensure full width */
}


.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
}

.tag {
    background-color: var(--mint-green);
    color: var(--primary-dark);
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    cursor: pointer;
    position: relative;
    z-index: 2;
    pointer-events: auto; /* Allow clicking on buttons */
}

.btn:hover {
    background-color: var(--secondary-dark);
}


.date-display {
    display: inline-block;
    color: #666;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.hidden {
    display: none;
}

.show-more-container {
    margin-top: 2rem;
    text-align: center;
}

.card-meta .btn {
    position: relative;
    z-index: 3;
}

.project-card .card-meta span {
    position: relative;
    z-index: 2;
}
