#portfolio {
    padding: 50px 20px;
    background-color: #f9f9f9;
    text-align: center;
    scroll-margin-top: 30px;

}

#portfolio h2 {
    color: #333;
    margin-bottom: 20px;
}

.galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.proyecto {
    position: relative;
    width: 320px; /* Slightly increase width for larger images */
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center; /* Center the text below the image */
}

.proyecto img {
    width: 100%;
    height: 250px; /* Increase height for larger image */
    object-fit: cover;
}

.proyecto:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Text outside the hover effect */
.proyecto .short-name {
    margin: 10px 0;
    font-size: 1.2rem; /* Increase font size slightly for better visibility */
    font-weight: bold;
    color: #555;
    text-transform: capitalize;
    z-index: 1; /* Ensure the text stays on top and not covered by the hover */
}

/* Remove text from overlay */
.proyecto .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.3s ease-in-out;
}

.proyecto:hover .overlay {
    opacity: 1;
}

.proyecto .overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.proyecto .overlay p {
    font-size: 1rem;
}
.proyecto img {
    width: 100%;
    height: 350px; /* Increase height to make the image bigger */
    object-fit: cover;
}


.proyecto .short-name {
    margin-top: 10px;
    font-size: 1.2rem; /* Slightly larger text for better readability */
    font-weight: bold;
    color: #555;
    text-transform: capitalize;
    text-align: center; /* Center-align the text */
}

