*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
}
body{
    background-color: white;
    justify-content: center;
    align-items: center;
}

#info-programa{
    margin: 2%;
}

html{
    scroll-behavior: smooth;
}

/*TIPOGRAFIAS*/
h1{
    color: black;
    font-family: "sztos-variable", sans serif;
    padding: 30 30px;
    font-size:90px;
    justify-content: left;
    text-align: left;
    margin-left: 50px;
    margin-top:150px;
}

h2{
    color: black;
    font-family: "sztos-variable", sans serif;
    padding: 30 30px;
    font-size:80px;
    justify-content: left;
    text-align: left;
    margin-left: 50px;
    margin-top:150px;
}

h3{
    color: black;
    font-family: "code-saver", sans serif; 
    font-size:50px;
    justify-content: right;
    text-align: center;
    margin-right: 50px;
    margin-top: 50px;
}

p, ul{
    color:black;
    font-family: "code-saver", sans serif; 
    font-size: 22px;
    text-align: left;
    line-height:1.5;
}

.fechas{
    margin-bottom: 40px;
}

/* HEADER  */
header{
    height: 80px;
    background-color: white;
    padding: 0 30px;
    color: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    justify-content: center;
    text-align: center;
}
 
.menu a, .es, .val{
    color: black;
    text-decoration: none;
    font-family: "code-saver", sans serif; 
    justify-content: center;
    text-align: center;
    align-items: center;
    font-size: 20px;
    
}

.opcion{
    padding: 0 10px;
}


.mostrar-menu, .esconder-menu{
    font-size: 30px;
    cursor: pointer;
    display: none;
}

.mostrar-menu{
    order:1;
}


#check{
    display: none;
}

#animacion{
    padding: 0 50px;
}

.gif{
    display: block;
    width: 100%;
    height: auto;
    margin:0 auto;
}


.gif-movil{
    display: none;
}

.es{
    color: grey;
}

/* GALERIA */

/* Contenedor principal: apila grupos (cada grupo maneja su propia 2col layout) */
.image-mosaic{
    display: grid;
    gap: 1rem;
    align-items: start;
}

/* Cada grupo: grid con 2 columnas (2fr | 1fr) y 2 filas explícitas */
.mosaic-group{
    display: grid;
    grid-template-columns: 2fr 1fr;       /* por defecto: zona 2x2 a la izquierda, imagen grande a la derecha */
    grid-template-rows: repeat(2, 360px); /* dos filas; ajusta 360px por fila según estética */
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

/* Invertir columnas: imagen grande a la izquierda */
.mosaic-group.mosaic-group--reverse{
    grid-template-columns: 1fr 2fr; /* columna ancha a la derecha/izquierda según clase */
}

/* Forzamos que los subcontenedores ocupen ambas filas */
.mosaic-group .group-left{
    grid-column: 1;
    grid-row: 1 / 3; /* ocupa las 2 filas */
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 100%;
}

.mosaic-group .group-right{
    grid-column: 2;
    grid-row: 1 / 3; /* ocupa las 2 filas */
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 100%;
}

/* Cuando el grupo está invertido, intercambiamos las columnas de los hijos */
.mosaic-group.mosaic-group--reverse .group-left{ grid-column: 2; }
.mosaic-group.mosaic-group--reverse .group-right{ grid-column: 1; }

/* Fichas internas */
.group-left .tile,
.group-right .tile{
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
}

/* Imágenes: llenar la celda (ajusta object-fit: contain si no quieres recorte) */
.group-left .tile img,
.group-right .tile img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* HOVER IMG */
.hover-img {
    background-color: transparent;
    color: #fff;
    display: block;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
    text-align: center;
    width: 100%;
}

.hover-img * {
    box-sizing: border-box;
    transition: all 0.45s ease;
}

.hover-img::before,
.hover-img::after {
  background-color: rgba(0, 0, 0, 0.5);
  border-top: 32px solid rgba(0, 0, 0, 0.5);
  border-bottom: 32px solid rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  content: '';
  transition: all 0.3s ease;
  z-index: 1;
  opacity: 0;
  transform: scaleY(2);
}

.tile img,
.hover-img img {
    display: block;
    width: 100%;        /* ocupa ancho del contenedor */
    height: auto;       /* mantiene proporción natural */
    object-fit: contain;/* no recorta la imagen */
    object-position: center;
    background-color: transparent;
    border: none;
}

/* Si quieres forzar una altura máxima para evitar filas excesivas, descomenta y ajusta:*/
.image-mosaic { grid-auto-rows: minmax(1px, auto); }


.hover-img figcaption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1em;
  opacity: 0;
  z-index: 2;
  transition-delay: 0.1s;
  font-size: 24px;
  font-family: sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hover-img:hover::before,
.hover-img:hover::after {
  transform: scale(1);
  opacity: 1;
}

.hover-img:hover > img {
  opacity: 0.7;
}

.hover-img:hover figcaption {
  opacity: 1;
}

/* LIGHTBOX */
.lightbox.hidden {
    display: none;
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}
.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    text-align: center;
    position: relative;
}
.lightbox-content img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.lightbox-content figcaption {
    color: #fff;
    margin-top: 0.8rem;
    font-family: "code-saver", sans-serif;
    font-size: 1rem;
    line-height: 1.2;
}
.lightbox .close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* FOOTER */
.footer{
    width: 100%;
    margin:0;
    margin-top: 100px;
    padding: 0;
    overflow: hidden;
}

