.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Space between items */
    align-items: stretch; /* Ensure all items take the same height */
}

.portfolio-item {
    background: #ffffff;
    padding: 56px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.portfolio-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ensures content fills available space */
}

.portfolio-info h2 {
    margin-top: 48px;
    margin-bottom: 16px;
}

.portfolio-info p {
    flex-grow: 1; /* Pushes the button to the bottom */
    margin-bottom: 56px;
}

.portfolio-info a {
    display: flex;
    align-self: flex-start;
}

/* === Responsive Grid === */
@media (max-width: 1023px) {
    /* Tablets */
    .portfolio-container {
        justify-content: center; /* Center items when wrapping */
    }

    .portfolio-item {
        flex: 0 1 calc(50% - 8px); /* 50% width with gap adjustment */
    }
}

@media (max-width: 767px) {
    /* Mobile */
    .portfolio-item {
        flex: 0 1 100%; /* Full width for each item */
    }
}
