body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #f9f9f9;
}
.portfolio, .projects {
    padding: 40px;
    background: white;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 90%;
}
.portfolio h2, .projects h2 {
    color: #333;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 20px;
}
.grid img {
    width: 100%;
    height: 150px; /* Ajusta todas las imágenes al mismo tamaño */
    object-fit: cover; /* Evita distorsión y ajusta la imagen */
    border-radius: 5px;
    transition: transform 0.3s;
}
.grid img:hover {
    transform: scale(1.05);
}
.projects .content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: left;
    flex-wrap: wrap;
}
.projects .text {
    max-width: 50%;
}
.projects .image img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}
ul {
    list-style: none;
    padding: 0;
}
ul li {
    margin: 10px 0;
    color: #020202;
}
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f5f5f5;
}
.navigation a {
    text-decoration: none;
    color: #007bff;
    font-size: 18px;
    transition: color 0.3s;
}
.navigation a:hover {
    color: #0056b3;
}
.close-button {
    font-size: 24px;
    text-decoration: none;
    color: red;
    font-weight: bold;
}
/* General styles */
.portfolio {
    padding: 20px;
    text-align: center;
}

.portfolio h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.portfolio p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Grid styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item figcaption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px;
    font-size: 1rem;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.8); /* Black with opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
    }
}
