/*-- 1. Root Variables and Body Styles --*/
:root {
    /* colores */
    --clr-negro: black;
    --clr-blanco: white;
    --clr-dorado: #f4d229;
    --clr-amarillo-claro: #e6d690;
    --clr-azul: #7892c2;
    --clr-verde-whsp: #5FFC7B;
    /* fuentes */
    --ff-title: 'Roboto', sans-serif;
    --ff-title-weight: 500;
    --ff-paragraph: 'Poppins', sans-serif;
    --ff-paragraph-weight: 300;
    --ff-paragraph-size: 1.3125rem;
}

body {
    background-color: var(--clr-negro);
    color: var(--clr-blanco);
}

/*-- 2. Mobile-First Portfolio Layout (Default) --*/
.portfolio {
    line-height: 0;
    column-count: 2; /* Start with 2 columns on the smallest screens */
    column-gap: 0.2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    padding: 0.2rem;
}

.portfolio-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/*-- 3. Responsive Adjustments for Larger Screens --*/

/* Small devices (phones, 400px and up) */
@media (min-width: 400px) {
    .portfolio {
        column-count: 3;
    }
}

/* Medium devices (tablets, 600px and up) */
@media (min-width: 600px) {
    .portfolio {
        column-count: 4;
    }
}

/* Large devices (desktops, 1000px and up) */
@media (min-width: 1000px) {
    .portfolio {
        column-count: 5;
        column-gap: 0.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .portfolio {
        column-count: 6;
        column-gap: 0.2rem;
    }
}


/*-- 4. Overlay and Hover Effects --*/
.portfolio-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #fff;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
}


/*-- 5. Modal Styles for Clicked Images --*/
.overlay_map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000; /* Ensure it's on top */
}

.modal-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95vw;   /* Ensures the image is never wider than the screen */
    max-height: 95vh;  /* Ensures the image is never taller than the screen */
    object-fit: contain; /* Scales the image down to fit, preserving aspect ratio */
}

/*-- 6. Typography --*/
h3 {
    font-size: var(--ff-paragraph-size); /* Using a variable is better practice */
    font-family: var(--ff-title);
    font-weight: bold;
    word-wrap: break-word;
    line-height: 1.5;
}

p {
    font-size: 15px; /* Consider using rem units like 0.9375rem for better accessibility */
    color: var(--clr-azul);
    word-wrap: break-word;
    line-height: 1.2; /* Adjusted for better readability */
}