.modal-muestra {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    transition: opacity 0.3s ease;
}

/* Cuando el modal se abre con JS, solo necesita esto */
.modal-muestra[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-muestra .contenido-modal {
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.5);
    margin: 0;
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #ffcc00;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
}

.cerrar-modal:hover {
    color: white;
}

/* Media query específico para móviles en orientación vertical */
@media (max-width: 768px) and (orientation: portrait) {
    .modal-muestra .contenido-modal {
        max-width: 95%;
        max-height: 85%;
    }
    
    .cerrar-modal {
        top: 10px;
        right: 20px;
        font-size: 2.5em;
    }
}