body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: url("../static/images/fondo.png") no-repeat center center fixed;
    background-size: cover;
    backdrop-filter: blur(2px);
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
}

header {
    text-align: center;
    padding-top: 20px;
}

.cabecera {
    width: 350px;
    max-width: 80%;
    filter: drop-shadow(0 0 10px #fff);
}

footer {
    text-align: center;
    padding: 20px 0;
}

.logo {
    width: 220px;
    max-width: 80%;
    opacity: 0.9;
}

.galeria {
    width: 90%;
    margin: 0 auto;
    margin-top: 30px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.galeria img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/*.galeria img {
    height: auto;
    object-fit: contain;
}*/


.galeria img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.modal {
    position: absolute;            /* <--- CLAVE: NO USAR FIXED */
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.9);
    z-index: 9999;

    /* Esto permite que quede "flotando" donde estás */
    backdrop-filter: blur(2px);

    /* IMPORTANTE: deja que el documento siga scrolleado */
    pointer-events: auto;
}

.modal--visible {
    display: flex;
}

.modal__contenido {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: none;
    border: none;
    font-size: 3rem;
    cursor: pointer;
}