.footer-container{
    margin: 4%;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    grid-gap:40px;
}

.col p{
    font-family: "code-saver", sans-serif;
    font-size: 1vw;
    color: black;
    margin-bottom: 5%;
    text-align: left !important;
    justify-content:left;
    align-items: left;
}
.redes a{
    color:black;
    margin-top: 15%;
    margin-right: 5%;
    margin-left: -1%;
}

.redes img{
    width: 1.8vw;
    height: 1.8vw;
}
.upv{
    max-width: 10vw;
}
.col2 p{
    text-align: left;
    justify-content:left;
    align-items: left;
}
.fila{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    justify-content: center;
    align-items: center;
    gap:20px;
    margin-top: -3%;
}
.gva{
    transform: scale(1.5);
    max-width: 9vw;
    min-width: 9vw;
    margin-left: 20% 
}
.mussol{
    max-width: 7vw;
    min-width: 7vw;
    margin-left: 30% 

}

.berklee{
    max-width: 8vw;
    min-width: 8vw;

}

.col-mov{
    display: none;
}

.diputacio{
    max-width: 13vw;
    min-width: 13vw;
    margin-left: 4vw;
}

/* MÓVIL */
@media (max-width: 768px) {

    html, body{
        overflow-x: hidden;
        width: 100%;
    }

    h3{
        margin-right: 0;
    }

    .mostrar-menu, .esconder-menu{
        display: block;
        text-align: right;
        margin-right: 4%;
    }
    .menu{
        position: fixed;
        width:100%;
        height: 100vh;
        background-color: white;
        right: -100%;
        text-align: center;
        top:0;
        padding: 100px 0px;
        z-index: 100;
        transition: 0.6s;
    }

    .menu a{
        display: block;
        color:black;
        padding: 20px;
    }
    
    .mostrar-menu{
        font-family: "code-saver", sans serif; ;
        font-size: 30px;
        position: absolute;
        top:30px;
        right:0;
        text-align: right;
    }

    .opcion {
        display: flex;
        flex-direction: column; /* Apila los elementos verticalmente */
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .es {
        margin: 0;
        padding: 0;
        font-size: 20px;
    }

    .val{
        margin: 0;
        padding-top: 20px;
    }

    /* .es{
        display: none;
    } */

    .esconder-menu{
        position: absolute;
        top:30px;
        right: 12px;
        color: black;
        font-size: 30px;
    }

    #check:checked ~ .menu{
        right: 0;
    }

    /* GALERIA: una sola columna en móvil (todas imágenes apiladas) */
    .mosaic-group{
        display: block;
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 0;
    }
    .mosaic-group .group-left{
        display: grid;
        grid-template-columns: 1fr; /* ahora las 4 "pequeñas" se apilan verticalmente */
        grid-auto-rows: auto;
        gap: 0.5rem;
        width: 100%;
        height: auto;
        margin-bottom: 0.75rem;
    }
    .mosaic-group .group-right{
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }

    /* Asegurar que cada tile se ajuste al contenido */
    .group-left .tile,
    .group-right .tile {
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .group-left .tile img,
    .group-right .tile img{
        width: 100%;
        height: auto;
        object-fit: contain; /* muestra la imagen completa sin recortar */
    }

    /* FOOTER */
    .footer-container{
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .tit-footer{
        font-size: 4vw;
        font-weight: bold;
    }

    .col{
        display: flex;
        justify-content: center;
        align-items: center ;
        flex-direction: column;
    }

    .col p{
        font-size: 4vw;
        text-align: center !important;
    }

    .upv{
        margin: 0 auto;
        min-width: 40vw;
        

    }
    .fila{
        display: grid;
        grid-template-columns: 1fr;
        grid-row: auto auto;
    }
    .col3{
        display: block;
        row-gap: 5vw;
        display: grid;
        grid-template-columns: 1fr;
        grid-row: auto auto auto;
        text-align: center;
    }

    .gva{
        margin: 0 auto;
        min-width: 40vw;
        max-width: 40vw;

    }
    .mussol{
        margin: 0 auto;
        min-width: 35vw;
        max-width: 35vw;
        padding-top: 4%;
        fill: black;

    }
    .berklee{
        margin: 0 auto;
        min-width: 40vw;
        max-width: 40vw;
        padding-top: 2%;

    }

    .diputacio{
        margin-top: 5%;
        max-width: 60vw;
        min-width: 60vw;
    }
    
    .redes{
        display: flex;
        justify-content: center;
    }
    .redes a{
        color:black;
        margin-top: 10%;
        margin-right: 15%;
    }
    
    .redes img{
        width: 5vw;
        height: 5vw;
    }
}



