/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ejemplo de menú fijo (puedes cambiar estilos) */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Altura del menú */
    background-color: #222;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'open sans';
}

/* Estilos de la galería */
.galeria {
    font-family: 'open sans';
    margin-top: 80px; /* Importante: deja espacio para el menú */
}

.galeria h1 {
    text-align: center;
    margin: 20px 0 15px 0;
    font-weight: 300;
}

.linea {
    border-top: 5px solid #37b6e1;
    margin-bottom: 40px;
}

.contenedor-imagenes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 85%;
    margin: auto;
    border-radius: 3px;
}

.contenedor-imagenes .imagen {
    width: 25%;
    height: 200px;
    position: relative; /* Necesario para el overlay */
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, .75);
}

.imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay (capa que aparece al pasar el mouse) */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #37b6e1c9;
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: .5s ease;
}

.overlay h2 {
    color: #fff;
    font-weight: 300;
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    transform: translate(-50%, -50%);
}

.imagen:hover .overlay {
    height: 100%;
    cursor: pointer;
}

/* Media queries responsivas */
@media screen and (max-width: 1000px) {
    .contenedor-imagenes {
        width: 95%;
    }
}

@media screen and (max-width: 700px) {
    .contenedor-imagenes {
        width: 90%;
    }

    .contenedor-imagenes .imagen {
        width: 40%;
        height: 180px;
    }

    .overlay h2 {
        font-size: 20px;
    }
}

@media screen and (max-width: 450px) {
    h1 {
        font-size: 22px;
    }

    .contenedor-imagenes {
        width: 98%;
    }

    .contenedor-imagenes .imagen {
        width: 70%;
        height: 160px;
    }

    .overlay h2 {
        font-size: 18px;
    }
}
