* {
    box-sizing: border-box;
 }

 html, body {
    margin: 0;
    padding: 0;
    background: var(--AZUL1);
    background-image: url('BG1_.png');
    background-size: 100% 100%;
    background-position: bottom;
    background-repeat: no-repeat;
    background-attachment: fixed; 
    font-family: "Figtree", sans-serif;
    font-size: 17px;
    font-weight: 400;
    font-style: normal;
    color: #ffffff;
    --AZUL1:#0070FF;
    --NARANJA1:#FF8000;
    overflow-x: hidden;
}
  


nav {
    width: 100%;
    height: 100px;
    top: 0;
    left: 0;
    font-size: 15px;
    font-weight: 700;
    color:var(--AZUL1);
    z-index:1;
 }

 nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80%;
    margin: 0;
    padding: 0;
    gap: 35px;
 }
 
 nav ul li {
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 150px;
    list-style: none;
    margin-left: 0;
    transition: color 0.3s ease-in-out;
        }      

 nav ul li:hover {
     color:#FF8000;
        }

/* Normalize link styles in nav */
nav ul li a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}
nav ul li a:visited {
    color: inherit;
}


nav ul li.active {
    list-style: none;
     margin-left: 0;
     font-weight: 500;
     background-color: var(--AZUL1);
     color:#ffffff;
     transition: background-color 0.3s ease-in-out;
        }    

nav ul li.active:hover{
    background-color:var(--NARANJA1)
}
 
 
 section{
     display:flex;
     position: relative;
     width:100%;
 }
 
 section.HEADER {
     align-items: center;
     justify-content: center;
}
section.HEADER img:hover {
    mix-blend-mode:multiply;
}

section.HEADER div.ALBERTISMENTlogo img {
    height: 17.5vh;
    width: auto;
}

section.CONTENTGRID {
    display: flex;            /* three columns side-by-side */
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;                /* space between columns */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;          /* keep previous margins */
}

/* Columns inside the grid */
section.CONTENTGRID .columna1,
section.CONTENTGRID .columna2,
section.CONTENTGRID .columna3 {
    flex: 1 1 0;              /* equal width columns */
    min-width: 0;
    display: flex;            /* stack items vertically */
    flex-direction: column;
    gap: 15px;                /* space between items in a column */
}

/* Remove old per-column margins/widths */
/* Images fill column width, keep aspect ratio */


section.CONTENTGRID img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

/* Group two small tiles side-by-side within a column */
section.CONTENTGRID .tile-row {
    display: flex;
    flex-direction: row;
    gap: 15px;                 /* match column/item spacing */
}

section.CONTENTGRID .tile.small {
    display: flex;
    width: 50%;
}

/* Small tiles take half of the row width */
section.CONTENTGRID .tile-row .tile.small {
    flex: 1 1 0;
}


/* Shared container to align with grid margins */
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

section.ABOUTME{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items:center;
    margin-top: 50px;
}
section.ABOUTME div.ABOUTMETEXTO p{
    margin: 0;
    
    justify-content: center;
}
section.ABOUTME .ABOUTMEANIMVISUAL img{
    justify-content: center;
    height: 50vh;
    widh: auto;
}

section.BOTONESBOTTOM{
    display:flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 85px;
}
section.BOTONESBOTTOM .MAIL {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 150px;
}
section.BOTONESBOTTOM .MAIL a {
    color: var(--NARANJA1);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

section.BOTONESBOTTOM .MAIL a:hover{
color:var(--AZUL1)
}

section.BOTONESBOTTOM .IG {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 9px;
    padding-right: 9px;
    border-radius: 150px;
    margin-left: 15px;
}


section.BOTONESBOTTOM .LINKEDIN {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 9px;
    padding-right: 9px;
    border-radius: 150px;
    margin-left: 15px;
}

/* Swap PNGs on hover (match current HTML classes) */
section.BOTONESBOTTOM .IG a img {
    content: url('../img/buttons/buttonIG.png');
}

section.BOTONESBOTTOM .IG a:hover img {
    content: url('../img/buttons/buttonIG_hover.png');
}
section.BOTONESBOTTOM .LinkedIn a img {
    content: url('../img/buttons/buttonLINKEDIN.png');
}
section.BOTONESBOTTOM .LinkedIn a:hover img {
    content: url('../img/buttons/buttonLINKEDIN_hover.png');
}

/* Lightbox overlay */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox.open {
    display: flex;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

@media (max-width: 1024px) {
    section.CONTENTGRID {
        flex-wrap: wrap;
    }
    section.CONTENTGRID .columna1,
    section.CONTENTGRID .columna2,
    section.CONTENTGRID .columna3 {
        flex: 1 1 1 calc(33.33% - 5px);   /* 2 columns on medium screens */
    }
}
@media (max-width: 640px) {
    section.CONTENTGRID {
        flex-wrap: wrap;
    }
    section.CONTENTGRID .columna1,
    section.CONTENTGRID .columna2,
    section.CONTENTGRID .columna3 {
        flex: 1 1 calc(25% - 7.5px);  
    }
    nav ul {
        width: 100%;
        height: 80%;
        gap: 0px;
     }
     
     nav ul li {
        padding-left: 15px;
        padding-right: 15px;
     }
}